52
3 Legendre Polynomials and Legendre Functions
or column vectors, they have to be of the same size; the evaluation will then be
pairwise. If one is a column vector and the other one a row vector, the number of
elements could be different. In this case, all possible combinations will be used.
The input variable “PorQ” is optional, with possible values 1 or “P” (default; for
Mehler functions of first kind) and 2 or “Q” for the Mehler function of second kind.
The return value is the object “obj” with properties “value” for the function value,
“z” the corresponding conical function argument, and “taumu” lists the “tau” and
“mu” parameter values pairwise, and “info” some general information on which
computational methods were used; “res” is equal to obj.value.
Example
tau=randn(1,3);mu=randn(2,2);z=rand(2,3)+i * randn(2,3);
[obj,res] = mehlerfun(tau,mu,z,1);
% or result = mehlerfun(tau,mu,z,1).value
Additional supported methods come with superclass PQnumu, see Sect. 3.4.3:
abs(obj), real(obj), angle(obj,dr), isreal(obj), isrealsingle(obj,tol), plot, and surf.
Conical or Mehler Function of First Kind
The conical function of first kind holds
P
μ
−
1
2 +iτ
(z) = P
μ
−
1
2 −iτ
(z),
(3.30)
thus, there is no necessity to distinguish between positive and negative τ -values. The
computation is based either on the hypergeometric series expansions, which we will
briefly discuss, or on the recurrence relation, or on a path integration method. In the
object property “info,” the different hypergeometric series are referred as method 1,
2, 4, or 7. (Other argument transformations tested were less successful.) An example
is shown in Fig. 3.4.
Equations (3.23a) and (3.23b); method 1: For this hypergeometric series, we get,
Eq. (3.26), ta(n) =
1
4
(2n−1) 2 +4τ 2
(n−μ)n . Here, P
μ
−
1
2 +iτ
(z) will be undefined for μ = m
with m positive integer. With Eq. (3.12b), we get
P
m
−
1
2 +iτ
(z) =
|Γ (m + 1/2 + iτ )| 2
π
cosh(πτ )P
−m
−
1
2 +iτ
(z) ,
(3.31)
and thus it is sufficient to evaluate P
−m
−
1
2 +τ
(z). From these representations, it is clear
that for z real, the conical function P
μ
−
1
2 +iτ
(z) remains real valued.
Equation (3.23c); method 2: Here, we get for the nominator (
1
2 + n − μ) 2 + τ 2
and thus a finite series if τ = 0 and μ =
2m+1
2
with m positive integer. (See, in
addition, the next subsection about toroidal functions.) Because methods 1 and 2
3 Legendre Polynomials and Legendre Functions
or column vectors, they have to be of the same size; the evaluation will then be
pairwise. If one is a column vector and the other one a row vector, the number of
elements could be different. In this case, all possible combinations will be used.
The input variable “PorQ” is optional, with possible values 1 or “P” (default; for
Mehler functions of first kind) and 2 or “Q” for the Mehler function of second kind.
The return value is the object “obj” with properties “value” for the function value,
“z” the corresponding conical function argument, and “taumu” lists the “tau” and
“mu” parameter values pairwise, and “info” some general information on which
computational methods were used; “res” is equal to obj.value.
Example
tau=randn(1,3);mu=randn(2,2);z=rand(2,3)+i * randn(2,3);
[obj,res] = mehlerfun(tau,mu,z,1);
% or result = mehlerfun(tau,mu,z,1).value
Additional supported methods come with superclass PQnumu, see Sect. 3.4.3:
abs(obj), real(obj), angle(obj,dr), isreal(obj), isrealsingle(obj,tol), plot, and surf.
Conical or Mehler Function of First Kind
The conical function of first kind holds
P
μ
−
1
2 +iτ
(z) = P
μ
−
1
2 −iτ
(z),
(3.30)
thus, there is no necessity to distinguish between positive and negative τ -values. The
computation is based either on the hypergeometric series expansions, which we will
briefly discuss, or on the recurrence relation, or on a path integration method. In the
object property “info,” the different hypergeometric series are referred as method 1,
2, 4, or 7. (Other argument transformations tested were less successful.) An example
is shown in Fig. 3.4.
Equations (3.23a) and (3.23b); method 1: For this hypergeometric series, we get,
Eq. (3.26), ta(n) =
1
4
(2n−1) 2 +4τ 2
(n−μ)n . Here, P
μ
−
1
2 +iτ
(z) will be undefined for μ = m
with m positive integer. With Eq. (3.12b), we get
P
m
−
1
2 +iτ
(z) =
|Γ (m + 1/2 + iτ )| 2
π
cosh(πτ )P
−m
−
1
2 +iτ
(z) ,
(3.31)
and thus it is sufficient to evaluate P
−m
−
1
2 +τ
(z). From these representations, it is clear
that for z real, the conical function P
μ
−
1
2 +iτ
(z) remains real valued.
Equation (3.23c); method 2: Here, we get for the nominator (
1
2 + n − μ) 2 + τ 2
and thus a finite series if τ = 0 and μ =
2m+1
2
with m positive integer. (See, in
addition, the next subsection about toroidal functions.) Because methods 1 and 2
