THQ Ch7

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Chapter 7 (Euler)

Take Home Quiz

Use the Euler’s method with h = 0.25 to solve from x = 0 to x = 1. It is known that y(0) = 1.

dy
= (1 + 2x)√y
dx
(a) Write the Euler's equation:
___________________________________________________

(b) At x0 = 0, y0 = ________

(c) Calculate f(x, y) = ________

(d) Calculate y1 = 1.25

(e) Repeat steps (b–d) to fill the following table.

i x y f(x, y) f(x,y)∙h
0 0 1
1 0.25 1.25
2 0.5 2.584
3 0.75
4 1 3.266
Chapter 7 (Runge–Kutta)
Take Home Quiz

Use the RK 4th method with h = 0.5 to solve from x = 0 to x = 1. It is known that y(0) = 1.

dy
= (1 + 2x)√y
dx
(a) Write the RK4th equation:

______________________________________________________________

(b) At x0 = 0, y0 = 1

(c) Calculate k1 =

(d) Calculate x + 0.5h =

(e) Calculate y + 0.5k1h =

(f) Calculate k2 =

(g) Calculate x + 0.5h =

(h) Calculate y + 0.5k2h =

(i) Calculate k3 =

(j) Calculate x + h =

(k) Calculate y + k3h =

(l) Calculate k4 =

(m) Calculate y1 =
(n) Repeat steps (b–m) to fill the table.

i x y k1 x + 0.5h y + 0.5k1h k2 x + 0.5h y + 0.5k2h k3 x+h y + k3h k4


0 0 1 1 0.25 0.25 2.752087
1 0.5 2.749556 0.75 4.252505 6.0122
2 1 3.99784

You might also like