Proving the exactness of the Runge-Kutta algorithm to the second order in step-size

This 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}.In summary, we can prove that y_{n+1} = y_n + \frac{k_1 + 2k_2 + 2k_3 + k_4}{6} 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{
  • #1
mjordan2nd
177
1

Homework Statement



We're supposed to prove that

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

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

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

Homework Equations



We can expand a function as follows:

[tex] g(x + \Delta x, y + \Delta y) = g(x,y) + \frac{\partial g}{\partial x} \Delta x + \frac{\partial g}{\partial y} \Delta y.[/tex]

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

[tex]\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}[/tex].

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.

[tex]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][/tex]
[tex] = 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][/tex]
[tex] = 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}[/tex]
 
Physics news on Phys.org
  • #2
\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].
 

1. How is the exactness of the Runge-Kutta algorithm to the second order in step-size determined?

The exactness of the Runge-Kutta algorithm to the second order in step-size is determined by comparing the calculated values to the exact values of the solution at each step. If the calculated values closely match the exact values, then the algorithm is considered exact to the second order in step-size.

2. What is the significance of proving the exactness of the Runge-Kutta algorithm to the second order in step-size?

Proving the exactness of the Runge-Kutta algorithm to the second order in step-size is important because it ensures the accuracy and reliability of the algorithm in solving differential equations. This allows for more precise and efficient calculations in scientific and engineering applications.

3. How is the second order in step-size determined in the Runge-Kutta algorithm?

The second order in step-size is determined by the number of terms used in the Taylor series expansion of the solution. In the case of the Runge-Kutta algorithm, the second order in step-size is achieved by using two terms in the Taylor series expansion.

4. Are there any limitations to the exactness of the Runge-Kutta algorithm to the second order in step-size?

Yes, there are limitations to the exactness of the Runge-Kutta algorithm to the second order in step-size. These limitations include the non-linear nature of some differential equations and the presence of rounding errors in the calculation process.

5. How does the exactness of the Runge-Kutta algorithm to the second order in step-size compare to other numerical methods for solving differential equations?

The exactness of the Runge-Kutta algorithm to the second order in step-size is considered to be relatively high compared to other numerical methods. However, there are other methods, such as the fourth-order Runge-Kutta method, that have even higher levels of exactness and are more commonly used in practical applications.

Similar threads

  • Advanced Physics Homework Help
Replies
5
Views
1K
  • Advanced Physics Homework Help
Replies
4
Views
463
  • Advanced Physics Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Advanced Physics Homework Help
Replies
2
Views
2K
  • Differential Equations
Replies
6
Views
3K
  • Differential Equations
Replies
3
Views
388
  • Programming and Computer Science
Replies
15
Views
2K
  • Advanced Physics Homework Help
Replies
4
Views
6K
  • Classical Physics
Replies
0
Views
147
Back
Top