Convergence of Laguerre Function

Hi, I need calculate the lagauerre function defined by :
fi(x)=exp(-x/2)* Li(x) for various order i when Li(x) is the Laguerre polynomials ( http://mathworld.wolfram.com/LaguerrePolynomial.html ) given by the following function:
function L = Funlaguerre(n,x)
sum= 0;
for i=0:n
sum = sum + ((i^(-1)* (factorial(n)/(factoria(l(n-i) * factorial(i) * factorial(i))).*x^k));
end
L= sum;
end
According to the theory , Laguerre function must converge to 0 when the order of the Laguerre polynomial is high. I calculate the laguerre function based on the following parameters
Tf= 1e-007;
M=101;
delta_t=Tf/100;
T=0:delta_t:(M-1)*delta_t;
S=10^9; % scaling Factor
lag=60; % order of Laguerre polynomial
for n=0:lag
for t=1:M
F(n+1,t)=exp(-s*T(t)/2)* Funlaguerre (n,s*T(t));
end
end
I obtain correct results for the order : [1…30] . But, when the order becomes more than 30, the laguerre function diverges as seen in the attached curves. i don't understand why the function diverges? best regards
%

4 Comments

Hi Hamdi
For high order polynomials with large x, the accuracy might not be well preserved.
By the way, do you see any error messages? I am also curious about what are the expected results you would like to see?
-Yu
Hi Yu,
Thank you for the speedy response!
For high order polynomials with large x, the accuracy might not be well preserved
the vaue of x depend on the scaling factor s.
By the way, do you see any error messages?
No error message is displayed.
I am also curious about what are the expected results you would like to see?
if I increase "i" the order of laguerre function, I must have same curve as the order 4.
Best regards
Hi Hamdi
For s=10^9, x will go to s*(M-1)*delta_t = 100. It seems to be a large number if you take 100^40. I tried your code with s=10^8 and no longer observe any divergence.
-Yu
Hi Yu,
Yes for s=10^8 the laguerre function converge but not to "0". This function must converge to 0 when x-->infini
I varied the value of the scaling factor s but i can't reach the convergence to 0.
Also for the high order of i, 80 for example, this function diverge.
Best regards

Sign in to comment.

 Accepted Answer

Hamdi, Your trouble is entirely due to round-off errors whose effect becomes large for large order Laguerre polynomials, together with the fact that you didn't let x get large enough to see that your function was actually converging to zero. The multiplicative factor exp(-x/2) guarantees that it must eventually converge to zero. However, the higher order polynomials will require larger values of x before their convergence to zero becomes evident.
There is a method of computation of Laguerre polynomials using recursion that will greatly reduce the noise due to round-off. It is:
L(n,x) = ((2*n-1-x)*L(n-1,x)-(n-1)*L(n-2,x))/n;
Here is code I used to generate your function using this recursion:
clear
n = 100; % <-- Select the order
N = 8192; % <-- Choose the number of points to plot
X = linspace(0,500,N); % <-- Choose the range of x
F = zeros(1,N);
for ix = 1:N
x = X(ix);
t0 = 1; % <-- The zero-th order polynomial
t1 = 1-x; % <-- The first order polynomial
for k = 2:n
t = ((2*k-1-x)*t1-(k-1)*t0)/k; % <-- The recursion formula
t0 = t1; t1 = t;
end
F(ix) = t1*exp(-x/2);
end
plot(X,F,'y-')

More Answers (1)

Hamdi
Hamdi on 12 Aug 2014
Thank you very much for your help.

Tags

Asked:

on 11 Aug 2014

Answered:

on 12 Aug 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!