GS 4353 Numerical Analysis Week 1
GS 4353 Numerical Analysis Week 1
8/4/2022 2
What are Numerical Methods?
Techniques by which mathematical problems are formulated
so that they can be solved with simple arithmetic operations
Considering
m = 68.1 kg
cd = 0.25 kg/m
𝑑𝑣 Δ𝑣 𝑣(𝑡𝑖+1 ) − 𝑣(𝑡𝑖 )
≈ =
𝑑𝑡 Δ𝑡 𝑡𝑖+1 − 𝑡𝑖
𝑑𝑣 𝑐𝑑 2
=𝑔− 𝑣
𝑑𝑡 𝑚
𝑐𝑑
𝑣 𝑡𝑖+1 = 𝑣 𝑡𝑖 + 𝑔 − 𝑣(𝑡𝑖 )2 (𝑡𝑖+1 − 𝑡𝑖 )
𝑚
8/4/2022 9
Differentiation Integration
Model needs
some Simultaneous
mathematical Differential
linear
equations
procedures equations
Curve-fitting by
Non-linear
interpolation
equations
or regression
8/4/2022 10
Mathematical Procedures
𝑥 2 + 𝑦 2 = 34
Non-linear equations
𝑥 2 − 2𝑦 2 = 7
of Numerical
Computing Numerical stability
Efficiency (computational
burden)
8/4/2022 16
Errors in Numerical Methods
In numerical methods, approximations are used to express exact
mathematical operations
13
Example 1.1 (cont.)
Solution:
a) For x = 2 and h = 0.3
f (2 + 0.3) − f (2)
f ' (2)
0.3
f (2.3) − f (2)
=
0.3
7e0.5(2.3) − 7e0.5(2)
=
0.3
22.107 −19.028
= = 10.263
0.3
14
Example 1.1 (cont.)
Solution:
b) The exact value of f ' (2) can be found by using
our knowledge of differential calculus.
f (x) = 7e0.5x
f ' (x) = 7 0.5 e0.5x
= 3.5e0.5x
So the true value of f ' (2) is
f ' (2) = 3.5e0.5(2)
= 9.5140
True error is calculated as
Et = True Value – Approximate Value
= 9.5140 −10.263 = −0.722
15
Example 1.2—Relative True Error
17
Example 1.3 (cont.)
Solution: (cont.)
f (2.3) − f (2)
=
0.3
7e0.5(2.3) − 7e0.5(2)
=
0.3
22.107 −19.028
= = 10.263
0.3
b) For x = 2 and h = 0.15
f (2 + 0.15) − f (2)
f ' (2)
0.15
f (2.15) − f (2)
=
0.15
18
Example 1.3 (cont.)
Solution: (cont.)
7e 0.5(2.15) − 7e 0.5(2)
=
0.15
20.50 −19.028
= = 9.8800
0.15
c) So the approximate error, Ea is
Ea = Present Approximation – PreviousApproximation
= 9.8800−10.263
= −0.38300
19
Example 1.4 —Relative Approximate Error
20
Example 1.4 (cont.)
Solution: (cont.)
Approximate Error
a =
PresentApproximation
− 0.38300
= = −0.038765
9.8800
as a percentage,
a = − 0. 03876 5 1 0 0 % = −3.8765%
21
Roundoff Errors
Quantities such as π, 1/3 cannot be expressed by a fixed
number of significant figures
- Digital computers have size and precision limits on their ability to represent
numbers.
- Certain numerical manipulations are highly sensitive to roundoff errors
𝑑𝑣 Δ𝑣 𝑣(𝑡𝑖+1 ) − 𝑣(𝑡𝑖 )
≅ =
𝑑𝑡 Δ𝑡 𝑡𝑖+1 − 𝑡𝑖
8/4/2022 30
Taylor Series
Taylor series is an important series that is used in expressing logarithm,
trigonometric functions into algebraic function.
Applications:
h2 h3 h4 h5
f (0 + h ) = f (0) + f (0)h + f (0) + f (0) + f (0) + f (0) +
2! 3! 4 5
❑ The more terms are used the used, smaller the error
❑ smaller the spacing, smaller the error for a given number of terms.
GS 4353: Numerical Analysis and Computer Programming
8/4/2022 35
Truncation errors
Reference:
Numerical Methods for Engineers by
Steven C. Chapra
Raymond P. Canale