# Taylors series for simple ODE

1. Jul 16, 2012

### LaxeyT

1. The problem statement, all variables and given/known data
Find the Taylor expansion y(x) satisfying: y'(x) = 1 - xy

2. Relevant equations

3. The attempt at a solution

So I need expressions for y''(x), y'''(x), ...etc

I can find y''(x)=-y-xy' by differentiating implicitly.
By setting y'(x)=z, then dz/dx = δz/δx+(δz/δy)(dy/dx)

However when I use the same method to try and find y'''(x) I have problems:
- partial differential of y'(x) ?
- is the (dy/dx) from the implicit formula still dy/dx or the second differential?

[Ans: -2y'-xy'']

Please tell me the technique, or give me a reference, that is used to find y'''(x) in this example?

Thanks!

2. Jul 16, 2012

### Mute

I'm slightly confused as to what you are trying to do. If your goal is to find a Taylor series expansion for y(x), you should assume it has the form

$$y(x) = \sum_{n=0}^\infty \frac{a_n}{n!}x^n,$$
where the factor of 1/n! is just conventional because it makes $a_n = y^{(n)}(0)$.

You then plug that into the differential equation, and since everything has to be zero you can work out a recurrence relation for an, which you can then try to solve.

Your approach seems to be to try to compute the $y^{(n)}(0)$ by repeatedly differentiating the differential equation. You could do it this way, but it won't get you the full recurrence relation for the derivatives at x = 0.

To do it your way, you don't need any implicit differentiation or even the chain rule, just the product rule. $y'(x)$ is just $dy/dx$, so if you differentiate your differential equation, you just have

$$\frac{d^2 y}{dx^2} = -x \frac{dy}{dx} - y.$$

You could then set x = 0 to get y"(0) = -y(0) (i.e., a2 = -a0).

To get the third derivative you would just differentiate this equation directly again (with x arbitrary! Don't try to differentiate the equation with x = 0), since d(y''(x))/dx = y'''(x), and so on.

3. Jul 16, 2012

### LCKurtz

Putting z in there just confuses things
$$y'=1-xy$$ $$y'' =-y -xy' = -y-x(1-xy)=-y-x+x^2y$$ $$y'''=-y'-1+2xy+x^2y' = -(1-xy)-1+2xy- x^2(1-xy)=-1+xy-1+2xy-x^2+x^3y=-2+3xy-x^2+x^3y$$

4. Jul 16, 2012

### LaxeyT

Yes thanks, quite straightforward really.
Just reading my notes from a few year's ago.

thanks