# Should I use Taylor Expansion or the expansion of $e^x$ to express a second order differential (in this case)

I've been given this equation:

$(1+x^2)\dfrac{d^2y}{dx^2} + 4x\dfrac{dy}{dx} + 2y = 0$

I've also been told that:

$y=1, \dfrac{dy}{dx} = 1$, at $x=-1$

I've been asked to find a series solution of the differential equation in ascending powers of $(x+1)$ up to and including the term in $(x+1)^4$

I've managed to do this in two different ways but they give different answers so I can only assume that one of them is wrong. However I can't see the mistake I've made in either; I'm not too sure whether it's lack of understanding or just a calculation error.

I hope you don't mind if I attach a picture of the working I've done by hand as it would take quite some time to write it all out in Latex, however I can do that if the picture's aren't clear enough.

Method 1:

Method 2:

Thank you :)

Your first method appears correct. Here's a walk-through of the solution for posterity, then I'll try and address the error in the second method.

You have (for $x = -1$) that $y = 1$, $y' = 1$, and then you correctly calculate

$$(1 + (-1)^2)\left.\frac{d^2 y}{d x^2}\right|_{x=-1} + 4(-1)\left.\frac{d y}{d x}\right|_{x=-1} + 2y(1) = 0$$ so $$2\left.\frac{d^2 y}{d x^2}\right|_{x=-1} -4 + 2 = 0$$ thus $$\left.\frac{d^2 y}{d x^2}\right|_{x=-1} = 1.$$

Now, we want to differentiate to get an identity for $\left.\frac{d^3 y}{d x^3}\right|_{x=-1}$.

Note here that the derivative with respect to $x$ of $(1 + x^2)y''$ is not simply $(1 + x^2)y'''$, it is $$(1 + x^2)'y'' + (1+x^2)y''' = 2xy'' + (1 + x^2)y'''$$ so after correctly differentiating the original equation, you should have $$2xy'' + (1 + x^2)y''' + 4y' + 4xy'' + 2y' = 0.$$ Now you can evaluate at $x= -1$, since you know $y(-1), y'(-1), y''(-1)$ (they're all equal to $1$, coincidentally) and solve for $y'''(-1)$: $$-2 + 2y''' + 4 - 4 + 2 = 0$$ so $y'''(-1) = 0$.

Now we just have to repeat the process:

$$2y'' + 2xy''' + 2xy''' + (1 + x^2)y'''' + 4y'' + 4y'' + 4xy''' + 2y'' = 0.$$

and plug-in what you know for $x,y,y',y'',y'''$.

The problem with the second method is basically that you're confusing $\frac{d y}{d x}$ (a function) and $\left.\frac{d y}{d x}\right|_{x=-1}$ (a value). That is, once you plug in what you know about $x,y,y'$, you are looking at an equation about specific values of $y',y''$, etc. and not a valid differential equation for $y$. (so you shouldn't try to "solve" it by guessing $y = e^{mx}$)

• Ahh, okay, thank you. That's why my second method doesn't work :) that makes sense. Also, sorry, but I think my first method is correct; I just grouped the terms for the first and second order differentials together. Unless I'm missing something? Thanks again for your help :) Commented Feb 13, 2014 at 20:09
• Yeah, I wrote the response, then realized your first method is correct - so if you read my answer before I edited it, it's probably confusing. Sorry about that. Commented Feb 13, 2014 at 20:14
• Ahh, okay, thanks for letting me know :) Commented Feb 13, 2014 at 20:16