whittakerM
Whittaker M function
Syntax
Description
whittakerM(
returns the value of the Whittaker M function.a
,b
,z
)
Examples
Compute Whittaker M Function for Numeric Input
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 Whittaker M Function for Symbolic Input
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)]
Solve ODE for Whittaker Functions
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 Whittaker Functions are Solution of ODE
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 = logical 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 = logical 1
Compute Special Values of Whittaker M Function
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 Whittaker M Function
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 Whittaker M Function for Matrix Input
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)]
Input Arguments
More About
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
[1] Slater, L. J. “Confluent Hypergeometric Functions.” Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. (M. Abramowitz and I. A. Stegun, eds.). New York: Dover, 1972.
Version History
Introduced in R2012a