Laguerre polynomials of large degree.

6 Ansichten (letzte 30 Tage)
MHK
MHK am 11 Mai 2023
Bearbeitet: John D'Errico am 11 Mai 2023
Dear MATLAB community members,
Has anyone experience issues with MATLABs laguerreL function with very large values of n,
I noticed that the results for large values of x and m in laguerreL(m,x) the answer of MATHEMATICA and MATLAB also do not match. Is it a known issue due to (possible use) of hypergeometric representation in laguerreL? I would like to use it to approximate an integral involving Laguerre polynomial products, where the integrand is highly oscillatory. Using quadgk, I can get some outputs; but is there a way to verify these solutions specially at higher values m and n; given discrepencies in MATHEMATICA, using recursive definitions, or built-in laguerreL at large m and x?
Thank you in advance!

Antworten (1)

John D'Errico
John D'Errico am 11 Mai 2023
Bearbeitet: John D'Errico am 11 Mai 2023
If you are using double precision, then OF COURSE high order polynomials of any form in MATLAB should not be trusted!!!! At least, not if you are using double precision. High order polynomials and double precision don't mix well.
But that just means you need to be careful. I don't really understand the problem.
help laguerreL
--- help for sym/laguerreL --- LAGUERREL Laguerre's L function and Laguerre polynomials. Y = LAGUERREL(N,A,X) is the generalized Laguerre function with parameter A. It is an N-th degree polynomial in X if N is a nonnegative integer. Documentation for sym/laguerreL doc sym/laguerreL Other uses of laguerreL double/laguerreL single/laguerreL
And here we can find a form for those polynomials:
syms x
laguerreL(50,0,x)
ans = 
That first term coefficient should be 1/factorial(50).
factorial(sym(50))
ans = 
30414093201713378043612608166064768844377641568960512000000000000
The second term coefficient should be -50^2/factorial(50).
50^2/factorial(sym(50))
ans = 
It looks to be working to me, to full precision, as long as I use symbolic tools. If you are trying to use double precision arithmetic, AND high order polynomials, well, you get what you should expect.
If you have some specific issue, then you need to show EXACTLY what you are doing where you see a discrepancy.

Community Treasure Hunt

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

Start Hunting!

Translated by