# CAUCHY_PRINCIPAL_VALUE Estimate Singular Integrals

CAUCHY_PRINCIPAL_VALUE is a MATLAB library which uses Gauss-Legendre quadrature to estimate the Cauchy Principal Value of certain singular integrals.

The singular integrals to be considered will have the form:

```        Integral ( a <= t <= b ) f(t) / ( t - x ) dt
```
The Cauchy Principal Value is defined as
```        CPV = limit ( s --> x ) Integral ( a <= t <= s ) f(t) / ( t - x ) dt
+ limit ( x <-- s ) Integral ( s <= t <= b ) f(t) / ( t - x ) dt
```

We suppose that our singular integral is posed on an interval that is symmetric with respect to the location of the singularity:

```        Integral ( x-d <= t <= x+d ) f(t) / ( t - x ) dt
```
and we propose to estimate the integral using a Gauss-Legendre rule of even order N:
```        CPV approx sum ( 1 <= i <= N ) w(i) * f(xi(i)*d+x) / xi(i)
```
where xi(i) and w(i) are the points and weights, respectively, of the Gauss-Legendre rule.

### Languages:

CAUCHY_PRINCIPAL_VALUE is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version and a Python version.

### Related Data and Programs:

QUADRULE, a MATLAB library which defines quadrature rules for approximating an integral over a 1D domain.

### Reference:

1. Julian Noble,
Gauss-Legendre Principal Value Integration,
Computing in Science and Engineering,
Volume 2, Number 1, January-February 2000, pages 92-95.

### Source Code:

• cpv.m, estimates the Cauchy Principal Value using Gauss-Legendre quadrature.
• legendre_set.m, returns the points and weights for a Gauss-Legendre quadrature rule.
• timestamp.m, prints the current YMDHMS date as a time stamp.

### Examples and Tests:

You can go up one level to the MATLAB source codes.