# Find the polynomials P in R[X]

1. May 12, 2015

### geoffrey159

1. The problem statement, all variables and given/known data
Find the polynomials P in R[X] such that
$X(X+1) P'' +(X+2) P' -P = 0$​

2. Relevant equations
If P is a solution, I assume $P = \sum_{n=0}^N a_nX^n$

3. The attempt at a solution

I get the answer $\{\alpha (X+2),\alpha\in\mathbb{R}\}$, but I've done many calculation errors before getting it right.
Is there a way to solve that problem without too much calculation ?

Last edited: May 12, 2015
2. May 12, 2015

### Staff: Mentor

When you find a solution to a differential equation, the first thing you should do is to check your solution. Have you don't this?

BTW, what does the notation R[X] mean?

3. May 12, 2015

### RUber

Your answer does seem to work, but what is needed for higher order polynomials?

You might find it useful to use the form:
$P = \sum_{n=0}^N a_nX^n,\\ P' = \sum_{n=0}^{N-1} (n+1)a_{n+1}X^{n},\\ P'' = \sum_{n=0}^{N-2} (n+2)(n+1)a_{n+2}X^{n}$

4. May 12, 2015

### geoffrey159

Yes I checked that it works, after the calculations, I get something like (minus the errors :-))

$0 = 2a_1 - a_0 + (N^2 -1) a_N X^N + \sum_{n=1}^{N-1} ( (n^2-1)a_n + (n+1)(n+2) a_{n+1}) X^n$.

So if P has degree N, then N = 1 and $2a_1 = a_0$.

(R[X] : Polynomials of a single variable with real coefs)

5. May 12, 2015

### RUber

So, to do this quickly depends on your definition of quick.
$X(X+1) P'' +(X+2) P' -P = 0$

$P = \sum_{n=0}^N a_nX^n,\\ P' = \sum_{n=0}^{N-1} (n+1)a_{n+1}X^{n},\\ P'' = \sum_{n=0}^{N-2} (n+2)(n+1)a_{n+2}X^{n}$
Breaking apart the components:
$X^2 P'' +XP''+X P' +2P' - P = 0$
Gives:
$\sum_{n=0}^{N-2} (n+2)(n+1)a_{n+2}X^{n+2}\\ + \sum_{n=0}^{N-2} (n+2)(n+1)a_{n+2}X^{n+1}\\ + \sum_{n=0}^{N-1} (n+1)a_{n+1}X^{n+1}\\ +\sum_{n=0}^{N-1} 2(n+1)a_{n+1}X^{n}\\ -\sum_{n=0}^N a_nX^n =0$
Then, group all the terms by powers of X:
$X^N (N^2-N+N-1)a_N =0$
for n = 2 to N-1: $X^n [a_n(n^2-n+n-1) + a_{n+1}(n^2+n+2n+2)] = 0$
$X(2a_2+4a_2 +a_1-a_1)=0$
$1(2a_1-a_0 ) = 0$
Then it should be easy to see that for $N>1,a_N =0$ in order to push the highest order term to zero.
Quickly, you will see the solution collapse down to what you found.

I think that anytime you are playing around with indices on sums, it is easy to make mistakes...but I don't think it takes a tremendous amount of time or skill to gather exponents.

In fact, you could have just used the expansion for the highest order term to tell you that you could not have a solution of order 2 or greater, then the challenging stuff in the middle would be unnecessary.

6. May 12, 2015

### geoffrey159

Yes, that's a shortcut I could have used. And it is way more elegant. Thank you !

Last edited: May 12, 2015