legpolyprod

Product of Legendre polynomials.


Syntax
   y = legpolyprod(p, q, order4trunc)

Description
   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).

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

Input (optional)
   order4trunc = order for truncate the result.

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

See also
  chebypolyprod.