## legpolyprod

Product of Legendre polynomials.

Product of Legendre polynomials.

y = legpolyprod(p, q, order4trunc)

y = legpolyprod(p, q) returns the coefficients of product p*q, where p and q are both the vector of coefficients in Legendre basis, i.e. P(x) = p(1)*L_0(x) + ... + p(m+1)*L_m(x) and Q(t) = q(1)*L_0(x) + ... + q(n+1)*L_n(x). Then, the result will be the vector of coefficients y such that P(x)*Q(x) = f(1)*L_0(x) + ... + f(m+n+1)*L_{m+n+1}(x).

p = vector of coefficients in Legendre basis. q = vector of coefficients in Legendre basis.

order4trunc = order for truncate the result.

f = vector of coefficients in Legendre basis (P(x)*Q(x)).

chebypolyprod.