Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# whittakerW

Whittaker W function

## Syntax

whittakerW(a,b,z)
whittakerW(a,b,A)

## Description

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

whittakerW(a,b,A) returns the value of the Whittaker W function for each element of A.

## Input Arguments

 a Symbolic number, variable, or expression. b Symbolic number, variable, or expression. z Symbolic number, variable, or expression. A Vector or matrix of symbolic numbers, variables, or expressions.

## 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
simplify(diff(whittakerW(a, b, z), z, 2) +...
(-1/4 + a/z + (1/4 - b^2)/z^2)*whittakerW(a, b, z)) == 0```
```ans =
1```

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

```syms a b z
simplify(diff(whittakerW(-a, -b, -z), z, 2) +...
(-1/4 + a/z + (1/4 - b^2)/z^2)*whittakerW(-a, -b, -z)) == 0```
```ans =
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 + 2*i),
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))/(pi^(1/2)*x^b)```
`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)*(pi*i + ei(1))*i,
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)]```

expand all

### Whittaker W Function

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

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

## 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.