Numerical Methods For Engineers ch3
Numerical Methods For Engineers ch3
1
Slides are adapted from:
http://nm.mathforcollege.com/NumericalM
ethodsTextbookUnabridged/
3
About Numerical Differentiation
source: Slide 3 4
About Numerical Differentiation
source: Slide 3 5
About Numerical Differentiation
source: Slide 3 6
About Numerical Differentiation
source: Slide 3 7
About Numerical Differentiation
source: Slide 3 8
source: Slide 3 9
source: Slide 3 10
source: Slide 3 11
Problems
How can we determine 𝑥0 :
𝑓 𝑥 = 𝑥 2 − 1, 𝑓 𝑥0 = 0
12
Problems
2
How can we determine 𝑥0 : 𝑔 𝑥 = 𝑒 𝑥 − 𝑥 − 1, 𝑔 𝑥0 = 0
2
𝑦 = 𝑒𝑥 − 1
𝑦=𝑥
13
Problems
𝑓(𝑥) 𝑓(𝑥)
• Some observations
𝑓(𝑥) 𝑓 𝑥0 = 0 𝑥 𝑥
𝑓(𝑥) 𝑓(𝑥)
𝑓 𝑥0 = 0
𝑓 𝑥0 = 0 𝑥 𝑥
14
Problems
𝑓(𝑥) 𝑓(𝑥)
𝑓 𝑥0 = 0
𝑥 𝑥
15
BRACKETING METHODS
BISECTION
16
source: Slide 3 17
bisection
• If 𝑓 𝑥 is continuous on the interval 𝑥𝑙 and 𝑥𝑢 and the interval satisfies the condition below,
then there is at least one real root 𝑥𝑙 < 𝑥0 < 𝑥𝑢 (from the intermediate value theorem).
𝑓(𝑥) 𝑥𝑙 𝑥𝑢
𝑓 𝑥0 = 0
18
source: Slide 3 21
source: Slide 3 22
source: Slide 3 23
source: Slide 3 24
source: Slide 3 25
source: Slide 3 26
source: Slide 3 27
source: Slide 3 28
source: Slide 3 29
source: Slide 3 30
source: Slide 3 31
source: Slide 3 32
OPEN METHODS
NEWTON-RAPHSON METHOD
35
source: Slide 3 36
source: Slide 3 37
source: Slide 3 38
source: Slide 3 39
source: Slide 3 40
source: Slide 3 41
source: Slide 3 42
source: Slide 3 43
source: Slide 3 44
source: Slide 3 45
source: Slide 3 46
source: Slide 3 47
source: Slide 3 48
This equation has no
real roots.
source: Slide 3 49
source: Slide 3 50
source: Slide 3 51
• It is clear that equations with inflection points or multiple-roots may bring out problems. What can be
done to avoid these drawbacks?
❑ Check the relative error for any undesired drawback, Newton approach should converge fast.
❑ Try to guess the source of the convergence problem, whether it oscillates, if it definitely diverges,
is there a problem of inflection, try to determine it. Then a closed approach can be applied, which
are known to always converge.
52
source: Slide 3 53
𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓′(𝑥𝑖 )
54
𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓′(𝑥𝑖 )
55
OPEN METHODS
SECANT METHOD
56
57
58
59
60
61
62
PROBLEMS
64
Question
Solve 𝑥 4 − 2𝑥 = 0 by the Newton-Raphson method, using an initial guess of 𝑥0 = 2.
𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓′(𝑥𝑖 )
65
Example
Solve sin 𝑥 − 0.5 = 0 by the Secant method, using initial points of 𝑥0 = 0, 𝑥1 = 0.1
66
Problem
Problem
A total charge 𝑄 is uniformly distributed around a ring-shaped
conductor with radius 𝑎. Another point charge 𝑞 is located at a
distance 𝑥 from the center of the ring. The force exerted on the
charge by the ring is given by, 𝑅 𝑥
1 𝑞𝑄𝑥
𝐹= ⋅ 3
4𝜋𝑒0 2 2
𝑥 +𝑅 2 𝑞
𝑒0 = 8.85 × 10−12 (C^2/Nm^2 ). Find the distance 𝑥 where exerted
force is 1𝑁.
𝑄
𝑄 = 𝑞 = 2 × 10−5 𝐶 , 𝑅 = 0.9 𝑚
Source: Steven C. Chapra, Raymond P. Canale, “Numerical Methods for Engineers”, 7th Edition, McGraw-Hill 67