0% found this document useful (0 votes)
24 views2 pages

Rung A

The document describes the Runge-Kutta method for numerically solving ordinary differential equations. It is an improvement on the Euler and modified Euler methods. The regular second-order Runge-Kutta method estimates the next value of y as the current value plus a weighted sum of two estimates of the change in y over a step h. Higher-order Runge-Kutta methods use more estimates. The 4th-order method uses 4 estimates weighted differently. An example applies the 4th-order method to the equation y'=-2x-y, showing it accurately estimates the solution over steps of h=0.1.

Uploaded by

sujith477
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Rung A

The document describes the Runge-Kutta method for numerically solving ordinary differential equations. It is an improvement on the Euler and modified Euler methods. The regular second-order Runge-Kutta method estimates the next value of y as the current value plus a weighted sum of two estimates of the change in y over a step h. Higher-order Runge-Kutta methods use more estimates. The 4th-order method uses 4 estimates weighted differently. An example applies the 4th-order method to the equation y'=-2x-y, showing it accurately estimates the solution over steps of h=0.1.

Uploaded by

sujith477
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Runga-Kutta

(Taylor’s Methods)
Numerical Solution of ODEs

Improvement on Euler and Euler-Modified

Equation Type: y’ = f(x, y)

Runge-Kutta Method (Regular Second-Order):


yn+1 = yn + ak1 + bk2
k1 = hf(xn, yn)
k2 = hf(xn + ah, yn + bk1)

We choose a, b, a, b carefully. We can choose them to be such that


a + b = 1, ab = ½, bb = ½
If we choose arbitrarily a = 2/3, we have b = 1/3, a = 3/2, b = 3/2, which agrees with
Taylor-series expansion.
We can also choose a = ½, b = ½, a = 1, b = 1 which gives modified Euler.

Idea of Runge-Kutta:
We can think of the values k1 and k2 as estimates of the change in y when x
advances by h, because they are the product of the change in x and a value for the slope
of the curve, y’.

The Runge-Kutta methods always use the simple Euler estimate as the first estimate of h.

4th Order Runge-Kutta:


yn+1 = yn + 1/6(k1 + 2k2 + 2k3 + k4)
k1 = hf(xn, yn)
k2 = hf(xn + ½h, yn + ½k1)
k3 = hf(xn + ½h, yn + ½k2)
k4 = hf(xn + h, yn + k3)

Prepared by Tracy Hammond, [email protected], 12/07/21


4th Order Runge-Kutta Example:
Some solutions to y’ = -2x –y, y(0) = -1 with h = 0.1
xn = 0.0
yn = -1
k1 = .1
k2 = .0850
k3 = .0858
k4 = .0714
xn = 0.1
yn = -.9145
k1 = .0715
k2 = .0579
k3 = .0586
k4 = .0456
xn = 0.2
yn = -.8562
k1 = .0456
k2 = .0333
k3 = .0340
k4 = .0222
xn = 0.3
yn = -.8225
k1 = .0222
k2 = .0111
k3 = .0117
k4 = .0011
xn = 0.4
yn = -.8110
k1 = .0011
k2 = -.0090
k3 = -.0085
k4 = -.0181
xn = 0.5
yn = -.81959
Real value y(0.5) = -.82959) – very good accuracy!!

Prepared by Tracy Hammond, [email protected], 12/07/21

You might also like