0% found this document useful (0 votes)
3 views

Lec17p1

The document discusses numerical methods for finding approximate solutions to algebraic equations, focusing on the Bisection method, the Rule of False Position, and the Newton-Raphson method. Each method is explained with examples and iterative processes to improve accuracy. Exercises and their answers are provided to reinforce the concepts presented.

Uploaded by

aradhanakrai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lec17p1

The document discusses numerical methods for finding approximate solutions to algebraic equations, focusing on the Bisection method, the Rule of False Position, and the Newton-Raphson method. Each method is explained with examples and iterative processes to improve accuracy. Exercises and their answers are provided to reinforce the concepts presented.

Uploaded by

aradhanakrai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

“JUST THE MATHS”

UNIT NUMBER

17.1

NUMERICAL MATHEMATICS 1
(Approximate solution of equations)

by

A.J.Hobson

17.1.1 Introduction
17.1.2 The Bisection method
17.1.3 The rule of false position
17.1.4 The Newton-Raphson method
17.1.5 Exercises
17.1.6 Answers to exercises
UNIT 17.1 - NUMERICAL MATHEMATICS 1

THE APPROXIMATE SOLUTION OF ALGEBRAIC EQUATIONS

17.1.1 INTRODUCTION

In the work which follows, we shall consider the solution of the equation
f (x) = 0,
where f (x) is a given function of x.

It is assumed that examples of such equations will have been encountered earlier at an
elementary level; as, for instance, with quadratic equations where there is simple formula for
obtaining solutions.

However, the equation


f (x) = 0
cannot, in general, be solved algebraically to give exact solutions and we have to be satisfied,
at most, with approximate solutions. Nevertheless, it is often possible to find approximate
solutions which are correct to any specified degree of accuracy; and this is satisfactory for
the applications of mathematics to science and engineering.

It is certainly possible to consider graphical methods of solving the equation


f (x) = 0,
where we try to plot a graph of the equation
y = f (x),
then determine where the graph crosses the x-axis. But this method can be laborious and
inaccurate and will not be discussed, here, as a viable method.

Three so called “iterative” methods will be included, below, where repeated use of the
method is able to improve the accuracy of an approximate solution, already obtained.

17.1.2 THE BISECTION METHOD

Suppose a and b are two numbers such that f (a) < 0 and f (b) > 0. We may obtain these
by trial and error or by sketching, roughly, the graph of the equation
y = f (x),
in order to estimate convenient values a and b between which the graph crosses the x-axis;
whole numbers will usually suffice.

1
y
6

O -x

If we let c = (a + b)/2, there are three possibilities;

(i) f (c) = 0, in which case we have solved the equation;

(ii) f (c) < 0, in which case there is a solution between c and b enabling us repeat the
procedure with these two numbers;

(iii) f (c) > 0, in which case there is a solution between c and a enabling us to repeat the
procedure with these two numbers.

Each time we apply the method, we bisect the interval between the two numbers being used
so that, eventually, the two numbers used will be very close together. The method stops
when two consecutive values of the mid-point agree with each other to the required number
of decimal places or significant figures.

Convenient labels for the numbers used at each stage (or iteration) are
a0 , b0 , c0 , a1 , b1 , c1 , a2 , b2 , c2 , a3 , b3 , c3 , ..., an , bn , cn , ....

EXAMPLE

Determine, correct to three decimal places, the positive solution of the equation
ex = x + 2.

Solution

We could first observe, from a rough sketch of the graphs of


y = ex and y = x + 2,

2
that the graphs intersect each other at a positive value of x. This confirms that there is
indeed a positive solution to our equation.

y
6

O -x

But now let


f (x) = ex − x − 2
and look for two numbers between which f (x) changes sign from positive to negative. By
trial and error, suitable numbers are 1 and 2, since
f (1) = e − 3 < 0 and f (2) = e2 − 5 > 0.

The rest of the solution may be set out in the form of a table as follows:

n an bn cn f (cn )
0 1.00000 2.00000 1.50000 0.98169
1 1.00000 1.50000 1.25000 0.24034
2 1.00000 1.25000 1.12500 - 0.04478
3 1.12500 1.25000 1.18750 0.09137
4 1.12500 1.18750 1.15625 0.02174
5 1.12500 1.15625 1.14062 - 0.01191
6 1.14063 1.15625 1.14844 0.00483
7 1.14063 1.14844 1.14454 - 0.00354
8 1.14454 1.14844 1.14649 0.00064
9 1.14454 1.14649 1.14552 - 0.00144

As a general rule, it is appropriate to work to two more places of decimals than that of the
required accuracy; and so, in this case, we work to five.

We can stop at stage 9, since c8 and c9 are the same value when rounded to three places of
decimals. The required solution is therefore x = 1.146

3
17.1.3 THE RULE OF FALSE POSITION

This method is commonly known by its Latin name, “Regula Falsi”, and tries to compen-
sate a little for the shortcomings of the Bisection Method.

Instead of taking c as the average of a and b, we consider that the two points, (a, f (a)) and
(b, f (b)), on the graph of the equation,

y = f (x),

are joined by a straight line; and the point at which this straight line crosses the x-axis is
taken as c.

y
6

O -x

From elementary co-ordinate geometry, the equation of the straight line is given by
y − f (a) x−a
= .
f (b) − f (a) b−a

Hence, when y = 0, we obtain


(b − a)f (a)
x=a− .
f (b) − f (a)
That is,
a[f (b) − f (a)] − (b − a)f (a)
x= .
f (b) − f (a)
Hence,
af (b) − bf (a)
x= .
f (b) − f (a)

4
In setting out the tabular form of a Regula Falsi solution, the cn column uses the general
formula
an f (bn ) − bn f (an )
cn = .
f (bn ) − f (an )

EXAMPLE

For the equation


f (x) ≡ x3 + 2x − 1 = 0
use the Regula Falsi method with a0 = 0 and b0 = 1 to determine the first approximation,
c0 , to the solution between x = 0 and x = 1.

Solution

We have f (0) = −1 and f (1) = 2, so that there is certainly a solution between x = 0 and
x = 1.

From the general formula,


0 × 2 − 1 × (−1) 1
c0 = =
2 − (−1) 3
and, if we were to continue with the method, we would observe that f (1/3) < 0 so that
a1 = 1/3 and b1 = 1.

Note:
The Bisection Method would have given c0 = 21 .

17.1.4 THE NEWTON-RAPHSON METHOD

This method is based on the guessing of an approximate solution, x = x0 , to the equation


f (x) = 0.

We then draw the tangent to the curve whose equation is


y = f (x)

at the point x0 , f (x0 ) to find out where this tangent crosses the x-axis. The point obtained
is normally a better approximation x1 to the solution.

5
y
6 




O  -x

In the diagram,
AB f (x0 )
f 0 (x0 ) = = .
AC h
Hence,
f (x0 )
h= ,
f 0 (x0 )
so that a better approximation to the exact solution at point D is given by
x1 = x0 − h.

Repeating the process, gives rise to the following iterative formula:


f (xn )
xn+1 = xn − .
f 0 (xn )

Notes:

(i) To guess the starting approximation, x0 , it is normally sufficient to use a similar technique
to that in the Bisection Method; that is, we find a pair of whole numbers, a and b, such
that f (a) < 0 and f (b) > 0; then we take x0 = (a + b)/2. In some exercises, however,
an alternative starting approximation may be suggested in order to speed up the rate of
convergence to the final solution.

(ii) There are situations where the Newton-Raphson Method fails to give a better approx-
imation; as, for example, when the tangent to the curve has a very small gradient, and
consequently meets the x-axis at a relatively great distance from the previous approxima-
tion. In this Unit, we shall consider only examples in which the successive approximations
converge rapidly to the required solution.

6
EXAMPLE

Use the Newton-Raphson method to calculate 5, correct to three places of decimals.

Solution

We are required to solve the equation


f (x) ≡ x2 − 5 = 0.

By trial and error, we find that a solution exists between x = 2 and x = 3 since f (2) = −1 < 0
and f (3) = 4 > 0. Hence, we use x0 = 2.5

Furthermore,
f 0 (x) = 2x,
so that
x2n − 5
xn+1 = xn − .
2xn

Thus,
1.25
x1 = 2.5 − = 2.250,
5
0.0625
x2 = 2.250 − ' 2.236,
4.5
−0.000304
x3 = 2.236 − ' 2.236
4.472

At each stage, we round off the result to the required number of decimal places and use the
rounded figure in the next iteration.

The last two iterations give the same result to three places of decimals and this is therefore
the required result.

7
17.1.5 EXERCISES

1. Determine the smallest positive solution to the following equations (i) by the Bisec-
tion Method and (ii) by the Regula Falsi Method, giving your answers correct to four
significant figures:
(a)
x − 2sin2 x = 0;
(b)
ex − cos(x2 ) − 1 = 0.
2. Use the Newton-Raphson Method to determine the smallest positive solution to each
of the following equations, correct to five decimal places:
(a)
x4 = 5;
(b)
x3 + x2 − 4x + 1 = 0;
(c)
x − 2 = ln x.

17.1.6 ANSWERS TO EXERCISES

1. (a)
x ' 1.849;
(b)
x ' 0.6486
2. (a)
x ' 1.49535;
(b)
x ' 0.27389;
(c)
x ' 3.14619

You might also like