# Thread: Trying to express a solution as a series

1. ## Trying to express a solution as a series

Hello everyone!

I'm trying to practice on the numerous steps one has to follow to obtain a power series solution so I tried to solve the simple ODE
$(E): y''-2y'+y=0$ whos solutions are very well known to be $y_1=e^x$ and $y_2=x\cdot e^x$.

Happily, I laid down the buliding blocks substituting in $(E), \ y=\sum_{n=0}^\infty c_n \dot x^n$ and, after reindexing and grouping of terms, got the following recurrence relation:
$c_{k+2}=\frac{2(k+1) c_{k+1}-c_k}{(k+2)(k+1)}$.
Okay, I tried to continue by assuming once, that $c_0 = 0$ and again $c_1=0$ but I got no pattern at all, I was expecting something familiar - a taylor series expansion at 0.

Question: (1) When to consider 2 cases, a null $c_0$ and a real $c_1$ and the opposite.
(2) Why didn't I get a pattern?

Thanks!

2. Originally Posted by rebghb
Hello everyone!

I'm trying to practice on the numerous steps one has to follow to obtain a power series solution so I tried to solve the simple ODE
$(E): y''-2y'+y=0$ whos solutions are very well known to be $y_1=e^x$ and $y_2=x\cdot e^x$.

Happily, I laid down the buliding blocks substituting in $(E), \ y=\sum_{n=0}^\infty c_n \dot x^n$ and, after reindexing and grouping of terms, got the following recurrence relation:
$c_{k+2}=\frac{2(k+1) c_{k+1}-c_k}{(k+2)(k+1)}$.
Okay, I tried to continue by assuming once, that $c_0 = 0$ and again $c_1=0$ but I got no pattern at all, I was expecting something familiar - a taylor series expansion at 0.

Question: (1) When to consider 2 cases, a null $c_0$ and a real $c_1$ and the opposite.
(2) Why didn't I get a pattern?

Thanks!
As for a pattern, you actually do. Let me write out the first few terms

\begin{aligned}
c_2 &= c_1 - \frac{c_0}{2},\\
c_3 &= \frac{c_1}{2} - \frac{c_0}{3},\\
c_4 &= \frac{c_1}{3!} - \frac{c_0}{8},\\
c_5 &= \frac{c_1}{4!} - \frac{c_0}{30}.
\end{aligned}

Setting $c_0 = 0$ and $c_1 = 1$ gives

$
x + \frac{x^2}{1} + \frac{x^3}{2!} + \frac{x^4}{3!} + \cdots

$

or

$
x\left(1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} \cdots \right)
$
(look familar?)

Setting $c_0 = 1$ and $c_1 = 0$ gives

$
1 - \frac{x^2}{2} - \frac{x^3}{3} - \frac{x^4}{8} - \frac{x^5}{30} - \cdots
$

which, our course, doesn't look familar. So, what happened? Remember in this case, your series solution should recover

$
(ax+b)e^x
$

for suitable choices of $a$ and $b$. For example, try a Taylor series for

$(1-x)e^x$ and see what you get.

3. Oh dear God how one earth did you get that, I was searching for something like that (duh) but I got nowhere ... Thanks!!