Numerical Methods
Numerical Methods to solve f(x) = 0
Basic Concept: Sign Diagram and Locating Roots
If :
1) f(x) is continuous on the interval [a, b]
2) f(a) and f(b) have opposite sign
Then:
1) F(x) has at least 1 root, for a < x < b
Note logical fallacies:
1) At least 1 root doesn’t mean exactly 1 root
2) No sign change doesn’t imply no root
3) Functions with vertical asymptote has sign change but not continuous
Numerical Method 1: Interval Bisection
1) f(a) and f(b) have opposite sign on the interval [a, b]
2) take the mid-point (a+b) / 2 as the 1st solution approximation, then repeat the process until
required degree of accuracy is achieved.
Example:
Example
Numerical Method 2: Linear Interpolation
1) Draw a straight line between the points (a, f(a)) and (b, f(b))
2) The x-intercept is the 1st approximation 𝑥1
3) Use similar triangle properties and ratios to estimate 𝑥1 , and find 𝑓(𝑥1)
4) Replace the end with same sign as 𝑓(𝑥1), then repeat the process until required degree of
accuracy is achieved.
Example:
Example:
Numerical Method 3: The Newton-Raphson Method (Newton’s Method)
The Newton-Raphson Formula is:
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 −
𝑓 ′(𝑥𝑛 )
1) The method uses tangent line to find increasing accurate approximation of x.
2) 𝑥𝑛+1 is the point at which the tangent line at 𝑥𝑛 intersects x-axis.
3) If 𝑥0 is chosen carefully, it will converge quickly
4) If 𝑥0 is not chosen carefully, it might converge slowly, or even fail.
Example: if the initial point is close to turning point, ie the derivative is close to 0, the tangent will
intercept x-axis far away from the initial point.
Example: if at any point it is a turning point, then the method with fail because the derivative = 0. I.e.
the tangent is a horizontal line and will never intersect with x-axis.
Example:
Final Note: Don’t use approximated value in each iteration. Use exact value and use calculator
memory function to store exact values.