# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# whittakerW

Whittaker W function

## Syntax

```whittakerW(a,b,z) ```

## Description

`whittakerW(a,b,z)` returns the value of the Whittaker W function.

## Input Arguments

 `a` Symbolic number, variable, expression, function, or a vector or matrix of symbolic numbers, variables, expressions, or functions. If `a` is a vector or matrix, `whittakerW` returns the beta function for each element of `a`. `b` Symbolic number, variable, expression, function, or a vector or matrix of symbolic numbers, variables, expressions, or functions. If `b` is a vector or matrix, `whittakerW` returns the beta function for each element of `b`. `z` Symbolic number, variable, expression, function, or a vector or matrix of symbolic numbers, variables, expressions, or functions. If `x` is a vector or matrix, `whittakerW` returns the beta function for each element of `z`.

## Examples

Solve this second-order differential equation. The solutions are given in terms of the Whittaker functions.

```syms a b w(z) dsolve(diff(w, 2) + (-1/4 + a/z + (1/4 - b^2)/z^2)*w == 0)```
```ans = C2*whittakerM(-a, -b, -z) + C3*whittakerW(-a, -b, -z)```

Verify that the Whittaker W function is a valid solution of this differential equation:

```syms a b z isAlways(diff(whittakerW(a, b, z), z, 2) +... (-1/4 + a/z + (1/4 - b^2)/z^2)*whittakerW(a, b, z) == 0)```
```ans = logical 1```

Verify that `whittakerW(-a, -b, -z)` also is a valid solution of this differential equation:

```syms a b z isAlways(diff(whittakerW(-a, -b, -z), z, 2) +... (-1/4 + a/z + (1/4 - b^2)/z^2)*whittakerW(-a, -b, -z) == 0)```
```ans = logical 1```

Compute the Whittaker W function for these numbers. Because these numbers are not symbolic objects, you get floating-point results.

```[whittakerW(1, 1, 1), whittakerW(-2, 1, 3/2 + 2*i),... whittakerW(2, 2, 2), whittakerW(3, -0.3, 1/101)]```
```ans = 1.1953 -0.0156 - 0.0225i 4.8616 -0.1692```

Compute the Whittaker W function for the numbers converted to symbolic objects. For most symbolic (exact) numbers, `whittakerW` returns unresolved symbolic calls.

```[whittakerW(sym(1), 1, 1), whittakerW(-2, sym(1), 3/2 + 2*i),... whittakerW(2, 2, sym(2)), whittakerW(sym(3), -0.3, 1/101)]```
```ans = [ whittakerW(1, 1, 1), whittakerW(-2, 1, 3/2 + 2i), whittakerW(2, 2, 2), whittakerW(3, -3/10, 1/101)]```

For symbolic variables and expressions, `whittakerW` also returns unresolved symbolic calls:

```syms a b x y [whittakerW(a, b, x), whittakerW(1, x, x^2),... whittakerW(2, x, y), whittakerW(3, x + y, x*y)]```
```ans = [ whittakerW(a, b, x), whittakerW(1, x, x^2), whittakerW(2, x, y), whittakerW(3, x + y, x*y)]```

The Whittaker W function has special values for some parameters:

`whittakerW(sym(-3/2), 1/2, 0)`
```ans = 4/(3*pi^(1/2))```
```syms a b x whittakerW(0, b, x)```
```ans = (x^(b + 1/2)*besselk(b, x/2))/(x^b*pi^(1/2))```
`whittakerW(a, -a + 1/2, x)`
```ans = x^(1 - a)*x^(2*a - 1)*exp(-x/2)```
`whittakerW(a - 1/2, a, x)`
```ans = (x^(a + 1/2)*exp(-x/2)*exp(x)*igamma(2*a, x))/x^(2*a)```

Differentiate the expression involving the Whittaker W function:

```syms a b z diff(whittakerW(a,b,z), z)```
```ans = - (a/z - 1/2)*whittakerW(a, b, z) -... whittakerW(a + 1, b, z)/z```

Compute the Whittaker W function for the elements of matrix `A`:

```syms x A = [-1, x^2; 0, x]; whittakerW(-1/2, 0, A)```
```ans = [ -exp(-1/2)*(ei(1) + pi*1i)*1i,... exp(x^2)*exp(-x^2/2)*expint(x^2)*(x^2)^(1/2)] [ 0,... x^(1/2)*exp(-x/2)*exp(x)*expint(x)]```

collapse all

### Whittaker W Function

The Whittaker functions Ma,b(z) and Wa,b(z) are linearly independent solutions of this differential equation:

`$\frac{{d}^{2}w}{d{z}^{2}}+\left(-\frac{1}{4}+\frac{a}{z}+\frac{1/4-{b}^{2}}{{z}^{2}}\right)w=0$`

The Whittaker W function is defined via the confluent hypergeometric functions:

`${W}_{a,b}\left(z\right)={e}^{-z/2}{z}^{b+1/2}U\left(b-a+\frac{1}{2},1+2b,z\right)$`

## Tips

• All non-scalar arguments must have the same size. If one or two input arguments are non-scalar, then `whittakerW` expands the scalars into vectors or matrices of the same size as the non-scalar arguments, with all elements equal to the corresponding scalar.

## References

Slater, L. J. “Cofluent Hypergeometric Functions.” Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.