Sie sind auf Seite 1von 28

SOLUTIONS TO

NON-LINEAR
EQUATION

1
a. BISECTION
METHOD
Basis of Bisection Method
Theorem An equation f(x)=0, where f(x) is a real continuous function,
has at least one root between xl and xu if f(xl) f(xu) < 0.
f(x)

x
x
xu

Figure 1 At least one root exists between the two points if the
function is real, continuous, and changes sign.
Basis of Bisection Method
f(x)

x x
xu

Figure 2 If function f xdoes


not change sign between two points,
roots of the equation f x may
0 still exist between the two points.
Basis of Bisection Method
f(x)
f(x)

x xu
x x
x xu

Figure 3 If the function f xdoes


not change sign between two
points, there may not be any roots for the equation f between
x 0
the two points.
Basis of Bisection Method
f(x)

xu x
x

Figure 4 If the function f x changes sign between two points,


more than one root for the equation f x 0 may exist
between the two points.
Step 1
Choose x and xu as two guesses for the root such that f(x)
f(xu) < 0, or in other words, f(x) changes sign between x and
xu. This was demonstrated in Figure 1.
f(x)

x
x
xu

Figure 1
Step 2
Estimate the root, xm of the equation f (x) = 0 as the mid
point between x and xu as
f(x)

x xu
xm =
2
x xm
x
xu

Figure 5 Estimate of xm
Step 3
Now check the following

a) If f xm () , then x = x ; x = x .
u m

b) If f xm () , then x = xm; xu = xu.

c) If f xm 0 , then the root is xm.


Step 4

Find the new estimate of the root


x xu
xm =
2
Find the absolute relative approximate error
x new x old

a 100
m m
new
x m

where
xmold previous estimate of root
xmnew current estimate of root
Example:
Locate the first non-trivial root of sin x = x2. Use Bisection
Method with initial interval from 0.5 to 1.0. Perform the
computation until a 2%
Solution:
f(x) = x2-sin x x(0.5,1) a 2%
i Xl Xu Xm F(xm) a
0 0.5 1.0 0.75 - -
1 0.75 1.0 0.875 - 14.29
2 0.875 1.0 0.9375 + 6.67
3 0.875 0.9375 0.9063 + 3.44
4 0.875 0.9063 0.8907 + 1.75
Example:
Locate the first non-trivial root of sin x = x2. Use Bisection
Method with initial interval from 0.5 to 1.0. Perform the
computation until a 2%
Solution:
f(x) = x2-sin x x(0.5,1) a 2%
i Xl Xu Xm F(xm) a
1 0.5000 1.0000 0.7500 -0.1191 -
2 0.7500 1.0000 0.8750 -0.0019 14.2857
3 0.8750 1.0000 0.9375 0.0728 6.6667
4 0.8750 0.9375 0.9063 0.0341 3.4483
5 0.8750 0.9063 0.8906 0.0157 1.7544
Advantages

Always convergent
The root bracket gets halved with each
iteration - guaranteed.
Drawbacks

Slow convergence
If one of the initial guesses is close to
the root, the convergence is slower
Drawbacks

If a function f(x) is such that it just touches


the x-axis it will be unable to find the lower
and upper guesses.
f(x)

f x x 2

x
Drawbacks

Function changes sign but root does not


exist

f x
f(x)
1
x
x
NEXT TOPIC:

b. REGULA-FALSI
METHOD
(FALSE POSITION METHOD)
f ( xu ) f ( xl )

xu x r xr xl

xr f ( xu ) xl f ( xu ) xu f ( xl ) xr f ( xl )
xr f ( xu ) f ( xl ) xl f ( xu ) xu f ( xl )

xl f ( xu ) xu f ( xl )
xr
f ( xu ) f ( xl )
Example:
Locate the first non-trivial root of sin x = x2. Use Bisection
Method with initial interval from 0.5 to 1.0. Perform the
computation until a 2%
Solution:
f(x) = x2-sin x x(0.5,1) a 2%
xl f ( xu ) xu f ( xl )
xr E= AD-BC
f ( xu ) f ( xl ) D-B
A B C D E F

i Xl F(xl) Xu F(xu) Xr F(xr) a


1 0.5 -0.2294 1.0 0.1585 0.7957 -0.0812 -
2 0.7957 -0.0812 1.0 0.1585 0.8649 -0.0130 8
3 0.8649 -0.0130 1.0 0.1585 0.8751 -0.0018 1.17
Example:
Locate the first non-trivial root of sin x = x2. Use Bisection
Method with initial interval from 0.5 to 1.0. Perform the
computation until a 2%
Solution:
f(x) = x2-sin x x(0.5,1) a 2%
A B C D E F
i Xl F(xl) Xu F(xu) Xm F(xm) a
1 0.5000 -0.2294 1.0000 0.1585 0.7957 -0.0812 -
2 0.7957 -0.0812 1.0000 0.1585 0.8649 -0.0130 8%
3 0.8649 -0.0130 1.0000 0.1585 0.8751 -0.0018 1.17%
xl f ( xu ) xu f ( xl )
xr Xm= AD-BC
f ( xu ) f ( xl ) D-BC
NEXT TOPIC:

c. SIMPLE
FIXED-POINT ITERATION
SFPI - also known as Open Method

f ( x) 0 x g ( x)
Example:
Locate the first non-trivial root of sin x = x2. Use Bisection
Method with initial interval from 0.5 to 1.0. Perform the
computation until a 2%
Solution:
f(x) = x2-sin x x(0.5,1) a 2%

x sin x (1)

sin x
x (2)
x
1 2
x sin x (3)
If x sin x
At x = 0.5

i xi x (i+1) Ea
0 0.5 0.6924 -
1 0.6924 0.7990 13.34
2 0.7990 0.8466 5.62
3 0.8466 0.8655 2.18
4 0.8655 0.8726 0.81
At x = 1.0

i xi x (i+1) Ea
0 1 0.9173 -
1 0.9173 0.8911 2.95
2
If x sin x
At x = 0.5

i xi x (i+1) Ea
0 0.5 0.6924 -
1 0.6924 0.7990 13.34
2 0.7990 0.8466 5.62
3 0.8466 0.8654 2.18
4 0.8654 0.8726 0.82
At x = 1.0

i xi x (i+1) Ea
0 1 0.9173 -
1 0.9173 0.8911 2.95
2 0.8911 0.8819 1.04
sin x
if x
x
At x = 0.5

i xi x (i+1) Ea
0 0.5 0.9589 -
1 0.9589 0.8537 12.32
2
3

At x = 1.0
i xi x (i+1) Ea
0 1 0.8415 -
1 0.8415 0.8861 5.04
2
sin x
if x
x
At x = 0.5

i xi x (i+1) Ea
0 0.5 0.9589 -
1 0.9589 0.8537 12.32
2 0.8537 0.8829 3.31
3 0.8829 0.8751 0.90

At x = 1.0
i xi x (i+1) Ea
0 1 0.8415 -
1 0.8415 0.8861 5.04
2 0.8861 0.8742 1.36
Assignment: To be submitted on or before
July 12, 2011
1. Solve V1, V2, V3 of the circuit below using any of the iterative
method.

2. Solve for the roots of f(x) = sin x x


with an interval of (0.5,1). Use BM, RFM, SFPI.

Das könnte Ihnen auch gefallen