Laguerre polynomials of large degree.
5 views (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
John D'Errico
on 11 May 2023
Edited: John D'Errico
on 11 May 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
And here we can find a form for those polynomials:
syms x
laguerreL(50,0,x)
That first term coefficient should be 1/factorial(50).
factorial(sym(50))
The second term coefficient should be -50^2/factorial(50).
50^2/factorial(sym(50))
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.
0 Comments
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!