National Junior College Mathematics Department 2016
2016 – 2017 / H2 FMaths / Numerical Methods (Teacher’s Version) Page 1 of 33
National Junior College
2016 – 2017 H2 Further Mathematics
Topic F6: Numerical Methods (Lecture Notes)
Key Questions to Answer:
What is a continuous function?
How to locate the roots of an equation by means of simple graphical or numerical
methods?
How to use the method of linear interpolation and Newton Raphson method to find
an approximation to a root of an equation?
- What are the cases where the method fails to converge?
How to use iterations involving recurrence relations of the form 1 Fn nx x to
determine a root to a prescribed degree of accuracy?
- What are the cases where the method fails to converge?
How to approximate the integral of a function using the trapezium rule and
Simpson’s rule?
How to approximate solutions of first order differential equations using Euler
method and improved Euler method respectively?
Background
In this topic, we will learn to use various numerical methods to approximate the roots of an
equation which cannot be solved exactly ., for example solving cosx x . For many
engineering and design problems, we cannot have an analytic solution but there is no real need
for one. In such cases, all that is needed an accurate approximation to the actual solution. We
term this a numerical solution to the problem, and its associated method a numerical method.
§1 Continous Function
A function f defined on
,a b is continuous if for all points 0 ,x a b , for each 0 . there
exists 0 such that whenever x a , we have f f x a .
Informally to say, a function f defined on ,a b is continuous if it can be sketched from one
end to the other with one stroke of the pen.
Can you list some functions which are continuous?
A function can fail to be continuous at a point x a for any one of the following three
reasons.
f a does not exist
limf
x a
x
does not exist
limf f
x a
x a
www.KiasuExamPaper.com
390
National Junior College Mathematics Department 2016
2016 – 2017 / H2 FMaths / Numerical Methods (Teacher’s Version) Page 2 of 33
§2 Location of Roots
Let fy x be a function of ݔThe number is said to be a solution (or root) of the equation
f 0x when satisfies f 0.
Consider a continuous curve
f .y x
If 1f x and 2f x have opposite signs, the curve must cross the axisx between 1 2 and .x x
In general, if f x is continuous and
(i) 1 2f f 0x x (i.e. 1f x and 2f x have opposite signs), then the equation f 0x
has an ODD number of real roots between 1x and 2x (Some of which may be repeated).
(ii) 1 2 1f f 0 (i.e. f andx x x 2f x have the same sign), then the equation f 0x
has either NO real roots or an EVEN number of real roots between 1x and 2x (Some of
which may be repeated).
There is a root between and
x
x
1 root in
3 root in
x
3 root in
x
repeated roots
No real roots in
2 real roots in
4 roots in
x
x
x
repeated roots
www.KiasuExamPaper.com
391
National Junior College Mathematics Department 2016
2016 – 2017 / H2 FMaths / Numerical Methods (Teacher’s Version) Page 3 of 33
Example 2.0.1
Explore the possibility of real roots for
3 2f 2 1x x x .
For
2 30,1 , 1 0 and 2 0.x x x
f 0 x 0,1 .x
For 1,x 3 22 0x x
f 0 1,x x
Thus, f 0 0,x x
f x has no real roots for all 0.x
For
3 2, 1 , 2 0 and 1 0x x x
f 0 , 1x x
f x has no real roots for all 1.x
Now, f 1 2 0 and f 0 1 0
f x has either 1 or 3 real roots in 1,0
§
3 Approximate Roots of Equations using Graphical Method
The real roots of an equation f 0x can be located and their approximate values found by
sketching (plotting) fy x and locating its x intercepts on graph paper.
It is often better to rearrange f 0x into the form 1 2f f x x , where 1f x and 2f x
are standard functions whose graphs can be easily sketched or plotted on graph paper. The x
values of the points of intersection of the two graphs then give the roots of the equation
f 0.x
While graphical methods are quick, it is nevertheless a visual method that relies heavily on
graphing programs. Is there a computational method that can produce such numerical
approximations? Preferably, one that can even be carried out by hand (if needed).
§4 Approximate Roots of Equations Using Numerical Methods
This is the process of successive approximations whereby each approximation is used as a base
for the next approximation. We must first find an interval in which the root lies (either by
graphical method or by the investigation of the sign of f x ).
Note:
Such methods can be used only if f x is continuous on this interval.
There can be only one root within this interval.
In this section, we will learn the following numerical methods.
(a) Interval Bisection
(b) Linear Interpolation
(c) Newton-Raphson
(d) Iterations involving recurrence relations of the form 1 Fn nx x
Convergence to the roots for (a) and (b) are guaranteed. However, this is not so for (c) and
(d).
www.KiasuExamPaper.com
392
National Junior College Mathematics Department 2016
2016 – 2017 / H2 FMaths / Numerical Methods (Teacher’s Version) Page 4 of 33
4.1 Interval Bisection
Suppose the equation f 0x has only one root in the interval ,a b . Then f a and
f b must be of opposite signs.
Let .2
a bc
Case (I): If f a and f c are of opposite signs, then the root , .a c
Case (II): If f and fc b are of opposite signs, then the root , .c b
This process of bisection is repeated until the desired degree of accuracy is obtained.
There is a root between and
x
x
x
www.KiasuExamPaper.com
393
National Junior College Mathematics Department 2016
2016 – 2017 / H2 FMaths / Numerical Methods (Teacher’s Version) Page 5 of 33
Eample 4.1.1
Find the larger root of e 3 0x x correct to 1 decimal place.
Solution:
Let f e 3
f ' e 3. f ' 0 ln 3 1.1
f '' e 0
ln 3 gives a minimum point.
x
x
x
x x
x x x
x x
x
is the largest root.
2
Now f 1 e 3 0
1,2
f 2 e 6 0
To find :
Estimate of root f (ݔ )Interval containing root
1 < 0
2 > 0 1, 2
1.5 < 0 1.5, 2
1.75 > 0 1.5,1.75
1.625 > 0 1.5,1.625
1.5625 > 0 1.5,1.5625
1.53125 > 0 1.5,1.53125
Since 1.5 1.53125, 1.5 1.d.p
Note:
(i) Convergence to the root is guaranteed.
(ii) This method gives a slow convergence, i.e., many iterations are required.
4.2 Linear Interpolation
Let
,a b be the solution of f 0.x This method gives a better approximation to by
reducing the interval where lies.
Let , 0
, 0
, 0
, f
, f
A a
B b
C c
D a a
E b b
x
www.KiasuExamPaper.com
394
National Junior College Mathematics Department 2016
2016 – 2017 / H2 FMaths / Numerical Methods (Teacher’s Version) Page 6 of 33
Join D to .E We see that ܿgives a better approximation to .
Let f , f .p a q b [The aim is to find an expression for ܿ]
Considering triangles ACD and BCE , by similar triangles,
AC AD
BC BE
f fi.e. .f f
c a p
b c q
pb pc cq aq
c q