This document summarizes key concepts from Chapter 2 of the textbook "Differential Equations & Linear Algebra". It discusses several numerical methods for approximating solutions to differential equations, including Euler's method, modified Euler's method, and the 4th order Runge-Kutta method. For each method, it provides the basic formulation, examples of applications, and characteristics of the numerical error as step size changes. It concludes that the 4th order Runge-Kutta method generally provides the most accurate results, followed by modified Euler's method, with Euler's method being the least accurate of the three methods.
4. 2.1. Population Models
• Applications of population equation – separable first-order
differential equation
• Logistic equation
5. 2.2. Equilibrium Solution and Stability
• Equilibrium solution is a constant solution on a differential equation
• Some equilibrium solutions are stable (attractive points) and others
are unstable (repulsive points). E.g. Figures 2.2.4, 2.2.6
6. 2.4. Numerical Approximation: Euler’s Method
• p. 112 to p. 121 Euler’s Method
• Numerical approximation of a solution of First-Order Linear Initial
Value Problem 𝑑𝑦
𝑑𝑥
= 𝑓 𝑥, 𝑦
𝑦 𝑥0 = 𝑦0
𝑥0, 𝑦0 : initial point
𝑦 𝑛+1 = 𝑦 𝑛 + ℎ𝑓 𝑥 𝑛, 𝑦 𝑛
𝑥 𝑛+1 = 𝑥 𝑛 + ℎ
𝑛 = 0,1,2,3, …
ℎ: step size
7. Idea behind Euler’s Method
The derivative of y(x) at x0 is:
0 0
0
0
lim
h
y x h y x
y x
h
An approximation to this is:
for small values of h.
0 0
0
y x h y x
y x
h
8. Idea behind Euler’s Method
0 0 0( )y x h y x hy x
0hy x
0x
0y x
0y x
h
0y x h error
x1
9. Idea behind Euler’s Method
1n n ny y hy
1 0 0y y hy
2 1 1y y hy ny = nn yxf ,
1 ,n n n ny y hf x y
10. Examples of application
• Example 1 p. 114
• Example 2 p. 116
• Example 3 p. 119
• Additional example
• Sometimes a problem is stiff and exhibits unusual behavior – Euler’s
method might not be best method to use in those cases (see Example
5, p. 120)
• Exercise: Apply Euler’s method to problems 1 to 10, p. 121 and 122.
Do 3 steps.**
𝑑𝑦
𝑑𝑥
= 2𝑥 + 𝑦 with 𝑦 0 = 2
11. Some characteristics of numerical method
• Global error usually increases (accumulates) as the calculations go on
• A decrease in step size (h) usually reduces the global error
• For Euler’s method, global error is a linear function of step size (h)
Error Euler ~ 𝐶ℎ (C is a constant)
• Hence, if h is divided by 2, then error will asymptotically by divided by 2
• If h is divided by 5, then error will asymptotically by divided by 5
• See Figures 2.4.4, 2.4.5, 2.4.7, 2.4.8
12. 2.5. Modified (Improved) Euler’s Method
• p. 124 to p. 131 Modified Euler’s Method
• Numerical approximation of a solution of First-Order Linear Initial Value
Problem 𝑑𝑦
𝑑𝑥
= 𝑓 𝑥, 𝑦 𝑦 𝑥0 = 𝑦0
𝑥0, 𝑦0 : initial point
𝑥 𝑛+1 = 𝑥 𝑛 + ℎ
𝑛 = 0,1,2,3, …
ℎ: step size
*
1 ,n n n ny y hf x y
*
1 1 1
1
, ,
2
n n n n n ny y h f x y f x y
Euler’s Method
13. 2.5. Modified (Improved) Euler’s Method
• First estimate of is calculated by Euler’s Method
*
1 ,n n n ny y hf x y
*
1 1
1
, , average of two slopes
2
n n n nf x y f x y
𝑦 𝑥 𝑛+1
* *
1 1 1 1, slope at ,n n n nf x y x y
14. Examples of application
• Example 2 p. 128
• Example 3 p. 130
• Additional example
• Exercise: Apply Modified Euler’s method to problems 1 to 10, p. 132.
Do no more than 3 steps.**
𝑑𝑦
𝑑𝑥
= 2𝑥 + 𝑦 with 𝑦 0 = 2
15. Some characteristics of numerical method
• Global error usually increases (accumulates) as the calculations go on
• A decrease in step size (h) usually reduces the global error
• For Modified Euler’s method, global error is a quadratic function of step
size (h)
Error Modified Euler ~ (C is a constant)
• Hence, if h is divided by 2, then error will asymptotically by divided by 4
• If h is divided by 5, then error will asymptotically by divided by 25
• See Figures 2.5.3, 2.5.4, 2.5.5, 2.5.6
𝐶ℎ2
16. 2.6. Runge – Kutta 4th Order Method (RK4)
• p. 135 to p. 141 RK4
• Numerical approximation of a solution of First-Order Linear Initial Value Problem
𝑑𝑦
𝑑𝑥
= 𝑓 𝑥, 𝑦 𝑦 𝑥0 = 𝑦0
𝑥0, 𝑦0 : initial point
𝑥 𝑛+1 = 𝑥 𝑛 + ℎ
𝑛 = 0,1,2,3, …
ℎ: step size
1 1 2 3 4
1
2 2
6
n ny y h k k k k
1 ,n nk f x y
2 1,
2 2
n n
h h
k f x y k
3 2,
2 2
n n
h h
k f x y k
4 3,n nk f x h y hk
17. Examples of application
• Example 1 p. 137
• Example 2 p. 138
• Example 3 p. 140
• Additional example 𝑑𝑦
𝑑𝑥
= 2𝑥 + 𝑦 with 𝑦 0 = 2
18. Some characteristics of numerical method
• Global error usually increases (accumulates) as the calculations go on
• A decrease in step size (h) usually reduces the global error
• For RK4 method, global error as a function of step size (h) is
Error RK4 ~ (C is a constant)
• Hence, if h is divided by 2, then error will asymptotically by divided by 16
• If h is divided by 5, then error will asymptotically by divided by 625
• See Figures 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.6.6
𝐶ℎ4
19. Comparison of numerical methods
• If the same initial value problem is solved by Euler’s method, Modified
Euler’s method and RK4 (a common step size h is used for all methods), the
results provided by RK4 would be the most accurate.
• Moreover, the results obtained by Modified Euler’s method would be more
accurate than those calculated by Euler’s method .
• By dividing a common step size h by 2, the error of
Euler’s method would be divided by 2
Modified Euler’s method would be divided by 4
RK4 would be divided by 16