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

Lecture 1

The document discusses numerical methods for finding roots of nonlinear equations. It describes direct analytical methods, graphical methods, and iterative methods. The Newton-Raphson method is presented, which uses successive approximations based on the tangent line to find roots iteratively.
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)
30 views

Lecture 1

The document discusses numerical methods for finding roots of nonlinear equations. It describes direct analytical methods, graphical methods, and iterative methods. The Newton-Raphson method is presented, which uses successive approximations based on the tangent line to find roots iteratively.
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

Introduction

Mathematical models for many problems in different branches of science and engineering
are formulated as
f(x) = 0 (1)
where the variables x and f(x) may be real or complex, and scalar or vector quantities. In
this chapter, the variables x and f(x) are real and scalar quantities. The value of x, which
satisfies the Eq. (1), is called the root of the equation. It is also known as the zero of the
function f(x). For example, the quadratic equation
x 2 − 3x + 2 = 0 .has roots 1 and 2

y = f(x) y

5
f(x) y = x2 − 3x + 2
4
3
2
Root
x 1
x
1 2 3
Fig. .1 Root off(x) = 0
Fig. 3.2 Root ofx2 – 3x + 2 = 0

Numerical Methods

Root finding is also essential in many branches of mathematics. For example, the critical
points of the function f(x) are the roots of the equation f '(x) = 0. Eigenvalues of a square
matrix A are the roots of the characteristic equation.
(p λ) = det ( A − λ I) = 0
where p(λ) is a polynomial of degree n (order of matrix A).
The nonlinear equations can be categorized broadly as polynomial equations and
transcendental equations as follows

Polynomial Equations
The polynomial equations are given by
y = f (x ) = an x n + an−1 x n−1 + … + a1 x + a0 = 0
This equation is an nth degree polynomial equation, and has exactly n roots. These roots
may be real or complex. Some examples of polynomial equations are
i) 3x 3 + x 2 − 9 = 0
ii) x2 − 4x − 5 = 0
Transcendental Equations
An equation which is not a polynomial equation is a transcendental equation. These
equations involve trigonometric, exponential and logarithmic functions, etc. A few
examples of the transcendental equations are as follows
i) 3 sin( x ) − e − x = 0
ii) 3x 2 − 2 cos x = 0
iii) 2e x sin x − ln(x ) = 0
Transcendental equations may have finite or infinite numbers of real roots or may not have
real roots at all.
The roots of simple equations are easy to compute by the direct methods. But in the
case of higher order equations and transcendental equations, there is no general analytical
method to compute the exact roots. So for this purpose, numerical techniques can be used
to find approximate roots of the equation. The main objective of this chapter is to present
and discuss the various numerical techniques which are useful for finding the
approximate roots of the nonlinear equation, Eq. (1).

Methods for Solutions of the Equation f(x) = 0


So far, various methods have been developed for the solution of Eq. (1). All these methods
have their advantages and disadvantages, and broadly categories as follows

i) Direct analytical methods


ii) Graphical methods
iii) Trial and error methods
iv) Iterative methods

In this section, we shall have a brief idea of these methods and conclude that iterative
methods for finding numerical approximations for the roots of Eq. (1) are the best
methods for the complex and complicated equations.

Direct Analytical Methods


We can solve the nonlinear equation by direct analytical methods in certain simple cases.
For example, the roots of the quadratic equation ax 2 + bx + c = 0 are given by
−b ± b2 − 4ac
x= . Similarly, roots of cubic and quartic equations can be obtained
2a
using Cardano and Ferrari methods, respectively. The roots obtained by direct methods
are exact roots of the equations. But these methods can be applied to some very special
categories of the equations. The roots of higher order polynomial equations/ transcendental
equations (like x 5 + 2 x 3 + 3x 2 + 5x + 6 = 0 and 2e − x + x 3 sin x = 0) cannot be obtained from
direct analytical methods. We don’t have direct methods even for the solutions of simple
transcendental equations.

Graphical Methods 3.2.2


Plotting of the function f(x) with x-axis gives the root of the equation f(x) = 0. The points
where the curve f(x) crosses the x-axis, are the roots of the equation.
Solutions obtained using graphical methods are not accurate. But graphs of some
standard curves are helpful in tracing the interval in which the root of the equation lies and
are also important for an initial guess about the roots, etc. Let us discuss a few examples.

; Case 1. Equations x 2 + x + 1 = 0, x − e x = 0 x − l n(x ) = 0 with no real roots

The graph (Fig. 3.3) of y = x 2 + x +1 has no point of intersection with x – axis, so the
. equation x 2 + x + 1 = 0 has no real root
Any equation f(x) = 0 can be rewritten as f1(x) = f2(x), and points of intersections of the
curves y = f1(x) and y = f2(x) provide the roots of the equation f(x) = 0. For example, consider
the graphs of y = ex and y = x, then the points of intersection of these two curves are the
roots of equation x – ex = 0 (x = ex). It is easy to see that there is no point of intersection
(Fig. 3.4), so the equation x – ex = 0 has no real root. Similarly, we can easily find that
equation x − l n(x ) = 0 also has no real root (Fig. 3.5).

6 y y
6 y = ex 1 y=x
5
4 0.2 0.4 0.6 0.8 x
4 0
3
y=x
2 2 -1
y

1 y = ln(x)
x -2
-2 -1 0 1 2 -1 1
x -3

Fig. 3 x2 + x + 1 = 0 Fig. 4 x = ex Fig. 5 x – ln(x)

Case 2. Equations with finite numbers of real roots like x 3 − 3x 2 + 2x = 0, x − cos x = 0, etc.

The points of intersection of two curves y = cos( x ) and y = x are the roots of equation
x − cos x = 0 (Fig. 3.6). There is only one point of intersection, so the equation x − cos x = 0
has only one real root. Similarly, the graph of the function y = x 3 − 3x 2 + 2 x provides that
the equation x 3 − 3x 2 + 2x = 0 has three real roots (Fig. 3.7).
y
4 y=x
3
2

1
x

2 4
-1
y = cos(x)

Fig. 6 x = cos x, Root = 0.7390851322

y
5
y = x3-5x2 + 6x
1 2 3

x
-5

-10

Fig. 7 x3 – 5x2 + 6x = 0, Roots = 0, 2, 3

Case 3. Equations with infinite numbers of real roots like e x − cos x = 0, x − tan x = 0,
e − x − sin x = 0, etc. The following graphs show that these equations have infinitely many
real roots.
Newton Raphson Method
The Newton Raphson method is for solving equations of the form f (x) = 0. We make
an initial guess for the root we are trying to find, and we call this initial guess x0 .
The sequence x0 , x1 , x2 , x3 , . . . generated in the manner described below should con-
verge to the exact root.
To implement it analytically we need a formula for each approximation in terms of
the previous one, i.e. we need xn+1 in terms of xn .
The equation of the tangent line to the graph y = f (x) at the point (x0 , f (x0 )) is

y − f (x0 ) = f 0 (x0 )(x − x0 )

The tangent line intersects the x-axis when y = 0 and x = x1 , so

−f (x0 ) = f 0 (x0 )(x1 − x0 )

Solving this for x1 gives


f (x0 )
x1 = x0 −
f 0 (x0 )
and, more generally,
f (xn )
xn+1 = xn − (1)
f 0 (xn )

In Newton–Raphson method, the function f(x) is approximated with the tangent of f(x)
at point x = x0. Next approximation is the point of intersection of the tangent (at the point
x = x0) and the x-axis. In general, the iteration xn+1 is the value of x at which tangent at the
( )
point xn , f (xn ) cuts the x-axis.

f(x)

ξ
x2 x1 x0 x

y = f(x)

Fig. Graphical interpretation of the Newton–Raphson method


You should memorize the above formula. Its application to solving equations of the
form f (x) = 0, as we now demonstrate, is called the Newton Raphson method.
It is guaranteed to converge if the initial guess x0 is close enough, but it is hard to
make a clear statement about what we mean by ‘close enough’ because this is highly
problem specific. A sketch of the graph of f (x) can help us decide on an appropriate
initial guess x0 for a particular problem.

Example
Let us solve x3 − x − 1 = 0 for x.
In this case f (x) = x3 − x − 1, so f 0 (x) = 3x2 − 1. So the recursion formula (1)
becomes
(x3 − xn − 1)
xn+1 = xn − n 2
3xn − 1
Need to decide on an appropriate initial guess x0 for this problem. A rough graph
can help. Note that f (1) = −1 < 0 and f (2) = 5 > 0. Therefore, a root of f (x) = 0
must exist between 1 and 2. Let us take x0 = 1 as our initial guess. Then

(x30 − x0 − 1)
x1 = x0 −
3x20 − 1
and with x0 = 1 we get x1 = 1.5.
Now
(x31 − x1 − 1)
x2 = x1 −
3x21 − 1

and with x1 = 1.5 we get x2 = 1.34783. For the next stage,

(x32 − x2 − 1)
x3 = x2 −
3x22 − 1
and with the value just found for x2 , we find x 3 = 1.32520.
Carrying on, we find t hat x 4 = 1 .32472, x 5 = 1 .32472, e tc. We c an s top w hen the
digits stop changing to the required degree of accuracy. We conclude that the root is
1.32472 to 5 decimal places.

Example
Let us solve cos x = 2x to 5 decimal places.
This is equivalent to solving f (x) = 0 where f (x) = cos x − 2x. [NB: make sure
your calculator is in radian mode]. The recursion formula (1) becomes

(cos xn − 2xn )
xn+1 = xn −
(− sin xn − 2)

With an initial guess of x0 = 0.5, we obtain:

x0 = 0.5
x1 = 0.45063
x2 = 0.45018
x3 = 0.45018
..
.

with no further changes in the digits, to five decimal p laces. Therefore, to this degree
of accuracy, the root is x = 0.45018.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy