Homework Help: A numerical solution of a second order ODE

1. Mar 26, 2015

manifold

• Member warned about posting with no template
Hello everyone; i'd like some help in this problem : i want to solve num this differential equation
{ y"(t)+t*cos(y)=y } by the Taylor method second order expansion. i first have to make this a first order differential equation by taking this vector Z=[y' y] then we have Z'=[y" y'] wich equal Z'=[y-t*cos(y) y'] and then I put w=y' after that I use the Taylor formulat w(n+1)=w(n)+h*[y(n)-t(n)*cos(y(n))]+h^2/2*[........] here i get confused. i must put the derivative of (y-t*cos(x)) over t and then over y... is it true that when I derive over t I must derive y too over t or w or i should consider them a constant.
then y(n+1)=y(n)+h*w(n)+h^2/2[d(w)/dt] here as well i don't know if that is true or not.

2. Mar 26, 2015

RUber

I think you only need to worry about differentiation with respect to t, right.
Use the chain rule for $t\cos(y(t))$.
$Z= \begin{bmatrix} y\\ y' \end{bmatrix}, Z' = \begin{bmatrix} y'\\ y'' \end{bmatrix}$
So what is Z''? (it should be solvable in terms of your other variables.
$Z(n+1) = Z(n) + hZ'(n) + \frac{h^2}{2}Z''$
This should be the first order system you solve.

3. Mar 26, 2015

manifold

here's what i found