## orthopolyprod

Product of orthogonal polynomials.

Product of orthogonal polynomials.

y = orthopolyprod(p, q, a, b, c)

y = orthopolyprod(p, q) returns the coefficients of product p*q, where p and q are both the vector of coefficients in orthogonal basis, i.e. P(x) = p(1)*P_0(x) + ... + p(m+1)*P_m(x) and Q(t) = q(1)*P_0(x) + ... + q(n+1)*P_n(x). Then, the result will be the vector of coefficients y such that P(x)*Q(x) = f(1)*P_0(x) + ... + f(m+n+1)*P_{m+n+1}(x).

p = vector of coefficients in orthogonal basis. q = vector of coefficients in orthogonal basis. a, b and c = are the coeficients related with three terms recurrece: xP_i = a(i)P_{i+1}+b(i)P_i+c(i)P_{i-1}, P_{-1} = 0, P_1 = 1.

order4trunc = order for truncate the result.

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

p = [7/4, 11/2, -7/4, -1/2]; q = p; a = (1:8)./(2:4:30); b = ones(1, 8)/2; c = (0:7)./(2:4:30); orthopolyprod(p, q, a, b, c)

chebypolyprod and legpolyprod.