Professional Documents
Culture Documents
1
Roots of Equations
• Many engineering problems require the
determination of the values of the variable x
which satisfies the non-linear equation
f ( x) = 0
2
Non-Linear Eqn.
• Bracketing methods
– Bisection
– Regula falsi (False position)
3
Non-Linear Eqn.
• Open methods
– Systematic trial and error
– Computationally efficient, but do not always
work
• Newton Raphson
• Secant
• One-point iteration
• Roots of Polynomials
– Muller’s
– Bairstow’s
4
Example
• Using the graphical approach to determine
the value of the drag coefficient ( c )
needed for a parachutist of mass m=68.1
kg to have a velocity of 40 m/s after free
falling time of 10s.
• NOTE g = 9.8 m/s2.
5
Drag coefficient to attain a given
velocity at a set time period
v=
gm
c
1− e (
− ( c / m )t
)
f (c ) =
gm
c
(
1− e )
− ( c / m )t
−v
6
f (c ) =
gm
c
1− e (
− ( c / m )t
−v) g= 9.8m/s2, m=68.1 kg,
t=10s, v = 40 m/s
f (c )
c f (c )
40
35 f (c )
4 34.115
30
25
8 17.653 20
15
10
12 6.067
5
0
16 -2.269 -5 0 5 10 15 20 25
-10
20 -8.401 -15
The curve crosses the x axis between 12 and 16. A rough estimate of
the root is 14.8. The graphical method is not very accurate, but provides
a good estimate. Also helps to understand the properties of the function. 7
Plot of tan (x) showing singularities
tanx
10
tanx
8
0
0 1 2 3 4 5 6 7
-2
-4
-6
-8
-10
8
Root search algorithm
%Incremental search for a root of f(x)
%USAGE: [x1,x2] = rootsearch(func, a,b, dx)
%INPUT:
% func = handle of function that returns f(x)
% a,b = limits of search
% dx = search increment
% OUTPUT
% x1, x2 = bounds of function that returns f(x)
% set to NaN if no root is found
%
function [x1,x2] = rootsearch(func, a,b, dx)
x1 = a;
f1 = feval(func,x1);
x2 = a + dx;
f2 = feval(func,x2);
10
Number of bisections
Bisection is repeated until the original interval
has been reduced to a small value, ε so that
xi − xi −1 ≤ ε
If Δx (0) is the original interval
the number of bisections required to attain
a prescribed absolute error is
⎛ Δx (0) ⎞
ln ⎜ ⎟
ε
n= ⎝ ⎠
ln 2
When the error becomes less than specified stopping criterion, the
computation stopped.
12
13
Regula Falsi (False Position) Method
f (x1)
f ( x)
x x3 x4
2
x 1
f ( x2 )
f ( xi ) ( xi − xi −1 )
xi +1 = xi −
f ( xi ) − f ( xi −1 ) 14
Newton Raphson Method
f ( x) f ′( x1 )
f ′( x2 )
f ′( x3 )
x
x4 x3 x2 x1
f ( x)
f ( xi )
xi +1 = xi − i = 1, 2, 3....
f ′( xi ) 15
Newton Method: Properties
• Requires derivative of the function f’ = df/dx
• Very fast convergence in most cases
(Quadratic convergence) !!
• May not converge if the estimate is far off
• May not converge if the derivative (slope) at
an estimate is close to zero
• Can be used to find complex roots
16
Newton : Non-convergent
17
Convergence criteria for stopping iterative
procedure
xi − xi −1 ≤ ε
xi − xi −1
≤ε xi ≠ 0
xi
f ( xi ) ≤ε
f ( xi ) − f ( xi −1 )
f ′( xi ) =
xi − xi −1
f ( xi ) ⎡ xi − xi −1 ⎤
f ( xi ) = xi − = xi − f ( xi ) ⎢ ⎥
′
f ( xi ) ⎣ f ( xi ) − f ( xi −1 ⎦
)
i = 2, 3, 4, …
• Needs two initial guesses
19
Convergence of the Secant Method
f ( x2 )
Exact root
f ( x3 )
x
x4 x3 x2 x1
f ( x)
⎡ xi − xi−1 ⎤
xi+1 = xi − f (xi ) ⎢ ⎥ i = 2,3,4....
⎣ f (xi ) − f (xi−1) ⎦ 20
Secant : non-convergence
f ( x)
x
x2 x1
21
Fixed Point Iteration
22
Roots of Polynomials
23
Roots of Polynomials
f (x) =a0 +ax
1 +a2x + +anx 2 n
n = order of polynomial
a’s = constant coefficients
24
Polynomial Deflation
• If a root of a polynomial has been found, it
is desirable to factor the polynomial
Pn (x) = ( x − r) Pn−1(x)
• Deflation or synthetic division
25
26
Roots of Polynomials
• Polynomials
• Polynomial deflation
• Muller’s Method
• Bairstow’s Method
27