A bad way to compute P_n(x) for large n, with P_n the nth Legendre polynomial, is to compute all the coefficients of P_n and build up the polynomial. My question is, how does matlab's legendreP(n,x) function get round this? What is the algorithm it is using?
MATLAB: How does matlab compute legendreP(n,x)
interpolation
Best Answer