0% found this document useful (0 votes)
70 views8 pages

Roots of Equations

The document discusses various numerical methods for finding the roots or zeros of equations, including: 1) Bisection method, which repeatedly bisects the interval where the root is known to exist and converges to the root. 2) False position or regula falsi method, which uses linear interpolation to converge faster than bisection method. 3) Fixed point iteration and Newton-Raphson methods, which use successive approximations to home in on the root. 4) Secant method, which approximates the derivative in Newton-Raphson using finite differences when the actual derivative is difficult to compute.

Uploaded by

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

Roots of Equations

The document discusses various numerical methods for finding the roots or zeros of equations, including: 1) Bisection method, which repeatedly bisects the interval where the root is known to exist and converges to the root. 2) False position or regula falsi method, which uses linear interpolation to converge faster than bisection method. 3) Fixed point iteration and Newton-Raphson methods, which use successive approximations to home in on the root. 4) Secant method, which approximates the derivative in Newton-Raphson using finite differences when the actual derivative is difficult to compute.

Uploaded by

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

Roots of Equations

Quadratic Equation Formula:

−𝑏 ± √𝑏 2 − 4𝑎𝑐
𝑥=
2𝑎

To solve

𝑓(𝑥) = 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 = 0

The values of 𝑥 at 𝑓(𝑥) = 0 are called the roots.

Numerical methods are used to solve for the roots that are not easily determined.

Example: Newton’s second law of motion used to solve for velocity of falling body.
𝑔𝑚 𝑐
𝑣= (1 − 𝑒 −(𝑚)𝑡 )
𝑐
where the velocity is 𝑣, the dependent variable, time is 𝑡, the independent variable, the gravity
constant is 𝑔, the forcing function, and the drag coefficient 𝑐 and the mass 𝑚, are the parameters
are known. The mentioned equation is used to predict the velocity as function of time.

Such computation can be performed directly because 𝑣 is expressed exciplicitly as a


function of time. That is, it is isolated on one side of the equal sign.

However, suppose we had to determine the drag coefficient for a given mass to attain a
prescribed velocity in a set time period. The equation cannot be solved for the drag coefficient c
explicitly. In such case, 𝑐 is said to be implicit.

The solution is provided by numerical methods for roots of equations. This is done by
subtracting the dependent variable 𝑣 from both sides of the equation to give

𝑔𝑚 𝑐
𝑓(𝑐) = (1 − 𝑒 −(𝑚)𝑡 − 𝑣
𝑐
The value of 𝑐 that makes 𝑓(𝑐) = 0 is, therefore, the root of the equation. This value also
represents the drag coefficient that solve the design problem.

Bracketing Methods

This section on roots of equations that changes sign in the vicinity of the root. These
techniques are called bracketing methods because two initial guesses for the root are required.

Graphical Methods

Simply, make a plot of the function and observe where it crosses the 𝑥 − 𝑎𝑥𝑖𝑠, and that would
give a rough approximation of the root.

Example 5.1:

Bisection Method

As noticed in using the graphical method that 𝑓(𝑥) has changed sign on opposite sides of the
root. In general, if 𝑓(𝑥) is real and continuous in the interval from 𝑥𝑙 to 𝑥𝑢 and 𝑓(𝑥𝑙 ) and 𝑓(𝑥𝑢 )
have opposite signs, that is

𝑓(𝑥𝑙 )𝑓(𝑥𝑢 ) < 0

Then there is at least one real root between 𝑥𝑙 and 𝑥𝑢 .

The bisection method which is also called the interval halving because the interval is
always divided in half.

Solution procedure:

Step1: choose a lower xl and upper xu guesses for the root such that the function changes sign
over the interval. This can be checked by ensuring that f(xl)f(xu)<0.

Step 2: an estimate of the root xr is determined by


𝑥𝑙 + 𝑥𝑢
𝑥𝑟 =
2
Step 3: make the following evaluations to determine in which subinterval the root lies:

a) If f(xl)f(xr)<0, the root lies in the lower subinterval. Therefore, set xu=xr, and return to
step 2.
b) If f(xl)f(xr)>0, the root lies in the upper subinterval. Therefore, set xl=xr and return to
step 2.
c) If f(xl)f(xr)=0, the root equals to xr; terminate computation.

Example 5.3: use bisection method to solve the same problem graphically in Example 5.1.

Termination Criteria and Error Estimates:

𝜀𝑎 < 𝜀𝑠

𝑥𝑟𝑛𝑒𝑤 −𝑥𝑟𝑜𝑙𝑑
where 𝜀𝑎 = | | × 100%
𝑥𝑟𝑛𝑒𝑤

and 𝜀𝑠 = prespecified stopping criteria

Example 5.4:

Another feature of the bisection method is that you can calculate the number of iterations a priori

∆𝑥 0
𝑛 = 𝑙𝑜𝑔2 ( )
𝐸𝑎,𝑑

where Ea, is the absolute error.


Let us test the formula for example 5.4:

The false position method: Regula Falsi or Linear Interpolation Method.

Using the similar triangles, we obtain

𝑓(𝑥𝑙 ) 𝑓(𝑥𝑢 )
=
𝑥𝑟 − 𝑥𝑙 𝑥𝑟 − 𝑥𝑢

which can be solved for

𝑓(𝑥𝑢 )(𝑥𝑙 −𝑥𝑢 )


𝑥𝑟 = 𝑥𝑢 − (5.7)
𝑓(𝑥𝑙 )−𝑓(𝑥𝑢 )

The algorithm is similar to Bisection Method accept Eq (5.7) is substituted for step 2.

Example 5.5:

False position method converges quicker than the bisection method. See figure 5.13.

Always check the result and check and substitute the obtained root to see if the function
is zero.

If the function has acute curvature the false position method could give poor result.
Open Methods:

 They require only a single value.


 They sometimes diverge or move away from the root as the computation progresses.
 When they converge, they are quicker than the bracketing methods.

Simple Fixed Point Iteration:

Rearrange the function in away to have x on one side.

𝑥 = 𝑔(𝑥)

This transformation can be accomplished either by algebraic manipulation or by simply adding x


to both sides of the original equation.

For example;

𝑥 2 − 2𝑥 + 3 = 0

Can simply be manipulated to yield

𝑥2 + 3
𝑥=
2

where 𝑠𝑖𝑛 𝑥 = 0 can be done by adding x to both sides of the equation.

𝑥 = 𝑠𝑖𝑛𝑥 + 𝑥

The utility of Eq (6.1) is that it provides a formula to predict a new value of x as a function of an
old value of x. Thus, given an initial guess at the root xi, Eq (6.1) can be used to compute a new
estimate of xi+1 as expressed by the iterative formula
𝑥𝑖+1 = 𝑔(𝑥𝑖 )

The approximation error for this formula can be evaluated using the error estimator
𝑥𝑖+1 − 𝑥𝑖
𝜀𝑎 = | | 100%
𝑥𝑖+1

Example 6.1: Use simple fixed-point iteration to locate the root of 𝑓(𝑥) = 𝑒 −𝑥 − 𝑥.

Newton Raphson Method

The most widely used of all root-locating formulas. If the initial value of the root is xi, a tangent
can be extended from the point [xi,f(xi)]. The point where this tangent crosses the x-axis usually
represents an improved estimate of the root.

𝑓(𝑥𝑖 ) − 0
𝑓 ′ (𝑥) =
𝑥𝑖 − 𝑥𝑖+1

which can be rearranged to yield

𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓 ′ (𝑥𝑖 )

Graphical depiction of the Newoton Raphson Method.

A tangent of to the function of xi [that is, f’(xi)] is extrapolated down to the x-axis to provide an
estimate of the root of xi
Example 6.3: Use the Newton Raphson method to estimate the root of 𝑓(𝑥) = 𝑒 −𝑥 − 𝑥, use
initial guess of x0=0.

The Secant Method

A potential problem in implementing the Newton Raphson method is the evaluation of the
derivative. Although this is not inconvenient for polynomials and many other functions, there
some functions whose derivatives may be extremely difficult or inconvenient to evaluate. For
these cases, the derivative can be approximated by a back ward finite divided difference, as in
the figure below.

Graphical depiction of the secant method.

This technique is similar to the Newton Raphson technique. In the sense that an estimate of the
root is predicted by extrapolating a tangent of the function to the x-axis. However, the secant
uses difference rather than derivative to estimate the slope.

𝑓(𝑥𝑖+1 ) − 𝑓(𝑥𝑖 )
𝑓 ′ (𝑥) ≅
𝑥𝑖+1 − 𝑥𝑖

This approximation can be substituted into the Newton Raphson formula to yield:

𝑓(𝑥𝑖 )(𝑥𝑖−1 − 𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓(𝑥𝑖−1 ) − 𝑓(𝑥𝑖 )

Note Secant method require two initial estimates but f(xi) need not change sign.
Modified Secant Method:

𝛿𝑥𝑖 𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
𝑓(𝑥𝑖 + 𝛿𝑥𝑖 ) − 𝑓(𝑥𝑖 )

where 𝛿 =a small perturbation fraction.

Example 6.8: Use modified secant method to estimate the root of 𝑓(𝑥) = 𝑒 −𝑥 − 𝑥. Use a value
of 0.01 for 𝛿 and start with 𝑥0 = 1.0. Recall that the true root is 0.56714329….

HW 5.1, 5.6, 5.16, 5.17,

6.1,6.9, 6.15, 6.17, 6.26

8.3, 8.19

You might also like