Multi-stage switching multiprocessor interconnecion
Thursday, September 24, 2015
Saturday, September 19, 2015
Fixed Point Method to find the root of the non-linear equation
Fixed
Point Method [Linearly Convergent]
1. Assign an initial value to x0 and
accuracy level E.
2. Reform given equation as x = g(x)
3. Compute x1 = g(x0).
4. Check the required accuracy level of
x1.
If
absolute value of (x1 – x0) / x1 < E then
Write x1 as the root of
the equation and go to 4.
Otherwise
Set x0 = x1 and
Go to step 2
5. Stop
The
equation xi+1
= g (xi) where I = 0, 1, 2 … is
called the fixed point iteration formula.
Example: Find the square root of 5
using the equation x2 - 5 = 0 by
using fixed point iteration method.
Soln: Here f(x)
= x2 – 5
Step 1:
Assigning Initial value of x0 = 1 and
E = 0.01
Step 2:
Reforming the equation x2 - 5 = 0
Or x2
= 5
Or x = 5/x
Or 2x = 5/x + x [Adding x in both
sides]
x = [5/x + x] / 2
Step 3: Iteration I:
Computing x1 = g(x0).
x1=[5/x0 + x0] / 2 = 3 [x0 = 1]
Step 4: Checking
accuracy level,
Absolute value of (x1 – x0)
/ x1 < E
(3 - 1) /
3 = 0.6667
0.6667 <
0.01 which is false
So, set x0 = x1
and go to step 3
Iteration
II:
Computing x1
= g(x0).
x1=[5/x0 + x0] / 2 = …
Repeat the iterations until error
criteria satisfied.
If error criteria is satisfied then,
Write improved estimation x1 as the root of the
equation and stop.
Secant Method to find the root of the non-linear equation
Secant
Method [Super-linear convergence]
1. Decide two initial points x1
and x2, and accuracy level E.
2. Compute f(x1) and f(x2)
3. Compute improved value x3
with the help of x1 an x2,
i.e.
x3 = x2 - ( ( f(x2) (x2-x1) ) / ( f(x2)
- f(x1) ) )
4. Checking the accuracy level of
improved estimation i.e. x3.
If
absolute value of (x3 – x2) / x3 < E
Write improved estimation or x3
as the root of the equation and go to 5.
Otherwise
Set x1 = x2
and f(x1) = f(x2)
Set x2 = x3
and f(x2) = f(x3)
Go to step 3
5. Stop
Example:
Use the secant method to estimate the root of the equation x2-4x-10 = 0 with the initial estimates of x1 = 4 and x2 =
2.
Soln: Given f(x)
= x2-4x-10 = 0
Step 1: Initial points x1 = 4 and x2
= 2, and Accuracy level E = 0.01
Step 2: Computing f(x1)
and f(x2),
f(x1) = 42- 4*4 – 10 = -10
f(x2) = 22 –
4*2 – 10 = -14
Step 3: Iteration
I:
Computing improves root x3,
x3
= x2 - ( (
f(x2) (x2-x1) )
/ ( f(x2) - f(x1) ) ) = 2 - ( ( ( -14 ) ( 2 – 4
) ) / ( (
-14 ) - ( -10 ) ) )
= 2-(28 / (-4)) = 9
Step 4: Checking accuracy level,
Absolute
value of (x3 – x2) / x3 < E
(x3
– x2) / x3 = (9-2) / 9 = 7/9 = 0.7778
Here 0.7778 < 0.01 is false
Error criteria are not satisfied.
So,
Set x1 = x2 =
2 and f(x1) = f(x2) = -14
Set x2 = x3 =
9 and f(x2) = f(x3) = f(9) = 92 - 4*9 – 10 = 35
Go to step 3
Iteration II:
Calculating improved estimation of x3, using
x3
= x2 - ( (
f(x2) (x2-x1) )
/ ( f(x2) - f(x1) ) ) = …
Repeat the iterations until error
criteria satisfied.
If error criteria is satisfied then,
Write improved estimation x3 as the root of the
equation and stop.
Newton-Raphson Method to find the root of the non-linear equation
Newton-Raphson Algorithm [Quadratic
convergence]
1. Assign an initial value to x; say x0
and accuracy level E.
2. Calculate the f(x0) and f'(x0)
[f'(x0) is derivative of f(x0)].
3. Find the improved estimate of x0.
x1
= x0 - ( f(x0) / f'(x0) )
4. Check the accuracy level of the
improved estimation.
If
absolute value of (x1 - x0) / x1 < E
Write improved estimation as the
root of the equation and stop.
Otherwise
Continue.
5. Set x0 = x1
and repeat steps 3.
Example: Find the root of the equation x2-4x-10
= 0, using Newton-Raphson method.
Soln: Here given, f(x)
= x2-4x-10.
Step 1: Since initial value of x is
not provided so we can assume any value as initial value for x. say x = 0, i.e. x0 = 0.
And accuracy level E = 0.01.
Step 2: Computing f(x0) and
f'(x0)
Here f(x) = x2-4x-10 and f'(x) = 2x – 4
So, f(x0) = f(0) = 02
- 4*0 – 10 = -10
And f'(x0) = 2*0 – 4 = -4
Step 3: Iteration I:
Calculating improved estimation of x0, using
x1
= x0 - ( f(x0) / f'(x0) ) = 0 – ( -10 / -4
) = -2.5
Step 4: Checking the accuracy level
of improved estimation using,
Absolute value of (x1 - x0)
/ x1 < E
(x1 - x0) / x1 = (-2.5 – 0) /
-2.5 = 1.
Or 1 < 0.01 [Which is false.]
Error
criteria not satisfied.
Step 5: Set x0 = x1
and go to step 3.
Iteration II: Calculating improved estimation of x0, using
x1 =
x0 - ( f(x0) / f'(x0) ) = …
Repeat the iterations until error
criteria satisfied.
If error criteria is satisfied then,
Write improved estimation as the
root of the equation and stop.
Limitations of Newton-Raphson Method
1. Division by zero may occur if f'(xi)
is zero or very close to zero
2. If the initial assumption is too far
away from the required root, the process may converge to some other root.
3. A particular value in the iteration
sequence may repeat, resulting in an infinite loop. This occurs when the
tangent to the curve f(x) at x = xi+1 cuts the x-axis again at x = xi.
Subscribe to:
Comments (Atom)
