online advertising
Loading [MathJax]/jax/output/HTML-CSS/jax.js

Saturday, November 21, 2015

Scientific Computing - Quiz 1 - Question 4

Problem:

Using a Taylor expansion for y(t+Δt)=yn+1 and y(tΔt)=yn1, derive an Euler-type formula for the future state of the system y=f(y,t).

Solution:

The Taylor expansions are:

yn+1=y(t+Δt)=y(t)+Δtdydt(t)+Δt22d2ydt2(c1)=y(t)+Δtf(y,t)+Δt22d2ydt2(c1)
yn1=y(tΔt)=y(t)Δtdydt(t)+Δt22d2ydt2(c2)=y(t)Δtf(y,t)+Δt22d2ydt2(c2)

Now subtract the equations to get our answer
yn+1yn1=(y(t)+Δtf(y,t)+Δt22d2ydt2(c1))(y(t)Δtf(y,t)+Δt22d2ydt2(c2))=2Δtf(y,t)+Δt22(d2ydt2(c1)d2ydt2(c2))yn+1=yn1+2Δtf(y,t)+Δt22(d2ydt2(c1)d2ydt2(c2))yn1+2Δtf(y,t)

No comments:

Post a Comment