Problem:
Using a Taylor expansion for $ y(t+\Delta t) = y_{n+1} $ and $ y(t-\Delta t)=y_{n-1} $, derive an Euler-type formula for the future state of the system $ y' = f(y,t) $.
Solution:
The Taylor expansions are:
$ y_{n+1} = y(t + \Delta t) = y(t) + \Delta t \frac{dy}{dt}(t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_1) = y(t) + \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_1) $
$ y_{n-1} = y(t - \Delta t) = y(t) - \Delta t \frac{dy}{dt}(t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_2) = y(t) - \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_2) $
Now subtract the equations to get our answer
$ \begin{eqnarray*} y_{n+1} - y_{n-1} &=& (y(t) + \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_1)) - (y(t) - \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_2)) \\ &=& 2\Delta t f(y, t) + \frac{\Delta t^2}{2}(\frac{d^2y}{dt^2}(c_1) -\frac{d^2y}{dt^2}(c_2)) \\ y_{n+1} &=& y_{n-1} + 2\Delta t f(y, t) + \frac{\Delta t^2}{2}(\frac{d^2y}{dt^2}(c_1) -\frac{d^2y}{dt^2}(c_2)) \\ & \approx & y_{n-1} + 2\Delta t f(y, t) \end{eqnarray*} $
Using a Taylor expansion for $ y(t+\Delta t) = y_{n+1} $ and $ y(t-\Delta t)=y_{n-1} $, derive an Euler-type formula for the future state of the system $ y' = f(y,t) $.
Solution:
The Taylor expansions are:
$ y_{n+1} = y(t + \Delta t) = y(t) + \Delta t \frac{dy}{dt}(t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_1) = y(t) + \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_1) $
$ y_{n-1} = y(t - \Delta t) = y(t) - \Delta t \frac{dy}{dt}(t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_2) = y(t) - \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_2) $
Now subtract the equations to get our answer
$ \begin{eqnarray*} y_{n+1} - y_{n-1} &=& (y(t) + \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_1)) - (y(t) - \Delta t f(y, t) + \frac{\Delta t^2}{2} \frac{d^2y}{dt^2}(c_2)) \\ &=& 2\Delta t f(y, t) + \frac{\Delta t^2}{2}(\frac{d^2y}{dt^2}(c_1) -\frac{d^2y}{dt^2}(c_2)) \\ y_{n+1} &=& y_{n-1} + 2\Delta t f(y, t) + \frac{\Delta t^2}{2}(\frac{d^2y}{dt^2}(c_1) -\frac{d^2y}{dt^2}(c_2)) \\ & \approx & y_{n-1} + 2\Delta t f(y, t) \end{eqnarray*} $
No comments:
Post a Comment