10) Numerical Methods
10) Numerical Methods
Methods
Prior Knowledge Check
1) Given that , evaluate: 3) Given that , and that , find the
values of , and .
a) b)
𝑢1= 2 𝑢2 =2 .5 𝑢3 =2 . 9
3 . 25 11. 24
2) Find given that:
′ 3 15
𝑓 ( 𝑥 )= +8 𝑥+
a) 2√𝑥 𝑥
4
b)
′ 5 −𝑥
c) 𝑓 ( 𝑥 )= −7 𝑒
𝑥+ 2
′ 2
𝑓 ( 𝑥 )=𝑥 𝑐𝑜𝑠𝑥+2 𝑥𝑠𝑖𝑛𝑥+4 𝑠𝑖𝑛𝑥
Teachings for
Exercise 10A
Numerical Methods 𝑦 𝑦 = 𝑓 (𝑥 )
1
You need to be able to use numerical
methods to locate roots of equations
10A
Numerical Methods 𝑦 𝑦 = 𝑓 (𝑥 )
1
You need to be able to use numerical
methods to locate roots of equations
a) Explain how the graph shows that Sub in these two values and show that
has a root between and . there is a change of sign…
3 2
𝑓 ( 𝑥 ) =𝑥 − 4 𝑥 + 3 𝑥 +1
b) Show that has a root between and Sub in Sub in
𝑓 ( 1. 4 ) =0 . 104 𝑓 ( 1. 5 ) =− 0 .125
Since there is a change of sign, there
must be a root in the interval
10A
Numerical Methods
You need to be able to use numerical
methods to locate roots of equations
𝑥 𝑥 𝑥
𝑎 𝑏 𝑎 𝑏 𝑎 𝑏
Comparing and there is a change of Comparing and there is no change of Comparing and there is a change of
sign sign sign
There can be an odd number of roots There can be an even number of roots There could be no roots
Numerical Methods
𝑦
You need to be able to use numerical
methods to locate roots of equations 1
b) Calculate , and and use your answer From the diagram, since the curve
to explain why there are at least 3 crosses that axis 3 times, it is possible that
roots in the interval . there are actually 2 roots in the interval
given
10A
Numerical Methods
𝑦
You need to be able to use numerical
methods to locate roots of equations 1
¿ − 0 . 00064 ¿ 0 .00024
Since the function is continuous across , and there is a
change of sign, the root must be within this interval – it
must therefore round to 1.753 to 3dp!
10A
Teachings for
Exercise 10B
Numerical Methods
Let’s use this formula to calculate
You need to be able to solve
( )
equations of the form by 1 𝑎 Let our first guess
using the process of iteration 𝑥𝑛 +1 = 𝑥𝑛+ of , , be equal to 0.5
2 𝑥𝑛
We are finding the
2( ( 0 .5) )
Iteration is a process where a 1 3 square root of 3, so
𝑥𝑛 +1 = (0 . 5)+
calculation is repeated multiple
times, and each time the answer Calculat
closes in on a specific value. 𝑥𝑛 +1 =3 . 25 e
10B
Numerical Methods
Keep repeating these calculations, each time
You need to be able to solve using the newly-calculated value…
equations of the form by
using the process of iteration 𝑥 0=0 .5
𝑥1 =3 . 25
Iteration is a process where a
calculation is repeated multiple 𝑥 2=2 . 087 …
times, and each time the answer
closes in on a specific value.
𝑥 3=1 .7621 …
10B
Numerical Methods
But how does this process work?
You need to be able to solve
equations of the form by Start with , since this is what we were calculating…
using the process of iteration
𝑥=√ 3
Square both
2
Iteration is a process where a 𝑥 =3 sides
calculation is repeated multiple 1 2 3 Divide all by 2
times, and each time the answer 𝑥 =
2 2
closes in on a specific value. Add to both sides
2 1 2 3
𝑥 = 𝑥 +
2 2
How does a calculator calculate a Divide all by
1 3
square root, for example? 𝑥= 𝑥+
2 2𝑥
Factorise out of the right side
( 𝑎
) ( )
1 1 3
𝑥𝑛 +1 = 𝑥𝑛+ 𝑥= 𝑥+
2 𝑥
2 𝑥𝑛
The solution to this equation will be the same as the
solution to the original one
𝑥=
1
2(𝑥+
3
𝑥 ) 𝒙=𝟐 . 𝟎𝟖𝟕
𝒙=𝟏 . 𝟕𝟔𝟐𝟏
𝑦 =𝑥 𝑦=
1
2
𝑥+(3
𝑥 )
1) We choose a value for (in this case
we chose 0.5), and sub it into the
equation on the right side (the blue
line)
𝒙 =𝟑 . 𝟐𝟓
𝒙 =𝟏 . 𝟕𝟔𝟐𝟏
𝒙 =𝟎 . 𝟓
𝒙 =𝟐 . 𝟎𝟖𝟕
2) The answer () is the next value () we
substitute in. Since the red line is ,
we can show this on the diagram
4) Gradually we close in on the
3) We then substitute this into the intersection, which is the solution to the
equation on the right side again (the original equation, in this case
blue line) 10B
Numerical Methods
The diagram you just saw is sometimes called a convergence
cobweb, and can appear in different types…
It is important to note
that sometimes this
technique causes an
answer to diverge away
from the solution instead
of towards it
10B
Numerical Methods
1 1
You need to be able to solve 𝑥𝑛 +1 =4 − 𝑥 =4 −
Write using 𝑛 +1
𝑥𝑛 𝑥𝑛 Write using
equations of the form by the specific the specific
using the process of iteration 1 terms 1 terms
𝑥1 =4 − 𝑥 2=4 −
𝑥0 Sub 𝑥1 Sub
Given that 1 values 1 values
𝑥1 =4 − in 𝑥 2=4 − in
3 3 . 66 …
Calculate Calculate
a) Show that the equation can be 𝑥1 =3 . 66 … 𝑥 2=3 . 727 …
written as , .
1
The equation has a root, , in the 𝑥𝑛 +1 =4 −
𝑥𝑛 Write using
interval . the specific
1 terms
𝑥 3=4 −
𝑥2
Sub
b) Use the iterative formula 1 values
, with to find the value of , and . 𝑥 3=4 − in
3 . 727 …
Calculate
𝑥 3=3 . 731 …
10B
Numerical Methods
3 2
𝑓 ( 𝑥 ) =𝑥 −3 𝑥 − 2 𝑥 +5
You need to be able to solve
Sub in Sub in
equations of the form by
using the process of iteration
𝑓 ( 3 ) =−1 𝑓 ( 4 )=13
Since the function is continuous, and there is a
change of sign, there must be a root in the interval
a) Show that the equation has a
root in the interval
10B
Numerical Methods
√ √
𝑥 3𝑛 − 2 𝑥 𝑛 +5
3
You need to be able to solve 𝑥 𝑛 − 2 𝑥 𝑛 +5
𝑥𝑛+1 = 𝑥𝑛+1 =
equations of the form by 3 Sub 3
√
Sub
√
using the process of iteration in
3
(1 .5) −2 (1 .5)+5 (1 .3385)3 − 2(1 . 3385)+5 in
𝑥1 = 𝑥 2=
3 Work 3 Work
out out
𝑥1 =1 .3385 𝑥 2=1 .2544
𝑥𝑛+1 =
√
𝑥 3𝑛 − 2 𝑥 𝑛 +5
3 Sub
√
3 in
To calculate the values of , and , (1 .2544) −2(1. 2544)+5
giving answers to 4 decimal
𝑥 3=
3 Work
places, when: out
10B
Numerical Methods
√ √
𝑥 3𝑛 − 2 𝑥 𝑛 +5
3
You need to be able to solve 𝑥 𝑛 − 2 𝑥 𝑛 +5
𝑥𝑛+1 = 𝑥𝑛+1 =
equations of the form by 3 Sub 3 Sub
√ √
using the process of iteration 3 in 3
(4) −2(4)+5 (4. 5092) − 2(4 . 5092)+5 in
𝑥1 = 𝑥 2=
3 Work 3 Work
out out
𝑥1 =4 .5092 𝑥 2=5 . 4058
𝑥𝑛+1 =
√
𝑥 3𝑛 − 2 𝑥 𝑛 +5
3 Sub
√
3 in
To calculate the values of , and , (5 . 4058) − 2(5. 4058)+5
giving answers to 4 decimal
𝑥 3=
3 Work
places, when: out
10B
Teachings for
Exercise 10C
Numerical Methods
𝑓 (𝑥) 𝑓 (𝑥)
𝐴
The Newton-Raphson method
is another technique you can
𝐴
use to find roots of equations
𝑡 𝑎𝑡
of the form 𝑓 ( 𝑥 1)
𝑔𝑒𝑛
𝑇 𝑎𝑛
Start with a curve , with a root as
shown 𝑥
𝑟 𝑜𝑜𝑡 𝑥 4 𝑥3 𝑥2 𝑥1
The vertical distance from the Notice that the new intersection is
x-axis to the curve for our chosen closer to the root than our first guess
value, , is
Look what happens if we follow this
(by subbing the value into the
equation of the line) process repeatedly…
We get closer to the actual root!
10C
Numerical Methods
𝑓 (𝑥) 𝑓 (𝑥)
𝐴
The Newton-Raphson method
is another technique you can
𝐴
use to find roots of equations
𝑡 𝑎𝑡
of the form 𝑓 ( 𝑥 1)
𝑔𝑒𝑛
𝑇 𝑎𝑛
However, we need to create an
algebraic method for this (it will 𝑥
naturally be iterative since, as 𝑟 𝑜𝑜𝑡 𝑥2 𝑥1
you just saw, it is a repeating
process)
Gradient of the tangent (1) Gradient of the tangent (2) 𝑓 ( 𝑥 1)
= 𝑓 ′ ( 𝑥1 ) Multiply by ,
𝑥 1 − 𝑥2
Using the triangle , we can We can also use calculus, by divide by
calculate differentiating and 𝑓 ( 𝑥 1)
substituting in =𝑥 1 − 𝑥 2
𝑓 ′ ( 𝑥 1) Add ,
𝑓 ( 𝑥1 )
¿ ¿ 𝑓 ′ ( 𝑥1 ) 𝑓 ( 𝑥 1) subtract
𝑥1 − 𝑥2 𝑥 2=𝑥1 −
𝑓 ′ ( 𝑥 1)
These expressions must be equal, since
they both represent the same gradient…
10C
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods
𝑓 (𝑥) 𝑓 (𝑥)
𝐴
The Newton-Raphson method
is another technique you can
𝐴
use to find roots of equations
𝑡 𝑎𝑡
of the form 𝑓 ( 𝑥 1)
𝑔𝑒𝑛
𝑇 𝑎𝑛
This is the Newton-Raphson
formula: 𝑥
𝑟 𝑜𝑜𝑡 𝑥2 𝑥1
𝑓 ( 𝑥 1)
𝑥 2= 𝑥1 −
𝑓 ′ ( 𝑥 1)
For iteration, it is written as
follows…
𝑓 ( 𝑥𝑛)
𝑥𝑛 +1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
10C
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods 𝑦
𝑦 = 𝑓 (𝑥 )
10C
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods 𝑦
𝑦 = 𝑓 (𝑥 )
10C
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods
3 2 2
The Newton-Raphson method 𝑓 ( 𝑥 ) =𝑥 + 2 𝑥 −5 𝑥 − 4 𝑓 ′ ( 𝑥 ) =3 𝑥 + 4 𝑥 − 5
is another technique you can
use to find roots of equations
of the form
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
The diagram shows part of the 𝑓 ′ ( 𝑥𝑛)
Write using the appropriate
curve with equation , where .
numbers (if needed)
𝑓 ( 𝑥0)
The point , with x-coordinate , is a 𝑥1 =𝑥0 −
stationary point on the curve. 𝑓 ′ ( 𝑥0) Sub into both , on the
numerator, and , on the
3 2
The equation f(x)=0 has a root, , (2) +2 (2) −5 (2)− 4 denominator
in the interval . 𝑥1 =2 − 2
3(2) + 4 (2)−5
𝑥1 =1 .8666 …
b) Using as a first approximation
to , apply the Newton-Raphson
method procedure twice to find a
new approximation for , to 3dp.
10C
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods
3 2 2
The Newton-Raphson method 𝑓 ( 𝑥 ) =𝑥 + 2 𝑥 −5 𝑥 − 4 𝑓 ′ ( 𝑥 ) =3 𝑥 + 4 𝑥 − 5
is another technique you can
use to find roots of equations 𝑥1 =1 .8666 …
of the form
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
The diagram shows part of the 𝑓 ′ ( 𝑥𝑛)
Write using the appropriate
curve with equation , where .
numbers (if needed)
𝑓 ( 𝑥 1)
The point , with x-coordinate , is a 𝑥 2= 𝑥1 −
stationary point on the curve. 𝑓 ′ ( 𝑥 1)
3 2
The equation f(x)=0 has a root, , (1 . 8666) +2 (1. 8666) −5 (1 . 8666)− 4
𝑥 2=1 . 8666 −
in the interval . 3(1 . 8666)2 + 4 (1 .8666 )−5
Sub into both , on
(3dp) the numerator,
b) Using as a first approximation and , on the
to , apply the Newton-Raphson denominator
method procedure twice to find a
new approximation for , to 3dp.
10C
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods
The Newton-Raphson method If the root rounds to 1.856 to 3dp, then it must
is another technique you can be in the range 1.8555 to 1.8565
use to find roots of equations
of the form Root lies here
𝑥 =1 . 856
c) By considering
2 the change of ¿ − 0 . 00348 ¿ 0 .00928
sign in over an appropriate
interval, show that your answer Since the function is continuous across , and there is a
to part b is accurate to 3 decimal change of sign, the root must be within this interval – it
places must therefore round to 1.856 to 3dp!
10C
Teachings for
Exercise 10D
Numerical Methods
You need to be able to use the 𝑓 ( 𝑥 ) =15000 ( 0 . 85 ) 𝑥 −1000 𝑠𝑖𝑛𝑥 Sub in
techniques you have learned in (calculator
(10)
this chapter to model more 𝑓 ( 10 )=15000 ( 0 . 85 ) − 1000 sin (10) needs to be in
practical situations radians)
Calculate
𝑓 ( 10 )=3 497 .13
The price of a car in £s, x years after
purchase, is modelled by the So the value of the car will be £3497.13
function: (remember to round appropriately for pounds)
10
Numerical Methods
𝑥
You need to be able to use the 𝑓 ( 𝑥 ) =15000 ( 0 . 85 ) −1000 𝑠𝑖𝑛𝑥
techniques you have learned in Sub in Sub in
this chapter to model more
practical situations ¿ 534 .11 ¿ − 331. 55
Since the function changes sign across , and
The price of a car in £s, x years after there is a change of sign, there must be at least
purchase, is modelled by the one root in the interval 19-20.
function:
,
10
Numerical Methods
You need to be able to use the 𝑥 Differentiate
𝑓 ( 𝑥 ) =15000 ( 0 . 85 ) −1000 𝑠𝑖𝑛𝑥 with respect
techniques you have learned in
this chapter to model more to , using
practical situations techniques
you have
𝑓 ′ ( 𝑥 ) =¿ −1000 𝑐𝑜𝑠𝑥
15000 ( 0 . 85 )𝑥 (𝑙𝑛0 .85) learnt
previously
The price of a car in £s, x years after
purchase, is modelled by the
function:
,
c) Find
10
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods
Sub into both ,
𝑓 ( 𝑥𝑛) on the
You need to be able to use the 𝑥𝑛+1 =𝑥 𝑛 − Write using the
techniques you have learned in 𝑓 ′ ( 𝑥 𝑛 ) appropriate numerator,
this chapter to model more numbers (if and , on the
practical situations 𝑓 ( 𝑥 0 ) needed) denominator
𝑥1 =𝑥0 −
𝑓 ′ ( 𝑥0)
15000 ( 0 . 85 )(19. 5) −1000 𝑠𝑖𝑛 (19 .5)
The price of a car in £s, x years after 𝑥1 =(19 . 5)− (19 . 5)
purchase, is modelled by the 15000 ( 0 . 85 ) ( 𝑙𝑛0 . 85 ) −1000 𝑐𝑜𝑠 (19 .5)
function:
, 𝑥1 =1 9 .528
𝑓 ′ (𝑥)=15000 ( 0 . 85 ) 𝑥 ( 𝑙𝑛0 .85 ) − 1000 𝑐𝑜𝑠𝑥 Calculate
10
𝑓 ( 𝑥𝑛)
𝑥𝑛+1 =𝑥 𝑛 −
𝑓 ′ ( 𝑥𝑛)
Numerical Methods
You need to be able to use the
techniques you have learned in
this chapter to model more
practical situations
e) Criticise this model with respect However, this is unrealistic, so the model seems
to the value of the car as it gets unreasonable for cars that are around 20 years
older old.
10