Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

3.3.1: The Runge-Kutta Method (Exercises)

( \newcommand{\kernel}{\mathrm{null}\,}\)

Most of the following numerical exercises involve initial value problems considered in the exercises in Sections 3.2. Youโ€™ll find it instructive to compare the results that you obtain here with the corresponding results that you obtained in those sections.

Q3.3.1

In Exercises 3.3.1 -3.3.5 use the Runge-Kutta method to find approximate values of the solution of the given initial value problem at the points ๐‘ฅ๐‘– =๐‘ฅ0 +๐‘–โขโ„Ž, where ๐‘ฅ0 is the point where the initial condition is imposed and ๐‘– =1, 2.

1. ๐‘ฆโ€ฒ =2โข๐‘ฅ2 +3โข๐‘ฆ2 โˆ’2, ๐‘ฆโก(2) =1; โ„Ž =0.05

2. ๐‘ฆโ€ฒ =๐‘ฆ +โˆš๐‘ฅ2+๐‘ฆ2, ๐‘ฆโก(0) =1; โ„Ž =0.1

3. ๐‘ฆโ€ฒ +3โข๐‘ฆ =๐‘ฅ2 โˆ’3โข๐‘ฅโข๐‘ฆ +๐‘ฆ2, ๐‘ฆโก(0) =2; โ„Ž =0.05

4. ๐‘ฆโ€ฒ =1+๐‘ฅ1โˆ’๐‘ฆ2, ๐‘ฆโก(2) =3; โ„Ž =0.1

5. ๐‘ฆโ€ฒ +๐‘ฅ2โข๐‘ฆ =sinโก๐‘ฅโข๐‘ฆ, ๐‘ฆโก(1) =๐œ‹; โ„Ž =0.2

Q3.3.2

6. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of the initial value problem

๐‘ฆโ€ฒ+3โข๐‘ฆ=7โข๐‘’4โข๐‘ฅ,๐‘ฆโก(0)=2,

at ๐‘ฅ =0, 0.1, 0.2, 0.3, โ€ฆ, 1.0. Compare these approximate values with the values of the exact solution ๐‘ฆ =๐‘’4โข๐‘ฅ +๐‘’โˆ’3โข๐‘ฅ, which can be obtained by the method of Section 2.1. Present your results in a table like Table 3.3.1.

7. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of the initial value problem

๐‘ฆโ€ฒ+2๐‘ฅโข๐‘ฆ=3๐‘ฅ3+1,๐‘ฆโก(1)=1

at ๐‘ฅ =1.0, 1.1, 1.2, 1.3, โ€ฆ, 2.0. Compare these approximate values with the values of the exact solution

๐‘ฆ=13โข๐‘ฅ2โข(9โขlnโก๐‘ฅ+๐‘ฅ3+2),

which can be obtained by the method of Section 2.1. Present your results in a table like Table 3.3.1.

8. Use the Runge-Kutta method with step sizes โ„Ž =0.05, โ„Ž =0.025, and โ„Ž =0.0125 to find approximate values of the solution of the initial value problem

๐‘ฆโ€ฒ=๐‘ฆ2+๐‘ฅโข๐‘ฆโˆ’๐‘ฅ2๐‘ฅ2,๐‘ฆโก(1)=2

at ๐‘ฅ =1.0, 1.05, 1.10, 1.15 โ€ฆ, 1.5. Compare these approximate values with the values of the exact solution

๐‘ฆ=๐‘ฅโข(1+๐‘ฅ2/3)1โˆ’๐‘ฅ2/3,

which was obtained in Example

Example 3.3E.1 :

Add text here. For the automatic number to work, you need to add the โ€œAutoNumโ€ template (preferably at 2.2.3}. Present your results in a table like Table 3.3.1.

9. In Example

Example 3.3E.1 :

Add text here. For the automatic number to work, you need to add the โ€œAutoNumโ€ template (preferably at 2.2.3} it was shown that

๐‘ฆ5+๐‘ฆ=๐‘ฅ2+๐‘ฅโˆ’4

is an implicit solution of the initial value problem

๐‘ฆโ€ฒ=2โข๐‘ฅ+15โข๐‘ฆ4+1,๐‘ฆโก(2)=1.(A)

Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of (A) at ๐‘ฅ =2.0, 2.1, 2.2, 2.3, โ€ฆ, 3.0. Present your results in tabular form. To check the error in these approximate values, construct another table of values of the residual

๐‘…โก(๐‘ฅ,๐‘ฆ)=๐‘ฆ5+๐‘ฆโˆ’๐‘ฅ2โˆ’๐‘ฅ+4

for each value of (๐‘ฅ,๐‘ฆ) appearing in the first table.

10. You can see from Example

Example 3.3E.1 :

Add text here. For the automatic number to work, you need to add the โ€œAutoNumโ€ template (preferably at 2.5.1} that

๐‘ฅ4โข๐‘ฆ3+๐‘ฅ2โข๐‘ฆ5+2โข๐‘ฅโข๐‘ฆ=4

is an implicit solution of the initial value problem

๐‘ฆโ€ฒ=โˆ’4โข๐‘ฅ3โข๐‘ฆ3+2โข๐‘ฅโข๐‘ฆ5+2โข๐‘ฆ3โข๐‘ฅ4โข๐‘ฆ2+5โข๐‘ฅ2โข๐‘ฆ4+2โข๐‘ฅ,๐‘ฆโก(1)=1.(A)

Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of (A) at ๐‘ฅ =1.0, 1.1, 1.2, 1.3, โ€ฆ, 2.0. Present your results in tabular form. To check the error in these approximate values, construct another table of values of the residual

๐‘…โก(๐‘ฅ,๐‘ฆ)=๐‘ฅ4โข๐‘ฆ3+๐‘ฅ2โข๐‘ฆ5+2โข๐‘ฅโข๐‘ฆโˆ’4

for each value of (๐‘ฅ,๐‘ฆ) appearing in the first table.

11. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of the initial value problem

(3โข๐‘ฆ2+4โข๐‘ฆ)โข๐‘ฆโ€ฒ+2โข๐‘ฅ+cosโก๐‘ฅ=0,๐‘ฆโก(0)=1(Exercise 2.2.13)

at ๐‘ฅ =0, 0.1, 0.2, 0.3, โ€ฆ, 1.0.

12. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of the initial value problem

๐‘ฆโ€ฒ+(๐‘ฆ+1)โข(๐‘ฆโˆ’1)โข(๐‘ฆโˆ’2)๐‘ฅ+1=0,๐‘ฆโก(1)=0(Exercise 2.2.14)

at ๐‘ฅ =1.0, 1.1, 1.2, 1.3, โ€ฆ, 2.0.

13. Use the Runge-Kutta method and the Runge-Kutta semilinear method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of the initial value problem

๐‘ฆโ€ฒ+3โข๐‘ฆ=๐‘’โˆ’3โข๐‘ฅโข(1โˆ’4โข๐‘ฅ+3โข๐‘ฅ2โˆ’4โข๐‘ฅ3),๐‘ฆโก(0)=โˆ’3

at ๐‘ฅ =0, 0.1, 0.2, 0.3, โ€ฆ, 1.0. Compare these approximate values with the values of the exact solution ๐‘ฆ =โˆ’๐‘’โˆ’3โข๐‘ฅโข(3 โˆ’๐‘ฅ +2โข๐‘ฅ2 โˆ’๐‘ฅ3 +๐‘ฅ4), which can be obtained by the method of Section 2.1. Do you notice anything special about the results? Explain.

Q3.3.3

The linear initial value problems in Exercises 3.3.14โ€“3.3.19 canโ€™t be solved exactly in terms of known elementary functions. In each exercise use the Runge-Kutta and the Runge-Kutta semilinear methods with the indicated step sizes to find approximate values of the solution of the given initial value problem at 11 equally spaced points (including the endpoints) in the interval.

14. ๐‘ฆโ€ฒ โˆ’2โข๐‘ฆ =11+๐‘ฅ2, ๐‘ฆโก(2) =2; โ€† โ„Ž =0.1,0.05,0.025 on [2,3]

15. ๐‘ฆโ€ฒ +2โข๐‘ฅโข๐‘ฆ =๐‘ฅ2, ๐‘ฆโก(0) =3; โ„Ž =0.2,0.1,0.05 on [0,2] (Exercise 2.1.38)

16. ๐‘ฆโ€ฒ+1๐‘ฅโข๐‘ฆ=sinโก๐‘ฅ๐‘ฅ2,๐‘ฆโก(1)=2; โ„Ž =0.2,0.1,0.05 on [1,3] (Exercise 2.1.39)

17. ๐‘ฆโ€ฒ+๐‘ฆ=๐‘’โˆ’๐‘ฅโขtanโก๐‘ฅ๐‘ฅ,๐‘ฆโก(1)=0; โ„Ž =0.05,0.025,0.0125 on [1,1.5] (Exercise 2.1.40)

18. ๐‘ฆโ€ฒ+2โข๐‘ฅ1+๐‘ฅ2โข๐‘ฆ=๐‘’๐‘ฅ(1+๐‘ฅ2)2,๐‘ฆโก(0)=1; โ„Ž =0.2,0.1,0.05 on [0,2] (Exercise 2.1.41)

19. ๐‘ฅโข๐‘ฆโ€ฒ +(๐‘ฅ +1)โข๐‘ฆ =๐‘’๐‘ฅ2, ๐‘ฆโก(1) =2; โ„Ž =0.05,0.025,0.0125 on [1,1.5] (Exercise 2.1.42)

Q3.3.4

In Exercises 3.3.20โ€“3.3.22 use the Runge-Kutta method and the Runge-Kutta semilinear method with the indicated step sizes to find approximate values of the solution of the given initial value problem at 11 equally spaced points (including the endpoints) in the interval.

20. ๐‘ฆโ€ฒ +3โข๐‘ฆ =๐‘ฅโข๐‘ฆ2โก(๐‘ฆ +1), ๐‘ฆโก(0) =1; โ€† โ„Ž =0.1,0.05,0.025 on [0,1]

21. ๐‘ฆโ€ฒโˆ’4โข๐‘ฆ=๐‘ฅ๐‘ฆ2โก(๐‘ฆ+1),๐‘ฆโก(0)=1; โ€† โ„Ž =0.1,0.05,0.025 on [0,1]

22. ๐‘ฆโ€ฒ+2โข๐‘ฆ=๐‘ฅ21+๐‘ฆ2,๐‘ฆโก(2)=1; โ€† โ„Ž =0.1,0.05,0.025 on [2,3]

Q3.3.5

23. Suppose ๐‘Ž <๐‘ฅ0, so that โˆ’๐‘ฅ0 <โˆ’๐‘Ž. Use the chain rule to show that if ๐‘ง is a solution of

๐‘งโ€ฒ=โˆ’๐‘“โก(โˆ’๐‘ฅ,๐‘ง),๐‘งโก(โˆ’๐‘ฅ0)=๐‘ฆ0,

on [โˆ’๐‘ฅ0,โˆ’๐‘Ž], then ๐‘ฆ =๐‘งโก(โˆ’๐‘ฅ) is a solution of

๐‘ฆโ€ฒ=๐‘“โก(๐‘ฅ,๐‘ฆ),๐‘ฆโก(๐‘ฅ0)=๐‘ฆ0,

on [๐‘Ž,๐‘ฅ0].

24. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of

๐‘ฆโ€ฒ=๐‘ฆ2+๐‘ฅโข๐‘ฆโˆ’๐‘ฅ2๐‘ฅ2,๐‘ฆโก(2)=โˆ’1

at ๐‘ฅ =1.1, 1.2, 1.3, โ€ฆ2.0. Compare these approximate values with the values of the exact solution

๐‘ฆ=๐‘ฅโข(4โˆ’3โข๐‘ฅ2)4+3โข๐‘ฅ2,

which can be obtained by referring to Example

Example 3.3E.1 :

Add text here. For the automatic number to work, you need to add the โ€œAutoNumโ€ template (preferably at 2.4.3}.

25. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of

๐‘ฆโ€ฒ=โˆ’๐‘ฅ2โข๐‘ฆโˆ’๐‘ฅโข๐‘ฆ2,๐‘ฆโก(1)=1

at ๐‘ฅ =0, 0.1, 0.2, โ€ฆ, 1.

26. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of

๐‘ฆโ€ฒ+1๐‘ฅโข๐‘ฆ=7๐‘ฅ2+3,๐‘ฆโก(1)=32

at ๐‘ฅ =0.5, 0.6,โ€ฆ, 1.5. Compare these approximate values with the values of the exact solution

๐‘ฆ=7โขlnโก๐‘ฅ๐‘ฅ+3โข๐‘ฅ2,

which can be obtained by the method discussed in Section 2.1.

27. Use the Runge-Kutta method with step sizes โ„Ž =0.1, โ„Ž =0.05, and โ„Ž =0.025 to find approximate values of the solution of

๐‘ฅโข๐‘ฆโ€ฒ+2โข๐‘ฆ=8โข๐‘ฅ2,๐‘ฆโก(2)=5

at ๐‘ฅ =1.0, 1.1, 1.2, โ€ฆ, 3.0. Compare these approximate values with the values of the exact solution

๐‘ฆ=2โข๐‘ฅ2โˆ’12๐‘ฅ2,

which can be obtained by the method discussed in Section 2.1.

28. Numerical Quadrature (see Exercise 3.1.23).

a. Derive the quadrature formula

โˆซ๐‘๐‘Ž๐‘“โก(๐‘ฅ)๐‘‘๐‘ฅโ‰ˆโ„Ž6โข(๐‘“โก(๐‘Ž)+๐‘“โก(๐‘))+โ„Ž3โข๐‘›โˆ’1โˆ‘๐‘–=1๐‘“โก(๐‘Ž+๐‘–โขโ„Ž)+2โขโ„Ž3โข๐‘›โˆ‘๐‘–=1๐‘“โก(๐‘Ž+(2โข๐‘–โˆ’1)โขโ„Žโก/2)(A)

(where โ„Ž =(๐‘ โˆ’๐‘Ž)/๐‘›) by applying the Runge-Kutta method to the initial value problem

๐‘ฆโ€ฒ=๐‘“โก(๐‘ฅ),๐‘ฆโก(๐‘Ž)=0.

This quadrature formula is called Simpsonโ€™s Rule.

b. For several choices of ๐‘Ž, ๐‘, ๐ด, ๐ต, ๐ถ, and ๐ท apply (A) to ๐‘“โก(๐‘ฅ) =๐ด +๐ตโข๐‘ฅ +๐ถโข๐‘ฅ +๐ทโข๐‘ฅ3, with ๐‘› =10, 20, 40, 80, 160, 320. Compare your results with the exact answers and explain what you find.

c. For several choices of ๐‘Ž, ๐‘, ๐ด, ๐ต, ๐ถ, ๐ท, and ๐ธ apply (A) to ๐‘“โก(๐‘ฅ) =๐ด +๐ตโข๐‘ฅ +๐ถโข๐‘ฅ2 +๐ทโข๐‘ฅ3 +๐ธโข๐‘ฅ4, with ๐‘› =10,20,40,80,160,320. Compare your results with the exact answers and explain what you find.


This page titled 3.3.1: The Runge-Kutta Method (Exercises) is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by William F. Trench.

Support Center

How can we help?