presentation on solution to non linear equations
DESCRIPTION
Here we try to give the example and solution of different method.TRANSCRIPT
Presentation On
Solution To Non-Linear Equation
Md. Rifat Rahamatulla 09.02.05.032 Md. Reduanul Islam 09.02.05.033
Md. Imran Hossain 09.02.05.035 Md. Hasibul Haque 09.02.05.036 Md. Tousif Zaman 09.02.05.038
Presented By
What is non-linear equation..??
• An equation in which one or more terms have a variable of degree 2 or higher is called a nonlinear equation. A nonlinear system of equations contains at least one nonlinear equation.
• Non linear equation can be solved in these ways-• 1. Bisection method.• 2. False position method.• 3. Newton Raphson method.• 4. Secant method.
Bisection Method
BISECTION METHODa
Topic Outlines
• Definition.• Basis of Bisection method.• Steps of finding root.• Algorithm of Bisection method.• Example.• Application.• Advantage.• Drawbacks.• Improved method to Bisection method.• Conclusion.
Definition
• The Bisection method in mathematics is a root finding method which repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing.
Basis of Bisection Method• Theorm 1-
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.
x
f(x)
xu x
Theorem 2-
If the function f(x) in f(x)=0 changes sign between two points, more than one root may exist between the two points.
x
f(x)
xu x
x
f(x)
xu x
Theorem 3-
If the function f(x) in f(x)=0 does not change sign between two points, there may not be any roots between the two points.
x
f(x)
xu
x
10
Steps of finding root:
Step-1 Choose xl and xu as two guesses for the root such that f(xl) f(xu) < 0, or in other words, f(x) changes sign
between xl and xu. This was demonstrated in Figure 1.
x
f(x)
xu x
Figure 1
x
f(x)
xu x
xm
11
Step-2 Estimate the root, xm of the equation f (x) = 0 as the mid point between xl and xu as
xx
m = xu
2
Figure 5 Estimate of xm
12
Step-3 Now check the following
a) If , then the root lies between xl and xm; then xl = xl ; xu = xm.
b) If , then the root lies between xm and xu; then xl = xm; xu = xu.
c) If , then the root is xm. Stop the algorithm if this is true.
0ml xfxf
0ml xfxf
0ml xfxf
13
xx
m = xu
2
100
newm
oldm
new
a x
xxm
root of estimatecurrent newmx
root of estimate previousoldmx
Step-4 Find the new estimate of the root
Find the absolute relative approximate error
where
14
Is ?
Yes
No
Go to Step 2 using new upper and lower guesses.
Stop the algorithm
Step-5 Compare the absolute relative approximate error with the pre-specified error tolerance .
as
sa
Note one should also check whether the number of iterations is more than the maximum number of iterations allowed. If so, one needs to terminate the algorithm and notify the user about it.
Algorithm of Bisection Method
16
Example
The floating ball has a specific gravity of 0.6 and has a radius of 5.5 cm. we are asked to find the depth to which the ball is submerged when floating in water.
Figure 6 Diagram of the floating ball
17
The equation that gives the depth x to which the ball is submerged under water is given by
a) Use the bisection method of finding roots of equations to find the depth x to which the ball is submerged under water. Conduct three iterations to estimate the root of the above equation.
b) Find the absolute relative approximate error at the end of each iteration, and the number of significant digits at least correct at the end of each iteration.
010993.3165.0 423 xx
18
From the physics of the problem, the ball would be submerged between x = 0 and x = 2R,
where R = radius of the ball,that is
11.00
055.020
20
x
x
Rx
Figure 6 Diagram of the floating ball
To aid in the understanding of how this method works to find the root of an equation, the graph of f(x) is shown to the right,
where
19
0104.203.0 623 xxxxf 423 1099331650 -.x.xxf
Figure 7 Graph of the function f(x)
Solution-
20
Let us assume
11.0
00.0
ux
x
Check if the function changes sign between xl and xu .
4423
4423
10662.210993.311.0165.011.011.0
10993.310993.30165.000
fxf
fxf
u
l
Hence
010662.210993.311.00 44 ffxfxf ul
So there is at least on root between xl and xu, that is between 0 and 0.11
21Figure 8 Graph demonstrating sign change between initial limits
22
055.02
11.00
2
u
m
xxx
010655.610993.3055.00
10655.610993.3055.0165.0055.0055.054
5423
ffxfxf
fxf
ml
m
Iteration 1The estimate of the root is
Hence the root is bracketed between xm and xu, that is, between 0.055 and 0.11. So, the lower and upper limits of the new bracket are
At this point, the absolute relative approximate error cannot be calculated as we do not have a previous approximation.
11.0 ,055.0 ul xx
a
23Figure 9 Estimate of the root for Iteration 1
24
0825.02
11.0055.0
2
u
m
xxx
010655.610622.1)0825.0(055.0
10622.110993.30825.0165.00825.00825.054
4423
ffxfxf
fxf
ml
m
Iteration 2The estimate of the root is
Hence the root is bracketed between xl and xm, that is, between 0.055 and 0.0825. So, the lower and upper limits of the new bracket are
0825.0 ,055.0 ul xx
25Figure 10 Estimate of the root for Iteration 2
26
The absolute relative approximate error at the end of Iteration 2 isa
%333.33
1000825.0
055.00825.0
100
newm
oldm
newm
a x
xx
None of the significant digits are at least correct in the estimate root of xm = 0.0825 because the absolute relative approximate error is greater than 5%.
27
06875.02
0825.0055.0
2
u
m
xxx
010563.510655.606875.0055.0
10563.510993.306875.0165.006875.006875.055
5423
ffxfxf
fxf
ml
m
Iteration 3The estimate of the root is
Hence the root is bracketed between xl and xm, that is, between 0.055 and 0.06875. So, the lower and upper limits of the new bracket are
06875.0 ,055.0 ul xx
28Figure 11 Estimate of the root for Iteration 3
29
The absolute relative approximate error at the end of Iteration 3 isa
%20
10006875.0
0825.006875.0
100
newm
oldm
newm
a x
xx
Still none of the significant digits are at least correct in the estimated root of the equation as the absolute relative approximate error is greater than 5%.Seven more iterations were conducted and these iterations are shown in Table 1.
30
Table 1
Root of f(x)=0 as function of number of iterations for bisection method.
Iteration x xu xm a % f(xm)
1
2
3
4
5
6
7
8
9
10
0.00000
0.055
0.055
0.055
0.06188
0.06188
0.06188
0.06188
0.0623
0.0623
0.11
0.11
0.0825
0.06875
0.06875
0.06531
0.06359
0.06273
0.06273
0.06252
0.055
0.0825
0.06875
0.06188
0.06531
0.06359
0.06273
0.0623
0.06252
0.06241
----------
33.33
20.00
11.11
5.263
2.702
1.370
0.6897
0.3436
0.1721
6.655×10−5
−1.622×10−4
−5.563×10−5
4.484×10−6
−2.593×10−5
−1.0804×10−5
−3.176×10−6
6.497×10−7
−1.265×10−6
−3.0768×10−7
31
Hence the number of significant digits at least correct is given by the largest value or m for which
463.23442.0log2
23442.0log
103442.0
105.01721.0
105.0
2
2
2
m
m
m
m
ma
2mSo
The number of significant digits at least correct in the estimated root of 0.06241 at the end of the 10th iteration is 2.
Application-1• Finding the value of resistance-
Thermistors are temperature-measuring devices based on the principle that the thermistor material exhibits a change in electrical resistance with a change in temperature. By measuring the resistance of the thermistor material, one can then determine the temperature.
• For a 10K3A Betatherm thermistor, the relationship between the resistance ‘R’ of the thermistor and the temperature is given by
where note that T is in Kelvin and R is in ohms.
3833 ln10775468.8)ln(10341077.210129241.11
RxRxxT
• For the thermistor, error of no more than ±0.01o C is acceptable. To find the range of the resistance that is within this acceptable limit at 19o C, we need to solve
and
• Use the bisection method of finding roots of equations to find the resistance R at 18.99o C. Conduct three iterations to estimate the root of the above equation.
3833 ln10775468.8)ln(10341077.210129241.115.27301.19
1RxRxx
3833 ln10775468.8)ln(10341077.210129241.115.27399.18
1RxRxx
Solution- Graph of function f(x)
0104.203.0 623 xxxxf 3383 10293775.2ln10775468.8)ln(10341077.2)( xRxRxRf
1 1.5 2 2.5 3 3.5 40.003
0.002
0.001
0
0.001
f(x)
9.51881 104
2.29378 103
0
f x( )
41 x
Choose the bracket
4
3
1051881.94
10293775.21
4
1
xf
xf
R
R
u
0.5 1 1.5 2 2.5 3 3.5 4 4.50.004
0.003
0.002
0.001
0
0.001
f(x)xu (upper guess)xl (lower guess)
1.22768 103
3.91652 103
0
f x( )
f x( )
f x( )
4.50.5 x x u x l
Entered function on given interval with initial upper and lower guesses
5.22
41
4,1
m
u
R
RR
4
4
3
10486.15.2
1051881.94
10293775.21
xf
xf
xf
4
5.2
uR
R0.5 1 1.5 2 2.5 3 3.5 4 4.5
0.004
0.003
0.002
0.001
0
0.001
f(x)xu (upper guess)xl (lower guess)new guess
1.22768 103
3.91652 103
0f x( )
f x( )
f x( )
f x( )
4.50.5 x x u x l x r
First iteration-
Second iteration-
%07.23
25.32
45.2
4,5.2
a
m
u
x
RR
25.3,5.2
106569.425.3
1051881.94
10486.15.2
4
4
4
uRR
xf
xf
xf
0.5 1 1.5 2 2.5 3 3.5 4 4.50.004
0.003
0.002
0.001
0
0.001
f(x)xu (upper guess)xl (lower guess)new guess
1.22768 103
3.91652 103
0f x( )
f x( )
f x( )
f x( )
4.50.5 x x u x l x r
Third iteration-
875.22
25.35.2
25.3,5.2
m
u
R
RR
4
4
4
107863.1875.2
106569.425.3
10486.15.2
%0435.13
xf
xf
xf
a
0.5 1 1.5 2 2.5 3 3.5 4 4.50.004
0.003
0.002
0.001
0
0.001
f(x)xu (upper guess)xl (lower guess)new guess
1.22768 103
3.91652 103
0f x( )
f x( )
f x( )
f x( )
4.50.5 x x u x l x r
Table 1: Root of f(R)=0 as function of number of iterations for bisection method.
aIteration Rl Ru Rm % f(Rm)
123456789
10
12.52.52.52.5
2.593752.640632.640632.652342.6582
44
3.252.8752.68752.68752.6875
2.664062.664062.66406
2.53.25
2.8752.6875
2.593752.640632.664062.652342.65822.6611
----------23.077
13.04356.976743.614461.775150.879770.441830.220430.11009
-1.486x10-4
4.6567x10-4
1.7863x10-4
2.07252x10-5
-6.24075x105
-2.04723x10-5
2.17037x10-7
-1.01048x10-5
-4.9382x10-6
-2.3592x10-6
Testing Convergence-
41
Application-2
Profit Counting- We are working for a start-up computer assembly company and have been asked to determine the minimum number of computers that the shop will have to sell to make a profit.
The equation that gives the minimum number of computers ‘x’ to be sold after considering the total costs and the total sales is:
03500087540)f( 5.1 xxx
42
Use the bisection method of finding roots of equations to find
The minimum number of computers that need to be sold to make a profit. Conduct three iterations to estimate the root of the above equation.
Find the absolute relative approximate error at the end of each iteration, and
The number of significant digits at least correct at the end of each iteration.
0 20 40 60 80 1002 10
4
1 104
0
1 104
2 104
3 104
4 104
f(x)
3.5 104
1.25 104
0
f x( )
1000 x
43
0104.203.0 623 xxxxf 03500087540 5.1 xxxf
Figure 8 Graph of the function f(x).
44
Choose the bracket:
12500100
1.539250
f
f
0 20 40 60 80 100 1202 10
4
1 104
0
1 104
2 104
3 104
4 104
f(x)xu (upper guess)xl (lower guess)
3.5 104
1.74186 104
0
f x( )
f x( )
f x( )
1200 x x u x l
Entered function on given interval with initial upper and lower guesses
Figure 9 Checking the sign change between the limits.
100and50 uxx
0125001.5392
10050
ffxfxf ul
There is at least one root between and .
xux
45
752
10050
mx
0106442.41.5392
106442.475
3
3
ml xfxf
f
75and50 uxx
0 20 40 60 80 100 1202 10
4
1 104
0
1 104
2 104
3 104
4 104
f(x)xu (upper guess)xl (lower guess)new guess
3.5 104
1.74186 104
0
f x( )
f x( )
f x( )
f x( )
1200 x x u x l x r
Iteration 1The estimate of the root is
Figure 10 Graph of the estimate of the root after Iteration 1.
The root is bracketed between and .
The new lower and upper limits of the new bracket are
xmx
At this point, the absolute relative approximate error cannot be calculated as we do not have a previous approximation.
46
5.622
7550
mx
05.6250
735.765.62
ffxfxf
f
ml
0 20 40 60 80 100 1202 10
4
1 104
0
1 104
2 104
3 104
4 104
f(x)xu (upper guess)xl (lower guess)new guess
3.5 104
1.74186 104
0
f x( )
f x( )
f x( )
f x( )
1200 x x u x l x r
Iteration 2The estimate of the root is
75and5.62 uxx
The root is bracketed between and .
The new lower and upper limits of the new bracket are
mxux
Figure 11 Graph of the estimate of the root after Iteration 2.
47
%20
1005.62
755.62
100
newm
oldm
newm
a x
xx
The absolute relative approximate error at the end of Iteration 2 is
The number of significant digits that are at least correct in the estimated root is 0.
The root is bracketed between and .
The new lower and upper limits of the new bracket are
48
0103545.2735.76
103545.275.68
75.682
755.62
3
3
ml
m
xfxf
f
x
0 20 40 60 80 100 1202 10
4
1 104
0
1 104
2 104
3 104
4 104
f(x)xu (upper guess)xl (lower guess)new guess
3.5 104
1.74186 104
0
f x( )
f x( )
f x( )
f x( )
1200 x x u x l x r
Iteration 3The estimate of the root is
75.68and5.62 uxx
lxmx
Figure 12 Graph of the estimate of the root after Iteration 3.
49
%0909.9
10075.68
5.6275.68
100
newm
oldm
newm
a x
xx
The absolute relative approximate error at the end of Iteration 3 is
The number of significant digits that are at least correct in the estimated root is 0.
50
Table 1 Root of f(x)=0 as function of number of iterations for bisection method.
aIteration xl xu xm % f(xm)
12345678910
505062.562.562.562.562.562.562.562.598
100757568.7565.62564.06363.28162.89162.69562.695
7562.568.7565.62564.06363.28162.89162.69562.59862.646
----------209.09094.76192.43901.23460.621120.311530.156010.077942
−4.6442×103
76.735−2.3545×103
−1.1569×103
−544.68−235.12−79.483−1.4459 37.627 18.086
Advantage of Bisection method-
• It is a very simple method to understand.• The bisection method is always convergent.
Since the method brackets the root, the method is guaranteed to converge.
• Since we are halving the interval in each step, so the method converges to the true root in a predictable way.
51
• Since the method discards 50% of the interval at each step it brackets the root in much more quickly than the incremental search method does. For example –
*Assuming a root is somewhere in the interval between 0 and 1, it takes 6-7 function evaluations to estimate the root within 0.1 accuracy.
*Those same 6-7 function evaluations using bisecting estimate the root within 0.031 accuracy.
52
53 53
Drawbacks It may take many iterations. If one of the initial guesses is close to the
root, the convergence is slower. The method can not find complex roots of
polynomials The bisection method only finds root when
the function crosses the x axis.
54
• 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)
x
2xxf
55
Function changes sign but root does not exist
f(x)
x
x
xf1
Improved method to Bisection method-
• Regula Falsi Method: Regula Falsi method (false position) is a root-finding method based on linear interpolation. Its convergence is linear, but it is usually faster than bisection
• Newton Raphson method: This method works faster than the Bisection method and also much more accurate.
• Brent Method: Brent method combines an interpolation strategy with the bisection algorithm. On each iteration, Brent method approximates the function using an interpolating curve.
Conclusion
This bisection method is a very simple and a robust method and it is one of the first numerical methods developed to find root of a non-linear equation .But at the same time it is relatively very slow method. We can use this method for various purpose related to non linear continuous functions. Though it is a slow one ,but it is one of the most reliable methods for finding the root of a non-linear equation.