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

Class Lecture - 03

Uploaded by

einsteinriyad223
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)
25 views

Class Lecture - 03

Uploaded by

einsteinriyad223
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/ 15

What is Equation

In mathematics, an equation is a statement that asserts the equality of two expressions. It consists of two
expressions on either side of an equal sign (=), indicating that the value on the left side is equal to the
value on the right side.
Types of Equation

• Linear Equations
• A linear equation is an equation in which the highest power of the variable(s) is 1. Linear equations can have
one or more variables, but each variable is to the first power and appears linearly (not squared, cubed, etc.).
The graph of a linear equation in two variables is always a straight line.
General Form: ax+by+cz+d=0
A non-linear equation is an equation in which the variable(s) appear with powers other than 1, or the
variable(s) are multiplied together, leading to curves (rather than straight lines) when graphed.
Root of Equations
• The root of an equation, also known as a solution or zero, is a value of the variable that makes the equation
true. In other words, when the root is substituted for the variable in the equation, the equation is satisfied (i.e.,
the left-hand side equals the right-hand side, or the expression equals zero).

Root Finding Method

Bisection Method
Newton-Raphson Method
Secant Method
False Position (Regula Falsi) Method
Fixed-Point Iteration
Bisection Method

• Bisection Method
• Description: The bisection method is a simple and robust numerical technique used to find roots of a
continuous function. It repeatedly bisects an interval and selects a subinterval in which a root must lie. This
method requires the function to have opposite signs at the endpoints of the interval.
• Convergence: Linear (slow, but guaranteed if the function is continuous on the interval).
• Usage: Effective when you know the function is continuous and you have an interval where the function
changes sign.
False Position (Regula Falsi) Method

• Description: The false position method is similar to the bisection method but instead of using the midpoint, it
uses a weighted average that depends on the values of the function at the endpoints. It combines the
robustness of bisection with the faster convergence of the secant method.
• Convergence: Linear (similar to bisection but can be faster in some cases).
• Usage: Appropriate when you have an interval where the function changes sign and want a potentially faster
convergence than bisection.
Chapter

Solution of Algebraic and


Transcendental Equations

2.1 INTRODUCTION

In scientific and engineering studies, a frequently occurring problem is to find


the roots of equations of the form
f (x) = 0 (2.1)
If f (x) is a quadratic, cubic or a biquadratic expression, then algebraic
formulae are available for expressing the roots in terms of the coefficients. On
the other hand, when f (x) is a polynomial of higher degree or an expression
involving transcendental functions, algebraic methods are not available, and
recourse must be taken to find the roots by approximate methods.
This chapter is concerned with the description of several numerical
methods for the solution of equations of the form given in Eq. (2.1), where f (x)
is algebraic or transcendental or a combination of both. Now, algebraic
functions of the form
fn(x) = a0xn + a1xn–1 + a2xn–2 + + an–1x + an, (2.2)

are called polynomials and we discuss some special methods for determining
their roots. A non-algebraic function is called a transcendental function,
e.g., f (x) = ln x3 – 0.7 f (x) = e–0.5x – 5x, y (x) = sin2x – x2 –2, etc. The roots
of Eq. (2.1) may be either real or complex. We discuss methods of finding a
real root of algebraic or transcendental equations and also methods of
determining all real and complex roots of polynomials. Solution of systems of
nonlinear equations will be considered at the end of the chapter.

22
SECTION 2.2: Bisection Method 23

If f (x) is a polynomial of the form Eq. (2.2), the following results, from
the theory of equations would be useful in locating its roots.
(i) Every polynomial equation of the nth degree has n and only n roots.
(ii) If n is odd, the polynomial equation has atleast one real root whose
sign is opposite to that of the last term.
(iii) If n is even and the constant term is negative, then the equation has
atleast one positive root and atleast one negative root.
(iv) If the polynomial equation has (a) real coefficients, then imaginary
roots occur in pairs and (b) rational coefficients, then irrational roots
occur in pairs.
(v) Descartes’ Rule of Signs
(a) A polynomial equation f (x) = 0 cannot have more number of
positive real roots than the number of changes of sign in the
coefficients of f (x).
(b) In (a) above, f (x) = 0 cannot have more number of negative
real roots than the number of changes of sign in the coefficients
of f (–x).

2.2 BISECTION METHOD

This method is based on Theorem 1.1 which states that if a function f (x) is
continuous between a and b, and f (a) and f (b) are of opposite signs, then there
exists at least one root between a and b. For definiteness, let f (a) be negative
and f (b) be positive. Then the root lies between a and b and let its approximate
value be given by x0 = (a + b)/2. If f (x0) = 0, we conclude that x0 is a root of
the equation f (x) = 0. Otherwise, the root lies either between x0 and b, or
between x0 and a depending on whether f (x0) is negative or positive. We
designate this new interval as [a1, b1] whose length is |b – a|/2. As before, this
is bisected at x1 and the new interval will be exactly half the length of the
previous one. We repeat this process until the latest interval (which contains
the root) is as small as desired, say e. It is clear that the interval width is
reduced by a factor of one-half at each step and at the end of the nth step, the
new interval will be [an, bn] of length |b – a|/2n. We then have
|b −a|
≤ F,
2n
which gives on simplification
log e (| b − a |/F )
n≥ (2.3)
log e 2
Equation (2.3) gives the number of iterations required to achieve an accuracy
e. For example, if | b – a | = 1 and e = 0.001, then it can be seen that
n ³ 10 (2.4)
24 CHAPTER 2: Solution of Algebraic and Transcendental Equations

The method is shown graphically in Fig. 2.1.


y
[b, f (b)]

x2 x0 a
x1 x
0 b

[a, f (a)]

Figure 2.1 Graphical representation of the bisection method.


It should be noted that this method always succeeds. If there are more roots
than one in the interval, bisection method finds one of the roots. It can be easily
programmed using the following computational steps:
1. Choose two real numbers a and b such that f (a) f (b) < 0.
2. Set xr = (a + b)/2.
3. (a) If f (a) f (xr) < 0, the root lies in the interval (a, xr). Then, set
b = xr and go to step 2 above.
(b) If f (a) f (xr) > 0, the root lies in the interval (xr, b). Then, set
a = xr and go to step 2.
(c) If f (a) f (xr) = 0, it means that xr is a root of the equation
f (x) = 0 and the computation may be terminated.
In practical problems, the roots may not be exact so that condition (c)
above is never satisfied. In such a case, we need to adopt a criterion for
deciding when to terminate the computations.
A convenient criterion is to compute the percentage error er defined by
xrb  xr
Fr  t 100%. (2.5)
xrb
where xr′ is the new value of xr. The computations can be terminated when er
becomes less than a prescribed tolerance, say ep. In addition, the maximum
number of iterations may also be specified in advance.
Example 2.1 Find a real root of the equation f (x) = x3 – x – 1 = 0.
Since f (1) is negative and f (2) positive, a root lies between 1 and 2 and,
therefore, we take x0 = 3/2. Then
27 3 15
f ( x0 ) = − = , which is positive.
8 2 8
SECTION 2.2: Bisection Method 25

Hence the root lies between 1 and 1.5 and we obtain


1 + 1.5
x1 = = 1.25
2
We find f (x1) = –19/64, which is negative. We, therefore, conclude that the root
lies between 1.25 and 1.5. If follows that
1.25 + 1.5
x2 = = 1.375
2
The procedure is repeated and the successive approximations are
x3 = 1.3125, x4 = 1.34375, x5 = 1.328125, etc.
Example 2.2 Find a real root of the equation x3 – 2x – 5 = 0.
Let f (x) = x3 – 2x – 5. Then
f (2) = –1 and f (3) = 16.
Hence a root lies between 2 and 3 and we take
2+3
x1 = = 2.5
2
Since f (x1) = f (2.5) = 5.6250, the root lies between 2 and 2.25.
Hence
2 + 2.5
x2 = = 2.25
2
Now, f (x2) = 1.890625, the root lies between 2 and 2.25.
Therefore,
2 + 2.25
x3 = = 2.125
2
Since f (x3) = 0.3457, the root lies between 2 and 2.125.
Therefore,
2 + 2.125
x4 = = 2.0625
2
Proceeding in this way, we obtain the successive approximations:
x5 = 2.09375, x6 = 2.10938, x7 = 2.10156,
x8 = 2.09766, x9 = 2.09570, x10 = 2.09473,
x11 = 2.09424,
We find
x11 – x10 = – 0.0005,
and
x11  x10 0.0005
t 100  t 100  0.02%
x11 2.09424
Hence a root, correct to three decimal places, is 2.094.
26 CHAPTER 2: Solution of Algebraic and Transcendental Equations

Example 2.3 Find a real root of f (x) = x3 + x2 + x + 7 = 0 correct to three


decimal places.
The given equation is a cubic and the last term is positive. Hence,
f (x) = 0 will have a negative real root. We find that
f (–1) = 6, f (–2) = 1 and f (–3) = –14.
Therefore, a real root lies between –3 and –2.
We take
–2 – 3
x1 = = – 2.5
2
Since f (–2.5) = –4.875, the root lies between –2 and –2.5, and then

−2 − 2.5
x2 = = − 2.25
2
Now f (x2) = –1.5781, and, therefore, the root lies between –2 and –2.25.
It follows that
– 4.25
x3   – 2.125
2
Successive approximations are given by
x4 = –2.0625, x5 = –2.0938, x6 = –2.1094,
x7 = –2.1016, x8 = –2.1055, x9 = –2.1035,
x10 = –2.1045, x11 = –2.1050,
The difference between x10 and x11 is 0.0005. Hence, we conclude that the root
is given by x = –2.105, correct to three decimal places.

Example 2.4 Find the positive root, between 0 and 1, of the equation
x = e–x to a tolerance of 0.05%.
Let
f (x) = xex – 1 = 0
We have, f (0) = –1 and f (1) = e – 1, which is positive. Hence, a root exists
between 0 and 1, and
0 +1
x1 = = 0.5
2
Because, f (x1) = – 0.1756, the root lies between 0.5 and 1.0.
Then
0.5 + 1.0
x2 = = 0.75
2
SECTION 2.2: Bisection Method 27

Now, the tolerance e1 is given by

x2  x1
F1  t 100
x2
0.25
 t 100  33.33%
0.75
since f (x2) = 0.5878, the root lies between 0.5 and 0.75.
Therefore,
0.5 0.75
x3   0.625
2
also,
0.625 – 0.75
F2  t 100  20%.
0.625
Proceeding in this way, successive approximations and tolerances are obtained:
x4 = 0.5625, e3 = 11.11%; x5 = 0.5938, e4 = 5.26%;
x6 = 0.5781, e5 = 2.71%; x7 = 0.5703, e6 = 1.37%;
x8 = 0.5664, e7 = 0.69%; x9 = 0.5684, e8 = 0.35%;
x10 = 0.5674, e9 = 0.18%; x11 = 0.5669, e10 = 0.09%;
x12 = 0.5671, e11 = 0.035%
Since e11 = 0.035% < 0.05%, the required root is 0.567, correct to three
decimal places.
Example 2.5 Find a root, correct to three decimal places and lying between
0 and 0.5, of the equation
4e–x sin x – 1 = 0
Let
f (x) = 4e–x sin x – 1
We have f (0) = –1 and f (0.5) = 0.163145
Therefore,
x1 = 0.25
Since f (0.25) = – 0.22929, it follows that the root lies between 0.25 and 0.5.
Therefore,
0.75
x2 = = 0.375
2
The successive approximations are given by
x3 = 0.3125, x4 = 0.3438, x5 = 0.3594,
x6 = 0.3672, x7 = 0.3711, x8 = 0.3692,
x9 = 0.3702, x10 = 0.3706, x11 = 0.3704
x12 = 0.3705,
Hence the required root is 0.371, correct to three decimal places.
28 CHAPTER 2: Solution of Algebraic and Transcendental Equations

2.3 METHOD OF FALSE POSITION

This is the oldest method for finding the real root of a nonlinear equation
f (x) = 0 and closely resembles the bisection method. In this method, also
known as regula–falsi or the method of chords, we choose two points a and
b such that f (a) and f (b) are of opposite signs. Hence, a root must lie in
between these points. Now, the equation of the chord joining the two points
[a, f (a)] and [b, f (b)] is given by
y − f (a) f (b) − f (a )
= . (2.6)
x−a b−a
The method consists in replacing the part of the curve between the points
[a, f (a)] and [b, f (b)] by means of the chord joining these points, and taking
the point of intersection of the chord with the x-axis as an approximation to
the root. The point of intersection in the present case is obtained by putting
y = 0 in Eq. (2.6). Thus, we obtain
f (a) af (b) − bf (a)
x1 = a − (b − a ) = , (2.7)
f (b) − f (a) f (b) − f ( a)
which is the first approximation to the root of f (x) = 0. If now f (x1) and
f (a) are of opposite signs, then the root lies between a and x1, and we
replace b by x1 in Eq. (2.7), and obtain the next approximation. Otherwise, we
replace a by x1 and generate the next approximation. The procedure is repeated
till the root is obtained to the desired accuracy. Figure 2.2 gives
a graphical representation of the method. The error criterion Eq. (2.5) can be
used in this case also.
Y
y = f (x)
* B [b, f (b)]
O x1 Y
x2 X

*
A [a, f (a)]
Figure 2.2 Method of false position.

Example 2.6 Find a real root of the equation:

f (x) = x3 – 2x – 5 = 0.

We find f (2) = –1 and f (3) = 16. Hence a = 2, b = 3, and a root lies


between 2 and 3. Equation (2.7) gives
SECTION 2.3: Method of False Position 29

2(16) − 3(−1) 35
x1 = = = 2.058823529.
16 − (−1) 17

Now, f (x1) = –0.390799917 and hence the root lies between 2.058823529 and
3.0. Using formula (2.7), we obtain

2.058823529(16) − 3(−0.390799917)
x2 = = 2.08126366.
16.390799917

Since f (x2) = –0.147204057, it follows that the root lies between 2.08126366
and 3.0. Hence, we have

2.08126366(16) − 3(−0.147204057)
x3 = = 2.089639211.
16.147204057
Proceeding in this way, we obtain successively:
x4 = 2.092739575, x5 = 2.09388371,
x6 = 2.094305452, x7 = 2.094460846,
The correct value is 2.0945 , so that x7 is correct to five significant figures.

Example 2.7 Given that the equation x2.2 = 69 has a root between 5 and 8.
Use the method of regula–falsi to determine it.
Let f (x) = x2.2 – 69. We find

f (5) = –34.50675846 and f (8) = 28.00586026.


Hence
5(28.00586026) − 8(−34.50675846)
x1 = = 6.655990062.
28.00586026 + 34.50675846

Now, f (x1) = –4.275625415 and therefore, the root lies between 6.655990062
and 8.0. We obtain
x2 = 6.83400179, x3 = 6.850669653.
The correct root is 6.8523651 , so that x3 is correct to three significant
figures.

Example 2.8 The equation 2x = log10 x + 7 has a root between 3 and 4. Find
this root, correct to three decimal places, by regula–falsi method.
Let
f (x) = 2x – log10 x – 7, a = 3 and b = 4.
Then we find
f (3) = –1.4771 and f (4) = 0.3979.
30 CHAPTER 2: Solution of Algebraic and Transcendental Equations

Hence
af (b) − bf (a)
x1 =
f (b) − f (a)
3(0.3979) − 4(−1.4771)
=
0.3979 + 1.4771
7.1021
= = 3.7878.
1.8750
Therefore, the root lies between 3 and 3.7878. Now, we take a = 3 and b = 3.7878
Then,
f (b) = 2(3.7878) – log10 3.7878 – 7 = –0.002787
Hence,
3( 0.002787)  3.7878(–1.4771)
x2 
– 0.002787 1.4771
 3.7893,
and
f ( x2 ) = 2(3.7893) − log10 (3.7893) − 7
= 0.000041,
which shows that x = 3.789 is the root correct to three decimal places.

Example 2.9 Find a root of the equation 4e–x sin x – 1 = 0 by regular–falsi


method given that the root lies between 0 and 0.5.
Let
f (x) = 4e–x sin x – 1, a = 0, b = 0.5.
We have
f (a) = –1 and f (b) = 4e–0.5 sin 0.5 – 1 = 0.163145
Therefore,
0(0.163145)  0.5( 1)
x1 
1.163145
0.5
  0.4298690
1.163145
Now, we take
a = 0 and b = 0.4298690
Then
f (x) = 0.08454
Therefore,
0(0.08454)  0.42987( 1)
x2 
1.08454
 0.39636
Now,
a = 0, b = 0.39636 and f (b) = 0.038919
SECTION 2.4: Iteration Method 31

Hence
0(0.038919)  0.39636( 1)
x3 
1.038919
 0.381512,
and
f (x3) = 0.016934
Taking a = 0 and b = 0.381512, we obtain
0(0.016934) − 0.381512(–1)
x4 =
1.016934
= 0.375159,
and
f (x4) = 0.0071873
Proceeding as above, we obtain
x5 = 0.37248, x6 = 0.37136,
x7 = 0.37089, x8 = 0.370697
It follows that the required root is 0.371, correct to three decimal places.

2.4 ITERATION METHOD


We have so far discussed root-finding methods which require an interval in
which the root lies. We now describe methods which require one or more
approximate values to start the solution and these values need not necessarily
bracket the root. The first is the iteration method which requires one starting
value of x.
To describe this method for finding a root of the equation
f (x) = 0, (2.1)
we rewrite this equation in the form
x = f (x) (2.8)
There are many ways of doing this. For example, the equation
x3 + x2 – 2 = 0
can be expressed in different forms
2
x= , x = 2 − x3 , x = (2 − x 2 )1/3 , etc.
1+ x
Now, let x0 be an approximate root of Eq. (2.8). Then, substituting in
Eq. (2.8), we get the first approximation as
x1 = f (x0)
Successive substitutions give the approximations
x2 = f (x1), x3 = f (x2), , xn = f (xn–1).

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