Is the Runge-Kutta Algorithm Equivalent to the Second-Order Taylor Expansion?

Click For Summary
SUMMARY

The discussion confirms that the Runge-Kutta algorithm, specifically the fourth-order method, is equivalent to the second-order Taylor expansion for approximating solutions to ordinary differential equations. The equations provided detail the calculations for k1, k2, k3, and k4, demonstrating how they relate to the Taylor series expansion. The final expression shows that the weighted sum of these k-values yields the same result as the second-order Taylor expansion, validating the equivalence mathematically.

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with numerical methods, particularly the Runge-Kutta method
  • Knowledge of Taylor series expansions and derivatives
  • Basic proficiency in calculus, including partial derivatives
NEXT STEPS
  • Study the derivation of the Runge-Kutta method for higher-order approximations
  • Explore the application of Runge-Kutta methods in solving real-world ODEs
  • Learn about error analysis in numerical methods, focusing on Runge-Kutta
  • Investigate alternative numerical methods for solving ODEs, such as Adams-Bashforth
USEFUL FOR

Students and professionals in mathematics, engineering, and computer science who are involved in numerical analysis and the solution of differential equations will benefit from this discussion.

mjordan2nd
Messages
173
Reaction score
1

Homework Statement



We're supposed to prove that

y_{n+1} = y_n + \frac{k_1 + 2k_2 + 2k_3 + k_4}{6}
k_1 = hf(t_n, y_n)
k_2 = hf(t_n + \frac{h}{2}, y_n + \frac{k_1}{2})
k_3 = hf(t_n + \frac{h}{2}, y_n + \frac{k_2}{2})
k_4 = hf(t_n + h, y_n + k_3)
f(t, y) = \frac{dy}{dt}

is equivalent to the Taylor expansion up to the second order in step size, h:

y_{n+1} = y_n + h \frac{dy}{dt} + \frac{1}{2} h^2 \frac{d^2 y}{dt^2}.

Homework Equations



We can expand a function as follows:

g(x + \Delta x, y + \Delta y) = g(x,y) + \frac{\partial g}{\partial x} \Delta x + \frac{\partial g}{\partial y} \Delta y.

Also, we can write the second time derivative of y as follows:

\frac{d^2 y}{dt^2} = \frac{df}{dt} = \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial t} = \frac{\partial f}{\partial y} f(t,y) + \frac{\partial f}{\partial t}.

The Attempt at a Solution



I will use these above equations to expand k2, k3, and k4. I will show all of my work for k2, and state my results for k3 and k4 since they are calculated similarly.

k_2 = h \left[ f(t_n, y_n) + \frac{df}{dt} \bigg|_n \frac{h}{2} + \frac{df}{dy} \bigg_n h \frac{f(t_n, y_n)}{2} \right]
= h \left[f(t_n, y_n) + \left( \frac{\partial f}{\partial y} \frac{dy}{dt} + \frac{\partial f}{\partial t} \right)_n \frac{h}{2} + \frac{\partial f}{\partial y} \bigg|_n h \frac{f(t_n, y_n)}{2} \right]
= h \left[ f(t_n, y_n) + \frac{df}{dy} f(t_n, y_n) \bigg_n h + \frac{h}{2} \frac{\partial f}{\partial t}
 
Physics news on Phys.org
\bigg|_n + \frac{\partial f}{\partial y} \bigg|_n h \frac{f(t_n, y_n)}{2} \right]For k3, we havek_3 = h \left[ f(t_n, y_n) + \frac{df}{dy} f(t_n + \frac{h}{2}, y_n + \frac{k_1}{2}) \bigg|_n h + \frac{h}{2} \frac{\partial f}{\partial t} \bigg|_n + \frac{\partial f}{\partial y} \bigg|_n h \frac{f(t_n + \frac{h}{2}, y_n + \frac{k_1}{2})}{2} \right]And for k4, we havek_4 = h \left[ f(t_n, y_n) + \frac{df}{dy} f(t_n + h, y_n + k_3) \bigg|_n h + \frac{h}{2} \frac{\partial f}{\partial t} \bigg|_n + \frac{\partial f}{\partial y} \bigg|_n h \frac{f(t_n + h, y_n + k_3)}{2} \right]Now, we add these three equations together and multiply by 6. We get 6(y_{n+1} - y_n) = h \left[ 6f(t_n, y_n) + 2 \frac{df}{dy} f(t_n, y_n) \bigg|_n h + 3\frac{h}{2} \frac{\partial f}{\partial t} \bigg|_n + \frac{\partial f}{\partial y} \bigg|_n h \left(3f(t_n, y_n) + f(t_n + \frac{h}{2}, y_n + \frac{k_1}{2}) + f(t_n + h, y_n + k_3) \right) \right].
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K