Thread: Runge Kutta method - 2nd order numerically

1. Runge Kutta method - 2nd order numerically

I have the differential equation:

$x' = 1 + x^2$, where $x(0) = 1$

which I have to solve numerically. The problem is just that I don't understand how the method works, and it's hard to find any good explanations online.

I would really appriciate it if someone explained how to start, like how do you find $x_1$?

The equation is to be solved on the intevall [0; 0.6] using 6 steps, so that the steplenght is 0.1

2. Originally Posted by jenkki
I have the differential equation:

$x' = 1 + x^2$, where $x(0) = 1$

which I have to solve numerically. The problem is just that I don't understand how the method works, and it's hard to find any good explanations online.

I would really appriciate it if someone explained how to start, like how do you find $x_1$?

The equation is to be solved on the intevall [0; 0.6] using 6 steps, so that the steplenght is 0.1
You use the equation for the derivative at the initial point to step the solution forward by a half step. Now you use the solution at the half step to calculate the "typical" value of the derivative over the whole step and use this to step the solution forward a whole step from the initial point.

So in this case we have $x'=f(x)$, and we suppose we have the solution at $x_i$ (the initial conditions give us a starting point). We step forward a half step:

$x^*=x_i+(h/2)f(x_i)$

which gives us out "typical derivative on the step of $f(x^*)$.

Finally we do the step:

$x_{i+1}=x_i+h f(x^*)$

CB