Multiplying polynomials for a series. ODE related

I have an interesting ODE and it involves multiplying polynomials. I like if anyone could kindly confirm that I am correct

$y'' + e^x y = 0$

$y(0) = 1$

$y'(0) = 2$

The goal was to find a solution in a series, but we only want five terms

What I did was basically wrote out the expansion for $e^x$ and my solution and set the related coefficients to 0. Note that my solution takes the form $y = \sum_{n=0}^{\infty} a_n x^n$

I can't neatly write out my work here because my align is different from \begin{align}. SO I unfortunately can only give you my "conclusion" to my final results. Sorry for this one, it's just impossible to write it all out neatly. But I hope you would believe that I did it cleanly on paper

I managed to reduced it to these set of equations

$a_0 + 2a_2 = 1$

$a_0 + a_1 + 6a_3 = 0$

$a_0/2 + a_1 + a_2 + 20a_4 = 0$

Resolving all the unknowns (with IC), I got $a_0 = 1, a_1 = 2, a_2 = \frac{-1}{2}, a_3 = \frac{-1}{2},a_4 = \frac{-1}{10}$

Also, I actually got an extra set of equation from matching the $x^4$ terms: $a_0/6 + a_1/2 + a_2 + a_3 +30a_5 = 0$, but that turned out redundant and I don't understand why.

So in conclusion I got $y \approx 1 + 2x -\frac{x^2}{2} -\frac{1}{2}x^3 - \frac{1}{10}x^4$

Thank you very much for reading

I don't understand why you call the equation from $x^4$ redundant. It involves $a_5$, and could be used to find $a_5$ if we wanted to.

My approach: begin with $$y=1+2x+ax^2+bx^3+cx^4+O(x^5),$$ $$y''=2a+6bx+12cx^2+O(x^3)$$ Since we only know $y''$ up to 2nd order term, the expansion of $e^xy$ also needs to be only up to 2nd order. Namely, $$e^xy=(1+x+x^2/2+O(x^3))y=(1+2x+ax^2)+(x+2x^2)+x^2/2+O(x^3)\\ =1+3x+(a+5/2)x^2+O(x^3)$$ So, $2a+1=0$, $6b+3=0$, and $12c+a+5/2=0$. Solution: $a=-1/2$, $b=-1/2$, $c=-1/6$.

I have $-x^4/6$ where you have $-x^4/10$. Luckily for me, Maple 16 is on my side:

• No I am confused why we don't need it because I only want five terms, not to the fifth power. – Hawk Jun 22 '12 at 2:37
• @jak You want five terms; you already got 2 (namely 1 and 2x). So, you need to find three others. This means you need three equations: equating the coefficients of $x^0$, $x^1$, $x^2$ does the job. You notice I did not even need to equate the coefficient of $x^3$, let along $x^4$. This did not prevent me from finding the coefficients of $x^3$ and $x^4$ in the solution. Explanation: the second derivative moves the coefficients down the ladder by two notches. – user31373 Jun 22 '12 at 2:43

$y = \sum_{n=0}^{\infty} a_n x^n=\sum_{n=0}^{\infty} \frac{y^{(n)}(0)}{n!} x^n=y(0)+\frac{y'(0)}{1!}x+\frac{y''(0)}{2!}x^2+\frac{y'''(0)}{3!}x^3+...........$

$y'' + e^x y = 0$

$y''=- e^x y$ -----> $y''(0)=-y(0)=-1$

$y'''=- e^x (y+y')$ -----> $y'''(0)=-(y(0)+y'(0))=-3$

$y^{(4)}=- e^x (y+2y'+y'')= - e^x (y+2y')-e^xy''=- e^x (y+2y')+e^{2x}y=$

-----> $y^{(4)}(0)=-(y(0)+2y'(0))+y(0)=-4$

$y^{(5)}=- e^x (y+2y')- e^x (y'+2y'')+2e^{2x}y+e^{2x}y'=- e^x (y+3y')+ e^{2x}(4y+y')$

-----> $y^{(5)}(0)=-(y(0)+3y'(0))+(4y(0)+y')=-1$

$y = \sum_{n=0}^{\infty} a_n x^n=y(0)+\frac{y'(0)}{1!}x+\frac{y''(0)}{2!}x^2+\frac{y'''(0)}{3!}x^3+...........=1+2x-\frac{1}{2}x^2-\frac{1}{2}x^3-\frac{1}{6}x^4-\frac{1}{120}x^5+O(x^6)$