A numerical solution of a second order ODE

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 1K views
manifold
Messages
3
Reaction score
0
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'] which 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.
 
Physics news on Phys.org
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.
 
Capture.PNG
here's what i found