# whittakerM

Whittaker M function

## Syntax

whittakerM(a,b,z)

## Description

whittakerM(a,b,z) returns the value of the Whittaker M 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, whittakerM 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, whittakerM 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, whittakerM 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 M function is a valid solution of this differential equation:

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

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

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

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

[whittakerM(1, 1, 1), whittakerM(-2, 1, 3/2 + 2*i),...
whittakerM(2, 2, 2), whittakerM(3, -0.3, 1/101)]
ans =
0.7303            -9.2744 + 5.4705i   2.6328             0.3681

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

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

For symbolic variables and expressions, whittakerM also returns unresolved symbolic calls:

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

The Whittaker M function has special values for some parameters:

whittakerM(sym(-3/2), 1, 1)
ans =
exp(1/2)
syms a b x
whittakerM(0, b, x)
ans =
4^b*x^(1/2)*gamma(b + 1)*besseli(b, x/2)
whittakerM(a + 1/2, a, x)
ans =
x^(a + 1/2)*exp(-x/2)
whittakerM(a, a - 5/2, x)
ans =
(2*x^(a - 2)*exp(-x/2)*(2*a^2 - 7*a + x^2/2 -...
x*(2*a - 3) + 6))/pochhammer(2*a - 4, 2)

Differentiate the expression involving the Whittaker M function:

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

Compute the Whittaker M function for the elements of matrix A:

syms x
A = [-1, x^2; 0, x];
whittakerM(-1/2, 0, A)
ans =
[ exp(-1/2)*1i, exp(x^2/2)*(x^2)^(1/2)]
[           0,       x^(1/2)*exp(x/2)]

collapse all

### Whittaker M 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 M function is defined via the confluent hypergeometric functions:

${M}_{a,b}\left(z\right)={e}^{-z/2}\text{\hspace{0.17em}}{z}^{b+1/2}\text{\hspace{0.17em}}M\left(b-a+\frac{1}{2},\text{\hspace{0.17em}}1+2b,\text{\hspace{0.17em}}z\right)$

### Tips

• All non-scalar arguments must have the same size. If one or two input arguments are non-scalar, then whittakerM 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.