Errors and Flow Chart Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

MASTERING A-LEVEL MATHEMATICS PAPER 2

NOTES ON NUMERICAL METHODS23

ERRORS
Binary operations of rounding errors using propagation
Absolute Error in addition/sum (x+y)
If 𝑥 is a positive number rounded off to 𝑋 creating an error 𝑒𝑥 ; and if 𝑦 is a
positive number rounded off to 𝑌 creating an error 𝑒𝑦 ; the error in the
sum (𝑥 + 𝑦) can be got as follows.
Note: In this case, exact values are 𝑥, 𝑦 and approximate values are 𝑋, 𝑌
respectively.
Method 1:
Let 𝑧 = 𝑥 + 𝑦 where 𝑥 and 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒, 𝑍 =𝑋+𝑌
𝑍 + 𝑒 = 𝑋 + 𝑒𝑥 + 𝑌 + 𝑒𝑦
𝑍 + 𝑒 = 𝑋 + 𝑌 + 𝑒𝑥 + 𝑒𝑦
𝑒 = 𝑒𝑥 + 𝑒𝑦
|𝑒| = |𝑒𝑥 + 𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |𝑒𝑦 |
maximum absolute error in sum = |𝑒𝑥 | + |𝑒𝑦 |
Method 2:
Let 𝑋 𝑎𝑛𝑑 𝑌 be the approximations to 𝑥 𝑎𝑛𝑑 𝑦, with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦

exact = (𝑥 + 𝑦), approximate = (𝑋 + 𝑌)


error, 𝑒 = (𝑥 + 𝑦) − (𝑋 + 𝑌)
= (𝑥 + 𝑦) − {(𝑥 − 𝑒𝑥 ) + (𝑦 − 𝑒𝑦 )}
= (𝑥 + 𝑦) − {(𝑥 + 𝑦) − (𝑒𝑥 + 𝑒𝑦 )}
𝑒 = 𝑒𝑥 + 𝑒𝑦
|𝑒| = |𝑒𝑥 + 𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |𝑒𝑦 |
maximum absolute error in sum = |𝑒𝑥 | + |𝑒𝑦 |
Method 3:
Let 𝑧 = 𝑥 + 𝑦 where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑧𝑚𝑎𝑥 = 𝑥𝑚𝑎𝑥 + 𝑦𝑚𝑎𝑥 , 𝑧𝑚𝑖𝑛 = 𝑥𝑚𝑖𝑛 + 𝑦𝑚𝑖𝑛
𝑧𝑚𝑎𝑥 − 𝑧𝑚𝑖𝑛
𝑒𝑟𝑟𝑜𝑟, 𝑒=
2
akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 1
MASTERING A-LEVEL MATHEMATICS PAPER 2

{(𝑥 + 𝑒𝑥 ) + (𝑦 + 𝑒𝑦 )} − {(𝑥 − 𝑒𝑥 ) + (𝑦 − 𝑒𝑦 )}
=
2
(𝑥 + 𝑦) + (𝑒𝑥 + 𝑒𝑦 ) − {(𝑥 + 𝑦) − (𝑒𝑥 + 𝑒𝑦 )}
=
2
2(𝑒𝑥 + 𝑒𝑦 )
=
2
𝑒 = 𝑒𝑥 + 𝑒𝑦
|𝑒| = |𝑒𝑥 + 𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |𝑒𝑦 |
maximum absolute error in sum = |𝑒𝑥 | + |𝑒𝑦 |
In summary:
(i). The maximum possible error in the addition (𝑥 + 𝑦) is = |𝑒𝑥 | + |𝑒𝑦 |.
(ii). The maximum relative error in the addition (𝑥 + 𝑦) is
|𝑒𝑥 | + |𝑒𝑦 | |𝑒𝑥 | + |𝑒𝑦 |
= , or, =
𝑥+𝑦 𝑋+𝑌
(iii). The maximum percentage error in the addition (𝑥 + 𝑦) is
|𝑒𝑥 | + |𝑒𝑦 | |𝑒𝑥 | + |𝑒𝑦 |
= × 100% , or, = × 100%
𝑥+𝑦 𝑋+𝑌
Absolute Error in subtraction/difference (x-y)
If 𝑥 is a positive number rounded off to 𝑋 creating an error 𝑒𝑥 ; and if 𝑦 is a
positive number rounded off to 𝑌 creating an error 𝑒𝑦 ; the error in the
difference (𝑥 − 𝑦) can be got as follows.
Method 1:
Let 𝑧 = 𝑥 − 𝑦 where 𝑥 and 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒, 𝑍 =𝑋−𝑌
𝑍 + 𝑒 = (𝑋 + 𝑒𝑥 ) − (𝑌 + 𝑒𝑦 )
𝑍 + 𝑒 = 𝑋 − 𝑌 + 𝑒𝑥 + 𝑒𝑦
𝑒 = 𝑒𝑥 − 𝑒𝑦
|𝑒| = |𝑒𝑥 − 𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |−𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |𝑒𝑦 |
maximum absolute error in subtraction = |𝑒𝑥 | + |𝑒𝑦 |
Method 2:
Let 𝑋 𝑎𝑛𝑑 𝑌 be the approximations to 𝑥 𝑎𝑛𝑑 𝑦, with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦
exact = (𝑥 − 𝑦), approximate = (𝑋 − 𝑌)
akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 2
MASTERING A-LEVEL MATHEMATICS PAPER 2

error, 𝑒 = (𝑥 − 𝑦) − (𝑋 − 𝑌)
= (𝑥 − 𝑦) − {(𝑥 − 𝑒𝑥 ) − (𝑦 − 𝑒𝑦 )}
= (𝑥 − 𝑦) − {(𝑥 − 𝑦) − (𝑒𝑥 − 𝑒𝑦 )}
𝑒 = 𝑒𝑥 − 𝑒𝑦
|𝑒| = |𝑒𝑥 − 𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |−𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |𝑒𝑦 |
maximum absolute error in subtraction = |𝑒𝑥 | + |𝑒𝑦 |
Method 3:
Let 𝑧 = 𝑥 − 𝑦 where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑧𝑚𝑎𝑥 = 𝑥𝑚𝑎𝑥 − 𝑦𝑚𝑖𝑛 , 𝑧𝑚𝑖𝑛 = 𝑥𝑚𝑖𝑛 − 𝑦𝑚𝑎𝑥
𝑧𝑚𝑎𝑥 − 𝑧𝑚𝑖𝑛
𝑒𝑟𝑟𝑜𝑟, 𝑒=
2
{ + 𝑒𝑥 − (𝑦 − 𝑒𝑦 )} − { − 𝑒𝑥 ) − (𝑦 + 𝑒𝑦 )}
(𝑥 ) (𝑥
=
2
(𝑥 − 𝑦) + (𝑒𝑥 + 𝑒𝑦 ) − {(𝑥 − 𝑦) − (𝑒𝑥 + 𝑒𝑦 )}
=
2
2(𝑒𝑥 + 𝑒𝑦 )
=
2
𝑒 = 𝑒𝑥 + 𝑒𝑦
|𝑒| = |𝑒𝑥 + 𝑒𝑦 |
|𝑒| ≤ |𝑒𝑥 | + |𝑒𝑦 |
maximum absolute error in subtraction = |𝑒𝑥 | + |𝑒𝑦 |
In summary:
(i). The maximum possible error in the subtraction (𝑥 − 𝑦) is = |𝑒𝑥 | +
|𝑒𝑦 |.
(ii). The maximum relative error in the subtraction (𝑥 − 𝑦) is
|𝑒𝑥 | + |𝑒𝑦 | |𝑒𝑥 | + |𝑒𝑦 |
= , or, =
𝑥−𝑦 𝑋−𝑌
(iii). The maximum percentage error in the subtraction (𝑥 − 𝑦) is
|𝑒𝑥 | + |𝑒𝑦 | |𝑒𝑥 | + |𝑒𝑦 |
= × 100% , or, = × 100%
𝑥−𝑦 𝑋−𝑌
Relative Error in multiplication/product (xy)
If 𝑥 is a positive number rounded off to 𝑋 creating an error 𝑒𝑥 ; and if 𝑦 is a
positive number rounded off to 𝑌 creating an error 𝑒𝑦 ; the relative error
in the product (𝑥𝑦) can be got depending on the format of the question
asked.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 3


MASTERING A-LEVEL MATHEMATICS PAPER 2

Case 1: If the question asked is interpreted and requires one to get


Absolute error
relative error using the formula of: Relative error = ; such a
Exact value
question can be answered using any of the three methods below.
Method 1:
Let 𝑧 = 𝑥𝑦 where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒,
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦 , 𝑍 =𝑧−𝑒
𝑍 = 𝑋𝑌
𝑧 − 𝑒 = (𝑥 − 𝑒𝑥 )(𝑦 − 𝑒𝑦 )
𝑧 − 𝑒 = 𝑥𝑦 − 𝑥𝑒𝑦 − 𝑦𝑒𝑥 + 𝑒𝑥 𝑒𝑦
−𝑒 = −𝑥𝑒𝑦 − 𝑦𝑒𝑥 + 𝑒𝑥 𝑒𝑦
𝑒 = 𝑥𝑒𝑦 + 𝑦𝑒𝑥 − 𝑒𝑥 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0
∴ 𝑒 = 𝑦𝑒𝑥 + 𝑥𝑒𝑦
𝑒 𝑦𝑒𝑥 𝑥𝑒𝑦
= +
𝑧 𝑥𝑦 𝑥𝑦
𝑒 𝑒𝑥 𝑒𝑦
= +
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error in product = | | + | |
𝑥 𝑦
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦
exact, 𝑧 = (𝑥𝑦), approximate, 𝑍 = (𝑋𝑌)
𝑒𝑟𝑟𝑜𝑟, 𝑒 = (𝑥𝑦) − (𝑋𝑌)
= (𝑥𝑦) − {(𝑥 − 𝑒𝑥 )(𝑦 − 𝑒𝑦 )}
= (𝑥𝑦) − {𝑥𝑦 − 𝑥𝑒𝑦 − 𝑦𝑒𝑥 + 𝑒𝑥 𝑒𝑦 }
= 𝑥𝑒𝑦 + 𝑦𝑒𝑥 − 𝑒𝑥 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0
∴ 𝑒 = 𝑦𝑒𝑥 + 𝑥𝑒𝑦
𝑒 𝑦𝑒𝑥 𝑥𝑒𝑦
= +
𝑧 𝑥𝑦 𝑥𝑦

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 4


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑒 𝑒𝑥 𝑒𝑦
= +
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error in product = | | + | |
𝑥 𝑦
Method 3:
Let 𝑧 = 𝑥𝑦 where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑧𝑚𝑎𝑥 = 𝑥𝑚𝑎𝑥 𝑦𝑚𝑎𝑥 , 𝑧𝑚𝑖𝑛 = 𝑥𝑚𝑖𝑛 𝑦𝑚𝑖𝑛
𝑧𝑚𝑎𝑥 − 𝑧𝑚𝑖𝑛
error, 𝑒=
2
{(𝑥 + 𝑒𝑥 )(𝑦 + 𝑒𝑦 )} − {(𝑥 − 𝑒𝑥 )(𝑦 − 𝑒𝑦 )}
=
2
{𝑥𝑦 + 𝑥𝑒𝑦 + 𝑦𝑒𝑥 + 𝑒𝑥 𝑒𝑦 } − {𝑥𝑦 − 𝑥𝑒𝑦 − 𝑦𝑒𝑥 + 𝑒𝑥 𝑒𝑦 }
=
2
2(𝑥𝑒𝑦 + 𝑦𝑒𝑥 )
=
2
∴ 𝑒 = 𝑦𝑒𝑥 + 𝑥𝑒𝑦
𝑒 𝑦𝑒𝑥 𝑥𝑒𝑦
= +
𝑧 𝑥𝑦 𝑥𝑦
𝑒 𝑒𝑥 𝑒𝑦
= +
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error in product = | | + | |
𝑥 𝑦
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Exact value
approximate values must be eliminated such that only the exact values
and the errors of the approximate values remain.

Case 2: If the question asked is interpreted and requires one to get


Absolute error
relative error using the formula of: Relative error = ;
Approximate value
such a question can be answered using any of the two methods below.
Method 1:

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 5


MASTERING A-LEVEL MATHEMATICS PAPER 2

Let 𝑧 = 𝑥𝑦 where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦


respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒, 𝑍 = 𝑋𝑌
𝑧 = 𝑥𝑦
𝑍 + 𝑒 = (𝑋 + 𝑒𝑥 )(𝑌 + 𝑒𝑦 )
𝑍 + 𝑒 = 𝑋𝑌 + 𝑋𝑒𝑦 + 𝑌𝑒𝑥 + 𝑒𝑥 𝑒𝑦
𝑒 = 𝑋𝑒𝑦 + 𝑌𝑒𝑥 + 𝑒𝑥 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0
∴ 𝑒 = 𝑌𝑒𝑥 + 𝑋𝑒𝑦
𝑒 𝑌𝑒𝑥 𝑋𝑒𝑦
= +
𝑍 𝑋𝑌 𝑋𝑌
𝑒 𝑒𝑥 𝑒𝑦
= +
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |=| + |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑍 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error in product = | | + | |
𝑋 𝑌
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
exact, 𝑧 = (𝑥𝑦), approximate, 𝑍 = (𝑋𝑌)
error, 𝑒 = (𝑥𝑦) − (𝑋𝑌)
= {(𝑋 + 𝑒𝑥 )(𝑌 + 𝑒𝑦 )} − (𝑋𝑌)
= {𝑋𝑌 + 𝑋𝑒𝑦 + 𝑌𝑒𝑥 + 𝑒𝑥 𝑒𝑦 } − (𝑋𝑌)
= 𝑋𝑒𝑦 + 𝑌𝑒𝑥 + 𝑒𝑥 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0
∴ 𝑒 = 𝑌𝑒𝑥 + 𝑋𝑒𝑦
𝑒 𝑌𝑒𝑥 𝑋𝑒𝑦
= +
𝑍 𝑋𝑌 𝑋𝑌
𝑒 𝑒𝑥 𝑒𝑦
= +
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |=| + |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑍 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error in product = | | + | |
𝑋 𝑌
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Approximate value

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 6


MASTERING A-LEVEL MATHEMATICS PAPER 2

exact values must be eliminated such that only the approximate values
together with their corresponding errors remain. Note also that Method 3
can’t work in this case since that method involves using the exact values
yet they have to be eliminated.
In summary:
(i). The maximum possible error in the product (𝑥𝑦) is
= 𝑦|𝑒𝑥 | + 𝑥|𝑒𝑦 | , or, = 𝑌|𝑒𝑥 | + 𝑌|𝑒𝑦 |
(ii). The maximum relative error in the product (𝑥𝑦)is
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= | |+| | , or, =| |+| |
𝑥 𝑦 𝑋 𝑌
(iii). The maximum percentage error in the product (𝑥𝑦) is
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= {| | + | |} × 100% , or, = {| | + | |} × 100%
𝑥 𝑦 𝑋 𝑌
Relative Error in multiplication/product (x y) 2

If 𝑥 is a positive number rounded off to 𝑋 creating an error 𝑒𝑥 ; and if 𝑦 is a


positive number rounded off to 𝑌 creating an error 𝑒𝑦 ; the error in the
product (𝑥 2 𝑦) can be got depending on the format of the question asked.
Case 1: If the question asked is interpreted and requires one to get
Absolute error
relative error using the formula of: Relative error = ; such a
Exact value
question can be answered using any of the two methods below.
Method 1:
Let 𝑧 = 𝑥 2 𝑦 where 𝑥 and 𝑦 are rounded off with errors 𝑒𝑥 and 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒,
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦 , 𝑍 =𝑧−𝑒
2
𝑍=𝑋 𝑌
𝑧 − 𝑒 = (𝑥 − 𝑒𝑥 )2 (𝑦 − 𝑒𝑦 )
𝑧 − 𝑒 = (𝑥 2 − 2𝑥𝑒𝑥 + 𝑒𝑥 2 )(𝑦 − 𝑒𝑦 )
𝑧 − 𝑒 = 𝑦𝑥 2 − 2𝑥𝑦𝑒𝑥 + 𝑦𝑒𝑥 2 − 𝑥 2 𝑒𝑦 + 2𝑥𝑒𝑥 𝑒𝑦 − 𝑒𝑥 2 𝑒𝑦
−𝑒 = −2𝑥𝑦𝑒𝑥 + 𝑦𝑒𝑥 2 − 𝑥 2 𝑒𝑦 + 2𝑥𝑒𝑥 𝑒𝑦 − 𝑒𝑥 2 𝑒𝑦
𝑒 = 2𝑥𝑦𝑒𝑥 − 𝑦𝑒𝑥 2 + 𝑥 2 𝑒𝑦 − 2𝑥𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, 𝑎𝑛𝑑,
𝑒𝑥 2 𝑒𝑦 ≈ 0
𝑒 = 2𝑥𝑦𝑒𝑥 + 𝑥 2 𝑒𝑦
𝑒 2𝑥𝑦𝑒𝑥 𝑥 2 𝑒𝑦
= 2 + 2
𝑧 𝑥 𝑦 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
= +
𝑧 𝑥 𝑦

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 7


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑒 2𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑥 𝑦
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 and 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦
exact, 𝑧 = (𝑥 2 𝑦), approximate, 𝑍 = (𝑋 2 𝑌)
error, 𝑒 = (𝑥 2 𝑦) − (𝑋 2 𝑌)
= (𝑥 2 𝑦) − {(𝑥 − 𝑒𝑥 )2 (𝑦 − 𝑒𝑦 )}
= (𝑥 2 𝑦) − {(𝑥 2 − 2𝑥𝑒𝑥 + 𝑒𝑥 2 )(𝑦 − 𝑒𝑦 )}
= (𝑥 2 𝑦) − {𝑦𝑥 2 − 2𝑥𝑦𝑒𝑥 + 𝑦𝑒𝑥 2 − 𝑥 2 𝑒𝑦 + 2𝑥𝑒𝑥 𝑒𝑦 − 𝑒𝑥 2 𝑒𝑦 }
= 2𝑥𝑦𝑒𝑥 − 𝑦𝑒𝑥 2 + 𝑥 2 𝑒𝑦 − 2𝑥𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, and,
𝑒𝑥 2 𝑒𝑦 ≈ 0
𝑒 = 2𝑥𝑦𝑒𝑥 + 𝑥 2 𝑒𝑦
𝑒 2𝑥𝑦𝑒𝑥 𝑥 2 𝑒𝑦
= 2 + 2
𝑧 𝑥 𝑦 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
= +
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑥 𝑦
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Exact value
approximate values must be eliminated such that only the exact values
and the errors of the approximate values remain.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 8


MASTERING A-LEVEL MATHEMATICS PAPER 2

Case 2: If the question asked is interpreted and requires one to get


Absolute error
relative error using the formula of: Relative error = ;
Approximate value
such a question can be answered using any of the two methods below.
Method 1:
Let 𝑧 = 𝑥 2 𝑦 where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒,
𝑧 = 𝑥 2𝑦
𝑍 + 𝑒 = (𝑋 + 𝑒𝑥 )2 (𝑌 + 𝑒𝑦 )
𝑍 + 𝑒 = (𝑋 2 + 2𝑋𝑒𝑥 + 𝑒𝑥 2 )(𝑌 + 𝑒𝑦 )
𝑍 + 𝑒 = 𝑌𝑋 2 + 2𝑋𝑌𝑒𝑥 + 𝑌𝑒𝑥 2 + 𝑋 2 𝑒𝑦 + 2𝑋𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
𝑒 = 2𝑋𝑌𝑒𝑥 + 𝑌𝑒𝑥 2 + 𝑋 2 𝑒𝑦 + 2𝑋𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, and,
2
𝑒𝑥 𝑒𝑦 ≈ 0
∴ 𝑒 = 2𝑋𝑌𝑒𝑥 + 𝑋 2 𝑒𝑦
𝑒 2𝑋𝑌𝑒𝑥 𝑋 2 𝑒𝑦
= 2 + 2
𝑧 𝑋 𝑌 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
= +
𝑧 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑧 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑋 𝑌
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦

exact, 𝑧 = (𝑥 2 𝑦), approximate, 𝑍 = (𝑋 2 𝑌)


error, 𝑒 = (𝑥 2 𝑦) − (𝑋 2 𝑌)
= {(𝑋 + 𝑒𝑥 )2 (𝑌 + 𝑒𝑦 )} − (𝑋 2 𝑌)
= {(𝑋 2 + 2𝑋𝑒𝑥 + 𝑒𝑥 2 )(𝑌 + 𝑒𝑦 )} − (𝑋 2 𝑌)
= {𝑌𝑋 2 + 2𝑋𝑌𝑒𝑥 + 𝑌𝑒𝑥 2 + 𝑋 2 𝑒𝑦 + 2𝑋𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦 } − (𝑋 2 𝑌)
= 2𝑋𝑌𝑒𝑥 + 𝑌𝑒𝑥 2 + 𝑋 2 𝑒𝑦 + 2𝑋𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, and,
2
𝑒𝑥 𝑒𝑦 ≈ 0

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 9


MASTERING A-LEVEL MATHEMATICS PAPER 2

∴ 𝑒 = 2𝑋𝑌𝑒𝑥 + 𝑋 2 𝑒𝑦
𝑒 2𝑋𝑌𝑒𝑥 𝑋 2 𝑒𝑦
= 2 + 2
𝑧 𝑋 𝑌 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
= +
𝑧 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |=| + |
𝑧 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑧 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑋 𝑌
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Approximate value
exact values must be eliminated such that only the approximate values
together with their corresponding errors remain. Note also that Method 3
can’t work in this case since that method involves using the exact values
yet they have to be eliminated.
In summary:
(i). The maximum possible error in the product (𝑥 2 𝑦) is
= 2𝑥𝑦|𝑒𝑥 | + 𝑥 2 |𝑒𝑦 | , or, = 2𝑋𝑌|𝑒𝑥 | + 𝑋 2 |𝑒𝑦 |
(ii). The maximum relative error in the product (𝑥 2 𝑦) is
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= 2| |+ | | , or, = 2| | + | |
𝑥 𝑦 𝑋 𝑌
(iii). The maximum percentage error in the product (𝑥 𝑦) is 2
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= {2 | | + | |} × 100% , or, = {2 | | + | |} × 100%
𝑥 𝑦 𝑋 𝑌
Likely questions for error in product:
Qn 1: The numbers X and Y were estimated with maximum possible
errors of ∆𝑋 and ∆𝑌 respectively. Show that the percentage relative error
in 𝑋𝑌
∆𝑋 ∆𝑌
[ + ] × 100%
𝑋 𝑌
Qn 2: Two numbers X and Y are rounded to 𝑥 𝑎𝑛𝑑 𝑦 with errors 𝑒1 𝑎𝑛𝑑 𝑒2
respectively. Show that the maximum relative error made in the
approximating 𝑋 2 𝑌 by 𝑥 2 𝑦 is
𝑒1 𝑒2
2 | | + | |.
𝑥 𝑦
Qn 3: Two decimal numbers 𝑥 𝑎𝑛𝑑 𝑦 are recorded off to give 𝑋 and 𝑌
with the errors 𝐸1 𝑎𝑛𝑑 𝐸2 respectively. Show that the maximum relative
error recorded in approximating 𝑥 2 𝑦 𝑏𝑦 𝑋 2 𝑌 is given by:

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 10


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝐸1 𝐸2
2| |+| |
𝑋 𝑌
Relative Error in division/quotient (x/y)
If 𝑥 is a positive number rounded off to 𝑋 creating an error 𝑒𝑥 ; and if 𝑦 is a
positive number rounded off to 𝑌 creating an error 𝑒𝑦 ; the error in the
product (𝑥 ⁄𝑦) can be got depending on the format of the question asked.
Case 1: If the question asked is interpreted and requires one to get
Absolute error
relative error using the formula of: Relative error = ; such a
Exact value
question can be answered using any of the two methods below.
Method 1:
𝑥
Let 𝑧 = where 𝑥 𝑎𝑛𝑑 𝑦 are rounded off with errors 𝑒𝑥 and 𝑒𝑦
𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 =𝑍+𝑒
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦 , 𝑍 =𝑧−𝑒
𝑋
𝑍=
𝑌
𝑥 − 𝑒𝑥
𝑧−𝑒 =
𝑦 − 𝑒𝑦
(𝑥 − 𝑒𝑥 ) × (𝑦 + 𝑒𝑦 )
𝑧−𝑒 =
(𝑦 − 𝑒𝑦 ) × (𝑦 + 𝑒𝑦 )
𝑥𝑦 − 𝑥𝑒𝑦 + 𝑦𝑒𝑥 − 𝑒𝑥 𝑒𝑦
𝑧−𝑒 =
𝑦 2 − 𝑒𝑦 2
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑦 2 ≈ 0
𝑥𝑦 − 𝑥𝑒𝑦 + 𝑦𝑒𝑥
𝑧−𝑒 =
𝑦2
𝑥𝑦 𝑥𝑒𝑦 𝑦𝑒𝑥
𝑧−𝑒 = 2 − 2 + 2
𝑦 𝑦 𝑦
𝑥 𝑥𝑒𝑦 𝑒𝑥
𝑍+𝑒 = − 2 +
𝑦 𝑦 𝑦
𝑒𝑥 𝑥𝑒𝑦
𝑒= − 2
𝑦 𝑦
𝑒 𝑒𝑥 𝑥𝑒𝑦 𝑥
= ( − 2 )⁄( )
𝑧 𝑦 𝑦 𝑦
𝑒 𝑒𝑥 𝑥𝑒𝑦 𝑦
= ( − 2 )( )
𝑧 𝑦 𝑦 𝑥
𝑒 𝑒𝑥 𝑒𝑦
= −
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |=| − |
𝑧 𝑥 𝑦

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 11


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑒 𝑒𝑥 𝑒𝑦
| | ≤ | | + |− |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error = | | + | |
𝑥 𝑦
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 𝑎𝑛𝑑 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦
𝑥 𝑋
exact = , approximate =
𝑦 𝑌
𝑥 𝑋 𝑥 𝑥 − 𝑒𝑥
error, 𝑒 = − = −{ }
𝑦 𝑌 𝑦 𝑦 − 𝑒𝑦
𝑥 (𝑥 − 𝑒𝑥 ) × (𝑦 + 𝑒𝑦 ) 𝑥 𝑥𝑦 + 𝑥𝑒𝑦 − 𝑦𝑒𝑥 − 𝑒𝑥 𝑒𝑦
= −{ }= −
𝑦 (𝑦 − 𝑒𝑦 ) × (𝑦 + 𝑒𝑦 ) 𝑦 𝑦 2 − 𝑒𝑦 2
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑦 2 ≈ 0
𝑥 𝑥𝑦 − 𝑥𝑒𝑦 + 𝑦𝑒𝑥
∴𝑒= −
𝑦 𝑦2
𝑥 𝑥𝑦 𝑥𝑒𝑦 𝑦𝑒𝑥
= − 2+ 2 − 2
𝑦 𝑦 𝑦 𝑦
𝑥𝑒𝑦 𝑒𝑥
𝑒= 2 −
𝑦 𝑦
𝑒 𝑥𝑒𝑦 𝑒𝑥 𝑥
= ( 2 − )⁄( )
𝑧 𝑦 𝑦 𝑦
𝑒 𝑥𝑒𝑦 𝑒𝑥 𝑦
= ( 2 − )( )
𝑧 𝑦 𝑦 𝑥
𝑒 𝑒𝑦 𝑒𝑥
= −
𝑧 𝑦 𝑥
𝑒 𝑒𝑥 𝑒𝑦
| | = |− + |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ |− | + | |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error = | | + | |
𝑥 𝑦
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Exact value

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 12


MASTERING A-LEVEL MATHEMATICS PAPER 2

approximate values must be eliminated such that only the exact values
and the errors of the approximate values remain.

Case 2: If the question asked is interpreted and requires one to get


Absolute error
relative error using the formula of: Relative error = ;
Approximate value
such a question can be answered using any of the two methods below.
Method 1:
𝑥
Let 𝑧 = where 𝑥 and 𝑦 are rounded off with errors 𝑒𝑥 and 𝑒𝑦
𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒,
𝑥
𝑧=
𝑦
𝑋 + 𝑒𝑥
𝑍+𝑒 =
𝑌 + 𝑒𝑦
(𝑋 + 𝑒𝑥 ) × (𝑌 − 𝑒𝑦 )
𝑍+𝑒 =
(𝑌 + 𝑒𝑦 ) × (𝑌 − 𝑒𝑦 )
𝑋𝑌 − 𝑋𝑒𝑦 + 𝑌𝑒𝑥 − 𝑒𝑥 𝑒𝑦
𝑍+𝑒 =
𝑌 2 − 𝑒𝑦 2
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑦 2 ≈ 0
𝑋𝑌 − 𝑋𝑒𝑦 + 𝑌𝑒𝑥
𝑍+𝑒 =
𝑌2
𝑋𝑌 𝑋𝑒𝑦 𝑌𝑒𝑥
𝑍+𝑒 = 2 − 2 + 2
𝑌 𝑌 𝑌
𝑋 𝑋𝑒𝑦 𝑒𝑥
𝑍+𝑒 = − 2 +
𝑌 𝑌 𝑌
𝑒𝑥 𝑋𝑒𝑦
𝑒= − 2
𝑌 𝑌
𝑒 𝑒𝑥 𝑋𝑒𝑦 𝑋
= ( − 2 )⁄( )
𝑍 𝑌 𝑌 𝑌
𝑒 𝑒𝑥 𝑋𝑒𝑦 𝑌
= ( − 2 )( )
𝑍 𝑌 𝑌 𝑋
𝑒 𝑒𝑥 𝑒𝑦
= −
𝑧 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |=| − |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ | | + |− |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑍 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error = | | + | |
𝑋 𝑌

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 13


MASTERING A-LEVEL MATHEMATICS PAPER 2

Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 and 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
𝑥 𝑋
exact, 𝑧 = , approximate, 𝑍 =
𝑦 𝑌
𝑥 𝑋
error, 𝑒= −
𝑦 𝑌
𝑋 + 𝑒𝑥 𝑋
={ }−
𝑌 + 𝑒𝑦 𝑌
(𝑋 + 𝑒𝑥 ) × (𝑌 − 𝑒𝑦 ) 𝑋
={ }−
(𝑌 + 𝑒𝑦 ) × (𝑌 − 𝑒𝑦 ) 𝑌
𝑋𝑌 − 𝑋𝑒𝑦 + 𝑌𝑒𝑥 − 𝑒𝑥 𝑒𝑦 𝑋
= −
𝑌 2 − 𝑒𝑦 2 𝑌
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑦 2 ≈ 0
𝑋𝑌 − 𝑋𝑒𝑦 + 𝑌𝑒𝑥 𝑋
𝑒= −
𝑌2 𝑌
𝑋𝑌 𝑋𝑒𝑦 𝑌𝑒𝑥 𝑋
= 2− 2 + 2 −
𝑌 𝑌 𝑌 𝑌
𝑋 𝑋𝑒𝑦 𝑒𝑥 𝑋
= − 2 + −
𝑌 𝑌 𝑌 𝑌
𝑒𝑥 𝑋𝑒𝑦
∴𝑒= − 2
𝑌 𝑌
𝑒 𝑒𝑥 𝑋𝑒𝑦 𝑋
= ( − 2 )⁄( )
𝑍 𝑌 𝑌 𝑌
𝑒 𝑒𝑥 𝑋𝑒𝑦 𝑌
= ( − 2 )( )
𝑍 𝑌 𝑌 𝑋
𝑒 𝑒𝑥 𝑒𝑦
= −
𝑧 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |=| − |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ | | + |− |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| |≤| |+| |
𝑍 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error = | | + | |
𝑋 𝑌
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Approximate value
exact values must be eliminated such that only the approximate values
together with their corresponding errors remain. Note also that Method 3

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 14


MASTERING A-LEVEL MATHEMATICS PAPER 2

can’t work in this case since that method involves using the exact values
yet they have to be eliminated.
In summary:
(i). The maximum possible error in the quotient (𝑥 ⁄𝑦) is
|𝑒𝑥 | 𝑥|𝑒𝑦 | |𝑒𝑥 | 𝑋|𝑒𝑦 |
= + 2 , or, = + 2
𝑦 𝑦 𝑌 𝑌
𝑒𝑥 𝑋𝑒𝑦
− 2
𝑌 𝑌
(ii). The maximum relative error in the quotient (𝑥 ⁄𝑦) is
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= | |+| | , or, =| |+| |
𝑥 𝑦 𝑋 𝑌
(iii). The maximum percentage error in the quotient (𝑥 ⁄𝑦) is
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= {| | + | |} × 100% , or, = {| | + | |} × 100%
𝑥 𝑦 𝑋 𝑌
Error in division/quotient (x /y) 2

If 𝑥 is a positive number rounded off to 𝑋 creating an error 𝑒𝑥 ; and if 𝑦 is a


positive number rounded off to 𝑌 creating an error 𝑒𝑦 ; the error in the
product (𝑥 2 ⁄𝑦) can be got depending on the format of the question asked.
Case 1: If the question asked is interpreted and requires one to get
Absolute error
relative error using the formula of: Relative error = ; such a
Exact value
question can be answered using any of the two methods below.
Method 1:
𝑥2
Let 𝑧 = where 𝑥 and 𝑦 are rounded off with errors 𝑒𝑥 and 𝑒𝑦
𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 =𝑍+𝑒
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦 , 𝑍 =𝑧−𝑒
2
𝑋
𝑍=
𝑌
(𝑥 − 𝑒𝑥 )2
𝑧−𝑒 =
𝑦 − 𝑒𝑦
(𝑥 − 2𝑥𝑒𝑥 + 𝑒𝑥 2 ) × (𝑦 + 𝑒𝑦 )
2
𝑧−𝑒 =
(𝑦 − 𝑒𝑦 ) × (𝑦 + 𝑒𝑦 )
𝑦𝑥 − 2𝑥𝑦𝑒𝑥 + 𝑦𝑒𝑥 2 + 𝑥 2 𝑒𝑦 − 2𝑥𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
2
𝑧−𝑒 =
𝑦 2 − 𝑒𝑦 2
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦,
⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, 𝑒𝑥 2 ≈ 0 and 𝑒𝑥 2 𝑒𝑦 ≈ 0
𝑦𝑥 2 − 2𝑥𝑦𝑒𝑥 + 𝑥 2 𝑒𝑦
𝑧−𝑒 =
𝑦2

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 15


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑦𝑥 2 2𝑥𝑦𝑒𝑥 𝑥 2 𝑒𝑦
𝑧−𝑒 = 2 − + 2
𝑦 𝑦2 𝑦
2 2
𝑥 2𝑥𝑒𝑥 𝑥 𝑒𝑦
𝑧−𝑒 = − + 2
𝑦 𝑦 𝑦
2
2𝑥𝑒𝑥 𝑥 𝑒𝑦
−𝑒 = − + 2
𝑦 𝑦
2
2𝑥𝑒𝑥 𝑥 𝑒𝑦
𝑒= − 2
𝑦 𝑦
2
𝑒 2𝑥𝑒𝑥 𝑥 𝑒𝑦 𝑥2
=( − 2 )⁄( )
𝑧 𝑦 𝑦 𝑦
2
𝑒 2𝑥𝑒𝑥 𝑥 𝑒𝑦 𝑦
=( − 2 ) ( 2)
𝑧 𝑦 𝑦 𝑥
𝑒 2𝑒𝑥 𝑒𝑦
= −
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |=| − |
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| | + |− |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑥 𝑦
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 and 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
⟹ 𝑋 = 𝑥 − 𝑒𝑥 , 𝑌 = 𝑦 − 𝑒𝑦
2
𝑥 𝑋2
exact, 𝑧 = , approximate, 𝑍 =
𝑦 𝑌
2 2 (𝑥 − 𝑒𝑥 )2
𝑥 𝑋 𝑥
error, 𝑒= − = −{ }
𝑦 𝑌 𝑦 𝑦 − 𝑒𝑦
𝑥 (𝑥 2 − 2𝑥𝑒𝑥 + 𝑒𝑥 2 ) × (𝑦 + 𝑒𝑦 )
= −{ }
𝑦 (𝑦 − 𝑒𝑦 ) × (𝑦 + 𝑒𝑦 )
𝑥 𝑦𝑥 2 − 2𝑥𝑦𝑒𝑥 + 𝑦𝑒𝑥 2 + 𝑥 2 𝑒𝑦 − 2𝑥𝑒𝑥 𝑒𝑦 + 𝑒𝑥 2 𝑒𝑦
= −
𝑦 𝑦 2 − 𝑒𝑦 2
suppose 𝑒𝑥 ≪ 𝑥 and 𝑒𝑦 ≪ 𝑦,
⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, 𝑒𝑥 2 ≈ 0 and 𝑒𝑥 2 𝑒𝑦 ≈ 0

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 16


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑥 𝑦𝑥 2 − 2𝑥𝑦𝑒𝑥 + 𝑥 2 𝑒𝑦
= −
𝑦 𝑦2
𝑥 𝑦𝑥 2 2𝑥𝑦𝑒𝑥 𝑥 2 𝑒𝑦
= − 2 + − 2
𝑦 𝑦 𝑦2 𝑦
2
2𝑥𝑒𝑥 𝑥 𝑒𝑦
= − 2
𝑦 𝑦
2
𝑒 2𝑥𝑒𝑥 𝑥 𝑒𝑦 𝑥2
=( − 2 )⁄( )
𝑧 𝑦 𝑦 𝑦
2
𝑒 2𝑥𝑒𝑥 𝑥 𝑒𝑦 𝑦
=( − 2 ) ( 2)
𝑧 𝑦 𝑦 𝑥
𝑒 2𝑒𝑥 𝑒𝑦
= −
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |=| − |
𝑧 𝑥 𝑦
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| | + |− |
𝑧 𝑥 𝑦
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑧 𝑥 𝑦
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑥 𝑦
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Exact value
approximate values must be eliminated such that only the exact values
and the errors of the approximate values remain.

Case 2: If the question asked is interpreted and requires one to get


Absolute error
relative error using the formula of: Relative error = ;
Approximate value
such a question can be answered using any of the two methods below.
Method 1:
𝑥2
Let 𝑧 = where 𝑥 and 𝑦 are rounded off with errors 𝑒𝑥 and 𝑒𝑦
𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦 , 𝑧 = 𝑍 + 𝑒,
2
𝑥
𝑧=
𝑦
(𝑋 + 𝑒𝑥 )2
𝑍+𝑒 =
𝑌 + 𝑒𝑦

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 17


MASTERING A-LEVEL MATHEMATICS PAPER 2

(𝑋 2 + 2𝑋𝑒𝑥 + 𝑒𝑥 2 ) × (𝑌 − 𝑒𝑦 )
𝑍+𝑒=
(𝑌 + 𝑒𝑦 ) × (𝑌 − 𝑒𝑦 )
𝑌𝑋 + 2𝑋𝑌𝑒𝑥 + 𝑌𝑒𝑥 2 − 𝑋 2 𝑒𝑦 − 2𝑋𝑒𝑥 𝑒𝑦 − 𝑒𝑥 2 𝑒𝑦
2
𝑍+𝑒=
𝑌 2 − 𝑒𝑦 2
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌,
⟹ 𝑒𝑥 𝑒𝑦 ≈ 0, 𝑒𝑥 2 ≈ 0, 𝑒𝑥 2 ≈ 0 and 𝑒𝑥 2 𝑒𝑦 ≈ 0
𝑌𝑋 2 + 2𝑋𝑌𝑒𝑥 − 𝑋 2 𝑒𝑦
𝑍+𝑒 =
𝑌2
𝑌𝑋 2
2𝑋𝑌𝑒𝑥 𝑋 2 𝑒𝑦
𝑧−𝑒 = 2 + − 2
𝑌 𝑌2 𝑌
2 2
𝑋 2𝑋𝑒𝑥 𝑋 𝑒𝑦
𝑧−𝑒 = − + 2
𝑌 𝑌 𝑌
2𝑋𝑒𝑥 𝑋 2 𝑒𝑦
−𝑒 = − + 2
𝑌 𝑌
2
2𝑋𝑒𝑥 𝑋 𝑒𝑦
𝑒= − 2
𝑌 𝑌
𝑒 2𝑋𝑒𝑥 𝑋 2 𝑒𝑦 𝑋2
=( − 2 )⁄( )
𝑍 𝑌 𝑌 𝑌
2
𝑒 2𝑋𝑒𝑥 𝑋 𝑒𝑦 𝑌
=( − 2 ) ( 2)
𝑍 𝑌 𝑌 𝑋
𝑒 2𝑒𝑥 𝑒𝑦
= −
𝑍 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |=| − |
𝑍 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| | + |− |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑍 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑋 𝑌
Method 2:
Let 𝑋 and 𝑌 be the approximations to 𝑥 and 𝑦, with errors 𝑒𝑥 and 𝑒𝑦
respectively.
𝑥 = 𝑋 + 𝑒𝑥 , 𝑦 = 𝑌 + 𝑒𝑦
𝑥2 𝑋2
exact, 𝑧 = , approximate, 𝑍 =
𝑦 𝑌
2 2 2
𝑥 𝑋 (𝑋 + 𝑒𝑥 ) 𝑋2
error, 𝑒= − ={ }−
𝑦 𝑌 𝑌 + 𝑒𝑦 𝑌

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 18


MASTERING A-LEVEL MATHEMATICS PAPER 2

(𝑋 2 + 2𝑋𝑒𝑥 + 𝑒𝑥 2 ) × (𝑌 − 𝑒𝑦 ) 𝑋2
={ }−
(𝑌 + 𝑒𝑦 ) × (𝑌 − 𝑒𝑦 ) 𝑌
𝑌𝑋 2 + 2𝑋𝑌𝑒𝑥 + 𝑌𝑒𝑥 2 − 𝑋 2 𝑒𝑦 − 2𝑋𝑒𝑥 𝑒𝑦 − 𝑒𝑥 2 𝑒𝑦 𝑋 2
= −
𝑌 2 − 𝑒𝑦 2 𝑌
suppose 𝑒𝑥 ≪ 𝑋 and 𝑒𝑦 ≪ 𝑌, ⟹ 𝑒𝑥 𝑒𝑦 ≈ 𝑒𝑥 ≈ 𝑒𝑥 ≈ 0 and 𝑒𝑥 2 𝑒𝑦 ≈ 0
2 2

𝑌𝑋 2 + 2𝑋𝑌𝑒𝑥 − 𝑋 2 𝑒𝑦 𝑋 2
∴𝑒= −
𝑌2 𝑌
2 2
𝑌𝑋 2𝑋𝑌𝑒𝑥 𝑋 𝑒𝑦 𝑋 2
𝑒= 2 + − 2 −
𝑌 𝑌2 𝑌 𝑌
2𝑋𝑌𝑒𝑥 𝑋 2 𝑒𝑦
𝑒= − 2
𝑌2 𝑌
2
𝑒 2𝑋𝑒𝑥 𝑋 𝑒𝑦 𝑋2
=( − 2 )⁄( )
𝑍 𝑌 𝑌 𝑌
2
𝑒 2𝑋𝑒𝑥 𝑋 𝑒𝑦 𝑌
=( − 2 ) ( 2)
𝑍 𝑌 𝑌 𝑋
𝑒 2𝑒𝑥 𝑒𝑦
= −
𝑍 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |=| − |
𝑍 𝑋 𝑌
𝑒 2𝑒𝑥 𝑒𝑦
| |≤| | + |− |
𝑍 𝑋 𝑌
𝑒 𝑒𝑥 𝑒𝑦
| | ≤ 2| | + | |
𝑍 𝑋 𝑌
𝑒𝑥 𝑒𝑦
maximum relative error = 2 | | + | |
𝑋 𝑌
Note that in this case where the question asked requires one to get
Absolute error
relative error using the formula of: Relative error = ; the
Approximate value
exact values must be eliminated such that only the approximate values
together with their corresponding errors remain. Note also that Method 3
can’t work in this case since that method involves using the exact values
yet they have to be eliminated.
In summary:
(i). The maximum possible error in the quotient (𝑥 2 ⁄𝑦) is
2𝑥|𝑒𝑥 | 𝑥 2 |𝑒𝑦 | 2𝑋|𝑒𝑥 | 𝑋 2 |𝑒𝑦 |
= + , or, = +
𝑦 𝑦2 𝑌 𝑌2
(ii). The maximum relative error in the quotient (𝑥 2 ⁄𝑦) is
𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= 2| |+ | | , or, = 2| | + | |
𝑥 𝑦 𝑋 𝑌
(iii). The maximum percentage error in the quotient (𝑥 𝑦) is
2⁄

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 19


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑒𝑥 𝑒𝑦 𝑒𝑥 𝑒𝑦
= {2 | | + | |} × 100% , or, = {2 | | + | |} × 100%
𝑥 𝑦 𝑋 𝑌
Likely questions for error in Quotient
Qn 1: X and Y are approximate values with errors X, Y respectively.
𝑋
Show that the maximum error in is
𝑌
𝑋 ∆𝑋 ∆𝑌
{| | + | |}.
𝑌 𝑋 𝑌
Qn 2: The numbers X and Y are rounded off to 𝑥 𝑎𝑛𝑑 𝑦 with the errors
𝑒1 𝑎𝑛𝑑 𝑒2 respectively. Show that the maximum relative error made in the
approximation of
𝑋 𝑥 𝑒1 𝑒2
𝑏𝑦 𝑖𝑠, | | + | |.
𝑌 𝑦 𝑥 𝑦
Qn 3: The numbers A and B are rounded off to 𝑎 𝑎𝑛𝑑 𝑏 with the errors
𝑒1 𝑎𝑛𝑑 𝑒2 respectively. Show that the maximum relative error made in the
approximation of
𝐴 𝑎 𝑒1 𝑒2
𝑏𝑦 𝑖𝑠, | | + | |.
𝐵 𝑏 𝑎 𝑏
Qn 4: The numbers 𝑥 𝑎𝑛𝑑 𝑦 are approximated with possible errors of
∆𝑥 𝑎𝑛𝑑 ∆𝑦 respectively. Show that the maximum absolute error in the
𝑥
quotient is given by
𝑦
𝑦∆𝑥 + 𝑥∆𝑦
𝑦2
Qn 5: The numbers 𝑥 𝑎𝑛𝑑 𝑦 are measured with possible errors of
∆𝑥 𝑎𝑛𝑑 ∆𝑦 respectively. Show that the maximum absolute error in the
𝑥
quotient is given by
𝑦
|𝑦||∆𝑥| + |𝑥||∆𝑦|
𝑦2

CHAPTER 5: FLOW CHARTS


A flow chart is an algorithm give to a computer/machine to solve a
problem.
An algorithm is a step by step procedure that requires a finite number of
steps.
A numerical method is an algorithm for finding a numerical quantity to a
prescribed accuracy. e.g.
𝐵
(i). If 𝐴𝑥 = 𝐵, then = . This method of solution of the equation is an
𝐴
example of an algorithm.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 20


MASTERING A-LEVEL MATHEMATICS PAPER 2

−𝐵±√𝐵2 −4𝐴𝐶
(ii). If 𝐴𝑥 2 + 𝐵𝑥 + 𝐶 = 0, then 𝑥 = is an algorithm for solving
2𝐴
the quadratic equation.
A problem may be, finding the sum, mean, power or factorial of particular
numbers (counting number, natural numbers, whole numbers), finding
the root of an equation e.t.c.
The basic statements used in flow charts
In a flow chart, all steps needed to carry out an algorithm are broken
down into simple elements known as statements. There are no set rules
for drawing a flow chart. i.e. the same program can be represented by
different flow charts.
However, there are six basic statements used in a flow chart used in a
flow chart.
1) Start (begin) statement
2) Read statement
3) Assignment statement
4) Conditional statement
5) Print statement
6) Stop (end) statement
(1). The “Start/begin” statement
The machine won’t start unless it is told to do so. The program to be fed
into the computer must have a “start” statement. This also must appear
on the flow chart.
According to the convention, the start statement is enclosed in an oval or
round ended box as shown below.

START OR START

(2). The “Read/input” statement


The read statement is an instruction to read the next number in the set of
data and give its value to a specific variable.
According to the convention, the read/input statement is enclosed in a
parallelogram shaped box as shown below.

READ: A, B

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 21


MASTERING A-LEVEL MATHEMATICS PAPER 2

The statement (READ: A, B) in this box means that the next two numbers
in the storage memory are read and they become values of A and B.
(3). The “Assignment” statement
The assignment statement has three parts;
i. The left part that represents the name of the variable.
ii. The operator which is in the middle. This can take any one of the
following =, ≠, >, ≥, <, ≤.
iii. The right part that represents the new value of the variable in the
left part.
According to the convention, the assignment statement is enclosed in a
rectangular shaped box.
Note: The operator “=” is used to mean, “… becomes equal to …” or “Let …
be equal to …”
For example:
Statement Meaning
This means that “𝑥 becomes 1.2”;
or “let 𝑥 be equal to 1.2.”; Or
“record the value 1.2 in the stored
x = 1.2 to be called 𝑥.”
Note: Such a statement in used in a
program where it is necessary to
give a quantity a known value.
This means that “let the constant 𝜋
be equal to 3.14.”
Note: Such a statement in used in a
π = 3.14 program where it is necessary to
give a quantity a known value.

This means that “𝑃 talkes on the


value of 𝑄.”; Or “copy the value
stored as 𝑄 in the storagememory
P=Q and store it as 𝑃.”
Note: Such a statement in used in a
program where it is necessary to
substitute a quantity held in one
store into another store.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 22


MASTERING A-LEVEL MATHEMATICS PAPER 2

This means that “modify the value


of N in the store by adding 1 to it.”
Or “the value stored in the memory
N=N+1 as N is incremented by 1.” Or “the
new value of N is equal to the old
value increased by 1.”
Note: Such a statement is used in a
program which requires a flow-
back via a loop.
This means that “record into the
store the quantity ‘Area’ which is
calculated by the formula 𝑟 2 .”
Area = πr2 Note: The calculation is done and
the information is stored from
output.

(4). The “Conditional/decision” statement


These are statements that require decisions to be taken or chosen on two
alternatives. A diamond shaped box is used so that the lines leaving the
box are labeled with decision results that cause each part to be followed.
The question in the box requires an answer; either “YES” or “NO” (or
“TRUE” or “FALSE”). Therefore there are only two arrows leaving the box;
one for “YES” another one for “NO”.
Questions like “what is the time?” are not allowed because you cannot
take decision as yes or no.
According to the convention, the conditional statement is enclosed in a
diamond or kite shaped box as shown below.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 23


MASTERING A-LEVEL MATHEMATICS PAPER 2

Is YES/NO
………….
?

YES/NO

For example, if the conditional statement is to direct the program along


one of the two branches depending on whether 𝑥 = 5 or not, the decision
box will be as follows

Is NO Is
YES
x=5 OR x=5
? ?

YES NO

Note: The decision box is often called a branch because it allows a


program to branch off to different operations when such a decision is
made. The branch in turn may form a loop within the program. Branches
and loops allow long repetitive calculations to be done.
(5). The “Print/write” statement
In this instruction, the current value of the variable(s) is/are written
down as final value(s) of these variables.
According to the convention, the print/write statement is enclosed in a
parallelogram shaped box.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 24


MASTERING A-LEVEL MATHEMATICS PAPER 2

PRINT: A, B

The statement (PRINT: A, B) in this box means that means that you print
out the value held in the stores called A and B respectively.
(6). The “Stop/end” statement
The machine has to be instructed to stop where necessary. Otherwise, it
will repeat the execution of the programme endlessly.
The “stop” instruction must be put on the flow chart at the end of the
program.
According to the convention, the stop statement is enclosed in an oval or
round ended box.

STOP OR STOP
Note: A flow chart may contain any number of “stop” statements but has
only one “start” statement.
The flow line
The arrows (shown below) which show the direction of the sequence of
statements are referred to as flow lines.
OR
So far, the six statements above can be connected together to form a flow
chart as shown below.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 25


MASTERING A-LEVEL MATHEMATICS PAPER 2

START

Read statement

Assignment
statement

Decision No
statement

Yes

Print statement

STOP
Counters, loops and sentinels
We use the counter when we know the exact number of equations to be
solved. A counter is made to increase by a specific quantity e.g. 1, 2, 3, e.t.c
A loop is a group of statements that are used more than once. Before the
counter is increased, a loop would have been completed.
When the number of loops to be executed is known, a sentinel is used.
A sentinel is a number used as a signal to stop the input because it is not a
valid value of the variable in the read statement.
For example, consider a section extract from a flow chart that was
designed to obtain the squares of the first eight natural numbers (S) and
the first eight odd numbers (N) using 𝑆 = 0 𝑎𝑛𝑑 𝑁 = 1 as the starting
values to be read.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 26


MASTERING A-LEVEL MATHEMATICS PAPER 2

Loop
S=S+N
N=N+2


ck 5 ?
Is

h e =1
N = 15 No

rc N
te “is
?

un nt

el
co e

in
a em
Yes

nt
is tat

se
s

Proceed to the a
e

is
Th

print statement
15

In this case, when we substitute the starting values of S and N in the


assignment statement (S=S+N), the new value of S becomes S=0+1=1. In
the decision box, we are required to print only if N=15. Therefore, since N
is not yet equal to 15, we have to create a flow back in order to increase
the value of N. This can only be done via a loop having a suitable
assignment statement. As already defined, the increment is done within
the loop. In this example, the value of N will be increased by 2 each time.
So the values of N generated will be 1, 3, 5, 7, 9, 10, 13, 15. By this, the
flow chart will have achieved its purpose of obtaining the first eight odd
numbers. Similarly, for each value of N, there will be a new value of S. The
corresponding values of S include 1, 4, 9, 16, 25, 36, 49, 64. By this the
flow chart will have achieved its purpose of obtaining the squares of the
first eight natural numbers.
A complete flow chart that achieves the above purpose is as drawn below.

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 27


MASTERING A-LEVEL MATHEMATICS PAPER 2

START

S=0

N=1

S=S+N
N=N+2

Is
N = 15 No
?
Yes

PRINT: S, N

STOP
Drawing flow charts with loops
A flow chart with a loop is in the form shown below

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 28


MASTERING A-LEVEL MATHEMATICS PAPER 2

START

Read statement

Assignment
Loop
statement
assignment

Decision No
statement

Yes

Print statement

STOP

Sample questions
Qn 1: (a). Show that the Newton Raphson’s iterative formula for finding
the natural logarithm of a number N is given by
(𝑥𝑛 − 1)𝑒 𝑥𝑛 + 𝑁
𝑥𝑛+1 = , 𝑤ℎ𝑒𝑟𝑒 𝑛 = 0, 1, 2, 3, ….
𝑒 𝑥𝑛
(b). Draw a flow chart that
(i). Reads the initial approximation of the root, 𝑥0 and 𝑁.
(ii). Computes and prints 𝑁 and its logarithm after 4 iterations or gives
the logarithm correct to 3 decimal places.
(iii). Perform a dry run for 𝑁 = 10.0 and 𝑥0 = 2.
Sol: (a).
𝑙𝑒𝑡, 𝑥 = log 𝑒 𝑁 , ⟹ 𝑒 𝑥 = 𝑁, ⟹ 𝑒𝑥 − 𝑁 = 0
𝑓(𝑥) = 𝑒 𝑥 − 𝑁, 𝑓 ′ (𝑥) = 𝑒 𝑥
𝑓(𝑥𝑛 ) = 𝑒 𝑥𝑛 − 𝑁, 𝑓 ′ (𝑥𝑛 ) = 𝑒 𝑥𝑛

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 29


MASTERING A-LEVEL MATHEMATICS PAPER 2

𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − , 𝑛 = 0, 1, 2, …
𝑓′ (𝑥𝑛 )
𝑒 𝑥𝑛 − 𝑁 𝑥𝑛 𝑒 𝑥𝑛 − (𝑒 𝑥𝑛 − 𝑁) 𝑥𝑛 𝑒 𝑥𝑛 − 𝑒 𝑥𝑛 + 𝑁
𝑥𝑛+1 = 𝑥𝑛 − = =
𝑒 𝑥𝑛 𝑒 𝑥𝑛 𝑒 𝑥𝑛
𝑥
(𝑥𝑛 − 1)𝑒 𝑛 + 𝑁
𝑥𝑛+1 = , 𝑛 = 0, 1, 2, 3, ….
𝑒 𝑥𝑛
(b). Flow chart
START

n=0

Read: N, x0

xn
xn+1 = e (xn - 1) + N
e xn n=n+1

Is Is
No No
xn+1 - xn < 0.0005 n=3
?
?
Yes
Yes

PRINT: N, xn+1

STOP

Dry run
𝑛 𝑥𝑛 𝑥𝑛+1 |𝑥𝑛+1 − 𝑥𝑛 |
0 2 2.3533 0.3533
1 2.3533 2.3039 0.0494
2 2.3039 2.3026 0.0013
3 2.3026 2.3026 0.0000

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 30


MASTERING A-LEVEL MATHEMATICS PAPER 2

∴ 𝑁 = 10.0, log 𝑒 10.0 = 2.303 (3 𝑑. 𝑝)


Qn 2: (a). Show that the Newton Raphson’s iterative formula for finding
the natural logarithm of a number N is given by
(𝑥𝑛 − 1)𝑒 𝑥𝑛 + 𝑁
𝑥𝑛+1 = , 𝑤ℎ𝑒𝑟𝑒 𝑛 = 0, 1, 2, 3, ….
𝑒 𝑥𝑛
(b). Draw a flow chart that
(i). Reads the initial approximation of the root, 𝑥0 and 𝑁.
(ii). Computes and prints 𝑁 and its logarithm after 4 iterations and gives
the logarithm correct to 3 decimal places.
(iii). Perform a dry run for 𝑁 = 10.0 and 𝑥0 = 2.
Sol: (a).
𝑙𝑒𝑡, 𝑥 = log 𝑒 𝑁 , ⟹ 𝑒 𝑥 = 𝑁, ⟹ 𝑒𝑥 − 𝑁 = 0
𝑓(𝑥) = 𝑒 𝑥 − 𝑁, 𝑓 ′ (𝑥) = 𝑒 𝑥
𝑓(𝑥𝑛 ) = 𝑒 𝑥𝑛 − 𝑁, 𝑓 ′ (𝑥𝑛 ) = 𝑒 𝑥𝑛
𝑓(𝑥𝑛 )
𝑥𝑛+1 = 𝑥𝑛 − , 𝑛 = 0, 1, 2, …
𝑓′ (𝑥𝑛 )
𝑒 𝑥𝑛 − 𝑁 𝑥𝑛 𝑒 𝑥𝑛 − (𝑒 𝑥𝑛 − 𝑁) 𝑥𝑛 𝑒 𝑥𝑛 − 𝑒 𝑥𝑛 + 𝑁
𝑥𝑛+1 = 𝑥𝑛 − = =
𝑒 𝑥𝑛 𝑒 𝑥𝑛 𝑒 𝑥𝑛
𝑥
(𝑥𝑛 − 1)𝑒 𝑛 + 𝑁
𝑥𝑛+1 = , 𝑛 = 0, 1, 2, 3, ….
𝑒 𝑥𝑛
(b). Flow chart

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 31


MASTERING A-LEVEL MATHEMATICS PAPER 2

START

n=0

Read: N, x0

xn
xn+1 = e (xn - 1) + N
e xn n=n+1

Is No
n=3
?
Yes

PRINT: N, xn+1

STOP

Dry run
𝑛 𝑥𝑛 𝑥𝑛+1
0 2 2.3533
1 2.3533 2.3039
2 2.3039 2.3026
3 2.3026 2.3026

∴ 𝑁 = 10.0, log 𝑒 10.0 = 2.303 (2 𝑑. 𝑝)

akasunabu@gmail.com, greenhill acdemy mathematics Department. 2020. Page 32

You might also like