# Differential equation by series solution method: equating coefficients to zero

I am following the solution for a problem, and I am stuck at the following equation:

$$2a_2+\sum_{n=1}^\infty \left[(n+2)(n+1)a_{n+2}-a_{n-1}\right]x^n=0\tag1$$

Now, the professor equates the coefficients to zero, and he gets:

$$n=0: a_2=0\tag2$$ $$n=1,2,3..: a_{n+2}=\frac{a_{n-1}}{(n+2)(n+1)}\tag3$$

The thing that confuses me is: If there is a term outside the summation sign, as we have here (I'm referring to the $2a_2$ term in equation 1), then equation 1 cannot ever be set to zero simply by having the coefficients of $x^n$ equal to zero, since that would merely make it equal to $2a_2$.

-
If we set for convenience that $a_{-1}=0$, then you can change the summation to start from $n=0$ and then $2a_2$ will be the $0$th term. Does that help you? – Your Ad Here Apr 12 '14 at 7:45

1. The summation sign starts at $n=1$ i.e. it doesn't contain constant term(I mean of the form $cx^0$)
2. $2a_2\cdot x^0=0\cdot x^0$
Now if we have the following equal polynomials $$a_0+a_1x+a_2x^2+\cdots=b_0+b_1x+b_2x^2+\cdots$$ then by equating coefficients of $x^n$ we get $$x^0:\ \ \ \ \ \ a_0=b_0 \\ x^1:\ \ \ \ \ \ a_1=b_1 \\ x^2:\ \ \ \ \ \ a_2=b_2$$ In your case the right hand sides are all zeros and so the first equation becomes $$2a_2=0$$ and the rest equations becomes $$(n+2)(n+1)a_{n+2}-a_{n-1}=0$$ for $n=1,2,3, \cdots$
I think I got it. n=1,2,3.. and upwards already invoke n=0, which is set to 0. In other words, $2a_2$ is the coefficient of $x^0$, and we have to set coefficients of all powers of $x$ equal to zero. – Joebevo Apr 12 '14 at 9:56