Polynomials – Solving a Recurrence of Polynomials

polynomialsrecurrence-relations

I am wondering how to solve a recurrence of this type

$$p_1(x) = x$$
$$p_2(x) = 1-x^2$$

and

$$p_{n+2}(x) = -xp_{n+1}(x)+p_{n}(x).$$

I am wondering, how could one solve such a recurrence. One way would be to pretend $x$ is fixed and solve it using the well known method for linear recurrences. My problem with this is that it gets rather messy and besides when solving for the initial terms one gets a fraction that is not well defined for all $x$.

I would therefore like to ask if there is an easier way to solve it or perhaps whats the proper way to apply the theory of linear recurrences.

Edit. The recurrence is indeed of second order.

Best Answer

Notice that the recurrence equation is constant coefficients, with respect to $n$. It can be solved using the generating function approach. Multiply both sides of the equation with $t^n$ and sum over $n\geqslant 2$: $$ \sum_{n=2}^\infty t^n p_{n+2} = -x \sum_{n=2}^\infty t^n p_{n+1} + \sum_{n=2}^\infty t^n p_{n-2} $$ Defining $g(t,x) = \sum_{n=0}^\infty t^n p_n(x)$ this translates into: $$ \frac{1}{t^2} \left( g(t,x) - p_0(x) -t p_1(x) -t^2 p_2(x) - t^3 p_3(x) \right) = -\frac{x}{t} \left(g(t,x)-p_0(x) - t p_1(x) - t^2 p_2(x) \right) + t^2 g(t,x) $$ giving: $$ g(t,x) = \frac{1+t x}{1+t x-t^4} \left( p_0(x) + t p_1(x) + t^2 p_2(x) \right) + \frac{t^3}{1+t x-t^4} p_3(x) $$ The general solution $p_n(x)$ is obtained by extracting series coefficient: $$ p_n(x) = [t]^n g(t,x) $$

Here is verification in Mathematica:

enter image description here

Related Question