192
15 Orthogonal Polynomials: General Aspects
%%
xg = repmat(xg,size(obj.value,1),1);
ns = repmat(ns,1,size(obj.value,2));
prad = xg. * ns. * obj.value;
% radial value in
%
momentum presentation
plot(x,prad)
The class gegenbauerx house in addition a plot-method with syntax obj
= plot(obj, nl) and “obj” an object of the class gegenbauerx, “nl”
an optional integer vector of the polynomial degrees which should be plotted.
Default is to plot all Gegenbauer polynomials in quest. Example:
obj = gegenbauerx(lambda, n, x).plot([1,3]),
thus C λ
1 (x) and C λ
3 (x) will be plotted.
The SPECFUNPHYS Function Gegenbauerzero
The evaluation of the polynomial roots is based on the computation of the
eigenvalues of the corresponding Jacobi matrix (15.6) with the MATLAB function eig. The syntax of the SPECFUNPHYS function gegenbauerzero is
gbz = gegenbauerzero(lambda, n), with the input variables “lambda”
(Gegenbauer parameter), a scalar floating value, and “n” (polynomial degree), a
positive integer value and the output variable “gbz”, the position of the polynomial roots. An alternative would be the MATLAB function roots in combination with gegenbauerpoly. For large polynomial degrees, the evaluation
via gegenbauerzero shows significantly better results than the evaluation via
roots. Example:
n = 30; lambda = 4;
% Gegenbauer parameter
gbz = gegenbauerzero(lambda, n); % roots
obj = gegenbauerx(lambda, n, gbz); % polynomial value
%
at roots and residuum
sum(abs(obj.value(end,:)))/length(obj.value(end,:))
ans =
1.33917e-09
For the evaluation via roots this value would be 0.005 and for n = 10 the residuum
value would be about 4.5 · 10 −12 .
15.5 Jacobi Polynomials
The Jacobi polynomials are orthogonal on the interval [−1, 1] with respect to the
weight function (1 − x) α (1 + x) β . They follow the three-term recurrence relation
2(n + 1)(n + α + β + 1)(2n + α + β)P
(α,β)
n+1 (x) =
(15.22a)
(2n + α + β + 1)[(2n + α + β)(2n + α + β + 2)x + α
2
− β
2
]P
(α,β)
n
(x)
Précédent

- 199/287

Suivant