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

Assignment-4

This document outlines an assignment for Engineering Analysis Lab I focused on solving nonlinear equations using the Bisection Method and the Linear Interpolation (False Position) Method. It describes the theory behind both methods, including their procedures and convergence characteristics, and provides tasks for programming the methods on specific functions. Additionally, it includes a discussion section to analyze the speed of convergence and compare the advantages and disadvantages of the two methods.

Uploaded by

20kylegarrick
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Assignment-4

This document outlines an assignment for Engineering Analysis Lab I focused on solving nonlinear equations using the Bisection Method and the Linear Interpolation (False Position) Method. It describes the theory behind both methods, including their procedures and convergence characteristics, and provides tasks for programming the methods on specific functions. Additionally, it includes a discussion section to analyze the speed of convergence and compare the advantages and disadvantages of the two methods.

Uploaded by

20kylegarrick
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Engineering Analysis Lab I - Assignment 4

Solution of Nonlinear Equations II

Object

To find the roots of a nonlinear equation using the:

1. Bisection Method
2. Linear Interpolation (False Position) Method

Theory

1 The Bisection Method

Once we know that an interval contains a root, the bisection method can be used to
refine it. The idea is simple. Over some interval the function is known to pass through
zero because it changes sign. Evaluate the function at the interval’s midpoint and
examine its sign. Use the midpoint to replace whichever limit has the same sign. After
each iteration the bounds containing the root decrease by a factor of two.

The goal of the bisection method is to find a very small interval, perhaps two successive
floating-point numbers, on which the function changes sign. That is, we might not be
able to find a point where f (x) is exactly zero, because the notion of continuity does
not strictly apply to floating-point computation.

Bisection is slow, but it is completely reliable. If we can find a starting interval with
a change of sign, then bisection cannot fail to reduce that interval to two successive
floating-point numbers that bracket the desired result.

2 The Linear Interpolation (False Position) Method

For functions that are smooth near a root, the linear interpolation method generally
converge faster that bisection. In this method the function is assumed to be approxi-
mately linear in the local region of interest, and the next improvement in the root is
taken as the point where the approximating line crosses the axis. After each iteration
one of the previous boundary points is discarded in favor of the latest estimate of the
root.

1
If f (x) has opposite signs at the endpoints of the interval (x1 , x2 ), then from the
similarity of the triangles in Figure 1 we can write

x2 − x3 f (x2 )
=
x2 − x1 f (x2 ) − f (x1 )

and

f (x2 )
x 3 = x2 − (x2 − x1 ) (1)
f (x2 ) − f (x1 )

from which f (x3 ) is found and, once again, interpolating linearly between the values
at which the function changes sign giving a new value for x3 . Iterative application of
this procedure will give improved estimates of the root, successively.

The method appears to be somewhat faster than the method of halving the interval,
giving about the same accuracy. The rate of convergence will be related to the rate of
change of the slope of the curve, which is measured by the magnitude of the second
derivative.

Figure 1: The linear interpolation character of the false position method.

2
Procedure

1) Write a program to find the zeros of each of the following functions using the bisection
method:

a. f (x) = x3 − x2 − 2x + 1

b. f (x) = ex − 3x2

c. f (x) = 2e−x − sin(x)

2) Repeat step (1) using the linear interpolation method.

Discussion
1. Discuss the speed of convergence of the two methods for the above functions.

2. What are the advantages and disadvantages of the bisection method compared
with that of the linear interpolation method.

3. Find 80 using the bisection method.

4. Repeat step (3) using the linear interpolation method.

5. Comment on the results of steps (3) and (4).

You might also like