Fourth-order Runge–Kutta method? =(

  • #1
Hey guys, I'm a sophomore in a random engineering school, and just after I was finally getting used to the new school year, my professor decided to give us a little assignment about the 4th order Runge-Kutta methods..... and I am totally stuck, and I just don't understand the concept at all..

The assignment is,
(x)`=x^3, and the initial value is x(0) = 1

I'm supposed to compute x(t) for two steps, when x(0.1) and when x(0.2)
and Lastly, I'm to compare this to the Euler's method.

I've been staring at my book for hours, and it says stuff like k and h and n+1 and stuff like that.. Can anyone shed some light into this weird method? The assignment seems simpler than most of the examples I found on the internet but I still can't quite get it..

Thanks in advance =)
 

Answers and Replies

  • #2
783
9
RK-4 is a numerical method to solve ordinary differential equations. There are 4 k values that have to be computed. Hence the 4 in the name of the method.

h is the step size.

The subscript n+1 is the next step.

The step size can help to control the accuracy of the solution. The smaller the step the more accurate the result will be, up to a certain point.

Euler's method is the most simplistic of numerical methods to solve ODEs. It is not used to solve ODEs in the real world because it is not accurate enough. But it is taught because it is the easiest to understand.

However, you have a simple seperable ODE, so just solve it subject to the initial values to find the analytic solution. Use that as a check against your RK-4 and Euler solution. Also, you can gauge the % error once you have both the analytic and numerical approximation to it.

My ODE book is in my office so if you haven't figured it by Monday, I can give you some good examples.

Thanks
Matt
 
  • #3
D H
Staff Emeritus
Science Advisor
Insights Author
15,393
683
First, do you understand Euler's method?

One way to think of RK4 is that it consists of four Euler steps. The first step is particularly easy: It *is* an Euler step, with a step size equal to half of the overall interval. The second step is also a half step, but instead of using the derivative at the starting point you use the derivative at the end of the first step. The third and fourth steps are full steps. For the third step you use the derivative at the end of the second step, and for the fourth step you use a weighted average of the derivatives.
 

Related Threads on Fourth-order Runge–Kutta method? =(

  • Last Post
Replies
2
Views
2K
Replies
0
Views
8K
  • Last Post
Replies
1
Views
4K
Replies
1
Views
3K
  • Last Post
Replies
8
Views
2K
Replies
5
Views
2K
Replies
14
Views
800
Replies
6
Views
1K
Replies
2
Views
2K
Replies
0
Views
954
Top