# ellipticCPi

Complementary complete elliptic integral of the third kind

## Syntax

``ellipticCPi(n,m)``

## Description

````ellipticCPi(n,m)` returns the complementary complete elliptic integral of the third kind.```

## Examples

### Compute Complementary Complete Elliptic Integrals of Third Kind

Compute the complementary complete elliptic integrals of the third kind for these numbers. Because these numbers are not symbolic objects, you get floating-point results.

```s = [ellipticCPi(-1, 1/3), ellipticCPi(0, 1/2),... ellipticCPi(9/10, 1), ellipticCPi(-1, 0)]```
```s = 1.3703 1.8541 4.9673 Inf```

Compute the complementary complete elliptic integrals of the third kind for the same numbers converted to symbolic objects. For most symbolic (exact) numbers, `ellipticCPi` returns unresolved symbolic calls.

```s = [ellipticCPi(-1, sym(1/3)), ellipticCPi(sym(0), 1/2),... ellipticCPi(sym(9/10), 1), ellipticCPi(-1, sym(0))]```
```s = [ ellipticCPi(-1, 1/3), ellipticCK(1/2), (pi*10^(1/2))/2, Inf]```

Here, `ellipticCK` represents the complementary complete elliptic integrals of the first kind.

Use `vpa` to approximate this result with floating-point numbers:

`vpa(s, 10)`
```ans = [ 1.370337322, 1.854074677, 4.967294133, Inf]```

### Differentiate Complementary Complete Elliptic Integrals of Third Kind

Differentiate these expressions involving the complementary complete elliptic integral of the third kind:

```syms n m diff(ellipticCPi(n, m), n) diff(ellipticCPi(n, m), m)```
```ans = ellipticCK(m)/(2*n*(n - 1)) -... ellipticCE(m)/(2*(n - 1)*(m + n - 1)) -... (ellipticCPi(n, m)*(n^2 + m - 1))/(2*n*(n - 1)*(m + n - 1)) ans = ellipticCE(m)/(2*m*(m + n - 1)) - ellipticCPi(n, m)/(2*(m + n - 1))```

Here, `ellipticCK` and `ellipticCE` represent the complementary complete elliptic integrals of the first and second kinds.

## Input Arguments

collapse all

Input, specified as a number, vector, matrix, or array, or a symbolic number, variable, array, function, or expression.

Input, specified as a number, vector, matrix, or array, or a symbolic number, variable, array, function, or expression.

collapse all

### Complementary Complete Elliptic Integral of the Third Kind

The complementary complete elliptic integral of the third kind is defined as Π'(m) = Π(n, 1–m), where Π(n,m) is the complete elliptic integral of the third kind:

`$\Pi \left(n,m\right)=\Pi \left(n;\frac{\pi }{2}|m\right)=\underset{0}{\overset{\pi /2}{\int }}\frac{1}{\left(1-n{\mathrm{sin}}^{2}\theta \right)\sqrt{1-m{\mathrm{sin}}^{2}\theta }}d\theta$`

Note that some definitions use the elliptical modulus k or the modular angle α instead of the parameter m. They are related as m = k2 = sin2α.

## Tips

• `ellipticCPi` returns floating-point results for numeric arguments that are not symbolic objects.

• For most symbolic (exact) numbers, `ellipticCPi` returns unresolved symbolic calls. You can approximate such results with floating-point numbers using `vpa`.

• At least one input argument must be a scalar or both arguments must be vectors or matrices of the same size. If one input argument is a scalar and the other one is a vector or a matrix, then `ellipticCPi` expands the scalar into a vector or matrix of the same size as the other argument with all elements equal to that scalar.

 Milne-Thomson, L. M. “Elliptic Integrals.” Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.

## Support

#### Mathematical Modeling with Symbolic Math Toolbox

Get examples and videos