Documente Academic
Documente Profesional
Documente Cultură
Approximation
Srinivasan Nenmeli-K
Introduction
You might have read my previous document--Learning to learn---a
Approximation.
first solution...
Step2: Then we apply this in the given problem and find the
Example 1
method straight!;
Finding the square root:
Let us find the square root of 38.
Since we know 5 x 5= 25 and 10 x 10 = 100, the square root
method.
-------------------------------------------------------------------------
Example 2
Any non-linear algebraic equation can be solved by
Step 3:
Note that f(0.75)<0 and f(0.5)>0 The root must lie
To check f(.687) =
Note that we are indeed close to the root since f(x) is
Practice problem:
Solve x^3 - 2x- 5= 0
The root is close to 2 ; Take the initial roots as x1= 2
and x2= 2.5
The root is 2.09455
Example 3
successive approximation:
,say x1.
this method!
method.
--------------------------------------------------------------------------------------------------
Iterative Formula
Look at the example of Heron's formula for finding the square
root:
the root ,called x2. Again you plug in x2 in the right side ane
Solve:
Let us start with x1= 0.5 and find successive approx values for
the root x:
equation:
solution.
---------------------------------------------------------------------------------------
Example 4
------------------------------------------------------------------------------------------------------
Now you do not know the fixed point ....then start with x = x1,
For the same y,find x, the new x ,say x2. for x2 ,find g(x2) and
so on...you will converge at the fixed point x*....
Example 5
let us take the same example of finding the square root of 2,
y = x
and y = 2/x
If you plot the two curves, you will find the point of
intersection at x = 1.414
To enable you to draw the curves, I give this short table: y1= x ;
y2= 2/x
x y1 y2
0.2 0.2 10
0.5 0.5 4
1 1 2
3 3 0.666
4 4 0.5
-------------------------------------------------
-----------------------------------------------------------------------------------------------
approximation
To solve the equation f(x)=0,
This line will cut the x axis at some point x' very close to the
root x*;we take x' as the next approximate root.
mx + c
m= the slope = (y2-y1)/(x2-x1)
c= y1 - [(y2-y1)/(x2 - x1)]x1
To find the next root x', we find the x intercept when y=0
Then y=mx' + c =0
x' = -c/m
x' = -[y1 - mx1]/m = (mx1 -y1)/m
x' = x1 -y1/m
x' = x1 - f(x1).[(x2-x1)/(f(x2)-f(x1)]
Let us use this method for the same problem given earlier:
To Solve:
Note that y1 and y2 are of opposite signs;so the root lies between
0 and 1.
let us form the straight line between x1=0 and x2= 1
y= mx+c
Slope = m = (y2-y1)/(x2-x1) = (-1-3)/(1)= -4
y1=3 = c
c=3
y= -4x + 3
f(0.75) =
Let us take x1=0 f(x1)=y1=3
x'= x1 - y1/m
m= (-0.3281-3)/(0.75-0)= -3.3281/0.75= -4.43
x'= 0 - 3/-4.43=0.6772
We can take x' = 0.6772 as the next approximate root.
You will find that the secant method is quite 'efficient' in that
in just two iteration , we have the root x'= 0.6772 while the
exact root x*= 0.687
doing this.
1. Rectangular method
Then construct the rectangle with width = (b-a) and height =f(a)
We approximate the value of the integral to the area of this
rectangle:
I = width x height = (b-a) f(a)
{note: I could have used for the area: I = width x height= (b-a)
f(b)
Example 1: Find
Let us use our method and get some value close to this.
First approximation: I = (2-1).(1/x) at x =1 I = 1*1=2
poor approximation.
Third approximation: Let us split the integral into 4 each with
a width of 0.25.
2. Trapezoidal rule
Instead of approximating the area to a rectangle, let us use a
I = width (f(a)+f(b))/2
First approximation:
This is a good result.Let us split the integral into two and then
apply trapezoidal rule:
Second approximation:
3. Midpoint rule
First approximation:
We are rather close to I = 0.69
Second approximation:
The midpoint method is more efficient;in two approximations we got
I =0.25(1/1.125+1/1.375+1/1.625+1/1.875)=0.691219=0.6912
-----------------------------------------------------------------------------------------
Practice Problems:
The answer is
---------------------------------------------------------------------------------------
--------------------------------------------the
end-----------------------------------------