478 - LECTURE NOTES ON PHS 473-Main PDF
478 - LECTURE NOTES ON PHS 473-Main PDF
478 - LECTURE NOTES ON PHS 473-Main PDF
BY
DR V.C. OZEBO
CONTENT
CHAPTER ONE
ERRORS
An error may be defined as the difference between an exact and computed value,
Suppose the exact value of a solution of a computational problem is 1.023; now when a
computer or calculator is used, the solution is obtained as 1.022823; hence the error in this
calculation is (1.023 1.022823) 0.000177
Types of Error
Round-off error:- This error due to the rounding-off of a quantity due to limitations in the
digits.
Truncation error:-Truncation means cutting off the other digits i.e. no rounding off. For
instance, 1.8123459 may be truncated to 1.812345 due to a preset allowable number of digits.
Absolute Error:- The absolute value of an error is called the absolute error; that is;
Absolute error = |
Relative error:- Relative error is the ratio of the absolute error to the absolute value of the exact
value.; That is
Relative error =
= 100 x 10 = 1000
= 100
= 100
Exact Value
9.98
998
99800
9980000
Computed value
10
1000
100,000
10,000,000
Error
0.02
2
200
20,000
Notice above, how the error quantities accumulated. A small error of 0.02 at Y0leads to an error
of 20,000 in Y3. So, in a sequence of computations, an error in one value may affect the
computation of the next value and the error gets accumulated. This is called accumulated error.
Relative Accumulated Error
This is the ratio of the accumulated error to the exact value of that iteration. In the above
example, the relative accumulated error is shown below.
Variable
Exact Value
Y0
Y1
Y2
Y3
9.98
998
99800
9980000
Notice that the relative accumulated error is same for all the values.
CHAPTER TWO
ROOT FINDING IN ONE DIMENSION
This involves searching for solutions to equations of the form: ( ) = 0
The various methods include:
1. Bisection Method
This is the simplest method of finding a root to an equation. Here we need two initial
guesses xaandxb which bracket the root.
Let
= (
) and
= (
) such that
0 (see fig 1)
Figure1: Graphical representation of the bisection method showing two initial guesses (xa and
xbbracketting the root).
Clearly, if
and
must be a root of
( )= 0
The basic algorithm for the bisection method relies on repeated applications of:
=
Let
If Fc= f(c) = 0 then,
Else if
) with either (
) or ( ,
root), the error in our estimation of the solution to ( ) = 0 is on the average, halved.
We repeat this interval halving until either the exact root has been found of the interval is
smaller than some specified tolerance.
Hence, the root bisection is a simple but slowly convergent method for finding a solution
of ( ) = 0, assuming the function f is continuous. It is based on the intermediate value
theorem, which states that if a continuous function f has opposite signs at some x = aand
x = b(>a) that is, either ( ) < 0, ( ) > 0
somewhere on [ , ].
We thus obtain a solution by repeated bisection of the interval and in each iteration, we
pick that half which also satisfies that sign condition.
Example:
Given that ( ) =
( )= 0.
Solution:
Given that ( ) =
2.44 = 0
Therefore,
2.44 = 0
Direct method gives
= 2.44
X
Trial value
-1
0
1
2
3
F(x) = x-2.44
-3.44
-2.44
-1.44
-0.44
+0.56
It is clear from the table that the solution lies between x = 2 and x = 3.
Now choosing x = 2.5, we obtain F(x) = 0.06, we thus discard x = 3 since F(x) must lie
between 2.5 and 2. Bisecting 2 and 2.5, we have x = 2.25 with F(x) = -0.19.
Obviously now, the answer must lie between 2.25 and 2.5.
The bisection thus continues until we obtain F(x) very close to zero, with the two values
of x having opposite signs.
X
2.25
2.375
2.4375
2.50
F(x) = x-2.44
-0.19
-0.065
-0.0025
-0.06
Full Algorithm
1.
2.
3.
4.
5.
6.
7.
8.
9.
Define F(x)
Read x1 , x2, values of x such that F(x1)F(x2) < 0
Read convergence term, s = 10-6, say.
Calculate F(y), y = (x1+x2) / 2
If abs(x2-x1) s, then y is a root. Go to 9
If abs(x2-x1) > s, Go to 7
If F(x1)F(x2) 0, (x1,y) contains a root, set x2 = y and return to step 4
If not, (y, x2) contains a root, set x1 = y and return to step 4
Write the root A
Start
Dimension
Define F(x)
Y = (x1 + x2) / 2
>
>
F(x1)F(x2) : s
X1 = y
X2 = y
Output Root = A
Figure2: Root finding by the linear interpolation (regulafalsi) method. The two initial guesses xa and xb
must bracket the root.
Let
=
If
Example
Find all real solutions of the equation
Solution
Let xa = 1 and xb = 2
Now rewriting the equation in the form:
2 =0
( )(
) ( )(
(
= 1.07
= (1.07) 2 = 0.689
Now, from the algorithm, fc 0, hence xc x, the exact solution.
Again, fafb = (-1)(-0.689) = 0.689 > 0
Therefore, the roots lie in the interval xc, xb
That is, (1.07, 2) (two roots)
F(x)
X2 x1
x
x0
Then,
tan
)=
Hence,
x =
And generally,
x
( )
( )
| < then go to 10
8. K = k+1
9. Go to step 5
10. Print The root is -----, xk+1
11. End
Here,
+2
+ 2.2 + 0.4 = 0
( )=
(
+2
+ 2.2 + 0.4
)=3
+ 4 + 2.2
FORMAT (F10.4)
WRITE (*,*) TYPE THE TOLERANCE VALUE
READ (*,6) S
FORMAT (F3.6)
WRITE (*,*) ITERATION X F(X)
K=0
50
10
100
15
Assignment
If S = 0.00005, manually find the root of the above example after 5 iterations.
+1=0
F(0) = 1 ( = +ve)
F(1) = -4 (= -ve)
Therefore, there is a root between 0 and 1, hence our initial guess x0, may be taken as 0 or 1
Example:
Evaluate a real root of
+ 2.1
+ 2.1
+ 13.1 + 22.2
+ 2.1
F (x) = f 3
+ 13.1 + 22.2
+ 24.2 + 13.1
= 11
= -11.1019
Iteration 2
X1 = -11.1019
F (x1) = f (-11.1019) = -0.2169
F (x1) = F (-11.1019) = 114.1906
Therefore,.
=
= - 11.1019
Iteration 3
X2 = -11.100001
F (x2) = F ( - 11.100001) = - 0.0001131
F (x2) = F (-11.100001) = 114.1101
Therefore,
= - 11.100001
= - 11.100001
)
)
.
= - 11.1000000
Now, correct to three decimal places, x2 = x3, and so, the real root is x = -11.1000.
Example 2
Set up a Newton-Raphson iteration for computing the square root x of a given positive
number c and apply it to c = 2
Solution
We have
F (x) =
= , hence
=0
(
)=2
( )
=
( )
)
2
=
= 1 2(
Therefore,
For c = 2, choosing x0 = 1, we obtain:
X1 = 1.500000, x2 = 1.416667, x3 = 1.414216, x4 = 1.414214,
Now, x4 is exact to 6 decimal places.
) = 0?
(
( ) = 0,and
The sign in this case will not change; the method hence breaks down. The method also fails
+ 1 = 0)
We obtain the Secant method from the Newton-Raphson method, replacing the
derivative F (x) by the difference quotient:
(
)=
) (
Geometrically, we intersect the x-axis at xk+1 with the secant of f (x) passing through Pk-1 and Pk
in the figure below.
y
Y = f(x)
Secant
Pk-1
Pk
x
S
xk
Xk-1
Xk+1
CHAPTER THREE
----------
For a given value of x, sin x can be evaluated by summing up the terms of the right hand
side. Similarly, cosx, ex ,etc can also be found from the following series;
=1
= 1+
+
!
---------!
+ --------
Example:
Solve sin (0.25) correct to five decimal places.
Solution;
3!
5!
7!
120
(0.25)
= 0.0026041
6
5040
(0.25)
= 0.0000081
120
(0.25)
= 0.0000000
5040
(correct to 6 D)
Therefore,
=
3!
5!
)+
) + ----------------------- (1)
( )
) + 3 (
) + (2)
Therefore,
(
)=
or
)=2
+ 3(2)( )(
Hence,
(
) = 2 or
)
!
( )
3!
( )
4!
In general,
( )
( )
!
)
!
)+
)
!
) + --------- (3)
+ ) = ( ) +
)
!
)
!
+ ---------- (4)
Some authors use x in the place of h in equation (4), so we get yet another form of Taylors
series;
(
+ )= ( )+
+ --------- (5)
)
!
+ ----------------- (6)
3. Binomial Series
Consider,
( ) = (1 + )
(
(
(
) = (1 + )
) = ( 1)(1 + )
) = ( 1)( 2)(1 + )
Now applying the above to the Maclaurins series, we obtain, noting that;
(0) = 1
(
(
(
0) =
0) =
0) =
( 1)
( 1)( 2)
So we obtain:
(1 + ) = 1 +
( 1)
2!
( 1)( 2)
3!
Solution:
( )=
(
)=
)=
)=
(
(0) = 1
0) = 1
0) = 1
0) = 1
( ) = (0) +
(0)
(0)
+
1!
2!
That is,
= 1
1!
2!
3!
+ ..
Therefore,
.
= 1 0.2 +
(0.2)
(0.2)
(0.2)
+
..
2
6
24
CHAPTER FOUR
INTERPOLATION
Suppose F(x) is a function whose value at certain points xo, x1, ,xn are known. The values are
f(x0), f(x1), , f(xn). Consider a point x different from xo, x1, ,xn . F(x) is not known.
We can find an approximate value of F(x) from the known values. This method of finding F(x)
from these known values is called interpolation. We say that w interpolate F(x) from f(x0), f(x1),
, f(xn
Linear Interpolation
Let x0, x1 be two points and f0, f1 be the function values at these two points respectively. Let x be
a point between x0 and x1. We are interested in interpolating F(x) from the values F(x0) and F(x1).
F0
F(x) =?
x0
F1
x1
( ) = ( )+
( )
(
1!
) + .
)(
Therefore,
(
)=
( )= ( )+
( )
(
1!
) +
)(
)=
(
(
be denoted by p
We thus get; ( ) =
+(
) =
Therefore,
( ) = (1 )
This is called the linear interpolation formula. Since x is a point between x0 and x1, p is a nonnegative fractional value, i.e. 0
Example
Consider the following table:
7
19
15
35
F0 =15
x0 =7
F(x) =?
X =10
= 7,
= 19
= 15,
= 35
F1 =35
x1 =19
10 7
19 7
3
12
= 0.25
Therefore,
1
Hence, ( ) = (1 )
= 1 0.25 = 0.75
Y = f(x)
P1(x)
F0
F1
x
X0
X1
Thus, by that idea, the linear Lagrange polynomial P1 is the sum P1= L0f0 + L1f1 with L0 , the
linear polynomial that is 1 at x0 and 0 at x1 .
Similarly, L1 is 0 at x0 and 1 at x1.
Therefore,
( )=
( )=
Example 1
Compute ln 5.3 from ln 5.0 = 1.6094, ln 5.7 = 1.7405 by linear Lagrange interpolation and
determine the error from ln 5.3 = 1.6677.
Solution;
= 5.0
= 5.7
= ln 5.0
= ln 5.7
Therefore.
(5.3) =
5.3 5.7
0.4
=
= 0.57
5.0 5.7
0.7
(5.3) =
Hence,
ln 5.3 =
(5.3)
(5.3)
This interpolation of given (x0 ,f0), (x1 , f1), (x2 , f2) by a second degree polynomial P2(x), which
by Lagranges idea, is:
( )=
( )
( )
( )
With,
( ) = 1,
( )=
( ) = 1,
( ) = 1 and
(
( )
=
( ) (
)( )
)( )
( )=
(
( )
=
( ) (
)( )
)( )
( )=
(
( )
=
( ) (
)( )
)( )
=0
; and the
=
Example 2
Compute ln 5.3 by using the quadratic Lagrange interpolation, using the data of example 1
and ln 7.2 = 1.9741. Compute the error and compare the accuracy with the linear Lagrange
case.
Solution:
(5.3) =
(
=(
(
(
. )(
. )
. )(
. )
(5.3) =
(
(
)( )
(5.3 5.7)(5.3 7.2)
=
)( ) (5.0 5.7)(5.0 7.2)
.
.
= 0.4935
)( )
(5.3 5.0)(5.3 7.2)
=
)( ) (5.7 5.0)(5.7 7.2)
(5.3) =
(0.3)(1.9) 0.57
=
= 0.5429
(0.7)(1.5) 1.05
(
(
)( )
(5.3 5.0)(5.3 5.7)
=
)( ) (7.2 5.0)(7.2 5.7)
(0.3)(0.4) 0.12
=
= 0.03636
(2.2)(1.5)
3.3
Therefore,
(5.3)
ln 5.3 =
(5.3)
(5.3)
( )
( )=
( )
Where,
(
)=1
( )
( )
CHAPTER FIVE
INTRODUCTION TO FINITE DIFFERENCES
Consider a function: ( ) =
+6
-6
-12
-6
2
-10
16
42
-4
-8
4
2
6
6
8
14
20
36
Therefore,
=6
=6 +
=3
=
..
Hence,
+6
Therefore, 2 = 1 + +
At
+ 6,
--------------------------- (1)
= 2, ( ) = 6
Hence,
6 = 8 + (4) + 2 + 6 --------------------------------- (2)
We then solve simultaneously for the other constants.
The first forward difference is generally taken as an approximation for the first difference, i.e.
Similarly,
column.
Now,
Let
)=
= = interval,
Then,
(
)=
Now, from the Taylors series expansion, let us on this occasion consider the expansion about a
point
=
:
+
( )
( )
+ . ------------------------------ (1)
by
( )
Hence,
=
( )
( )
!
( )
!
+ . ------------------------------ (2)
From equations one and two, three different expressions that approximate
( )
can be derived.
The first is from equation (1), considering the first two terms:
Therefore,
Hence,
( )
( )
2!
( )
( )
!
The quantity,
( )
!
------------------------------------------ (3)
The second of the expressions is from equation (2), considering the first two terms:
Therefore,
Hence,
( )
( )
( )
2!
( )
( )
!
( )
!
--------------------------------------------- (4)
The third expression is obtained by subtracting equation (2) from equation (1), we then have:
( )
( )
+2
3!
( )
( )
= 2
( )
+ 2
3!
Hence,
= 2
( )
( )
3!
Therefore,
( )
( )
3!
So,
( )
( )
The quantity,
- ------------------------------------------------- (5)
( )
( )
( )
can be obtained:
-------------------------------------------- (6)
2
The error in this approximation, also known as the second difference of , is about
(4)
12
It is obvious that the second difference approximation is far better that the first difference.
Example:
The following is copied from the tabulation of a second degree polynomial ( ) at values of x
from 1 to 12 inclusive.
2, 2,?,8, 14, 22, 32, 46, ?, 74, 92, 112
The entries marked ?were illegible and in addition, one error was made in transcription.
Complete and correct the table.
Solution:
( )
S/N
1
14
22
32
46
?
74
11
92
12
112
?
2
8
10
14
10
?
18
20
2
4
?
the
) should be
CHAPTER SIX
SIMULTANEOUS LINEAR EQUATIONS
Consider a set of N simultaneous linear equations in N variables (unknowns),
, = 1,2, . .
+ +
+ +
+ +
(1)
+ +
+ +
+ +
=
,
,..,
Cases 1
A square matrix is called a diagonal matrix if the diagonal entries alone are non-zeros. Suppose
the coefficient matrix is a diagonal matrix, i.e. the coefficient matrix is of the form:
0 0 . .0
0
00
0 0 0 . .
,,
Case 2
A matrix is said to be lower triangular if all its upper diagonal entries are zeros.
Suppose the coefficient matrix is a lower diagonal matrix, i.e. it is of the following form:
0
0 .0
0. 0
+ +
=
Substituting
=
Also, doing the same for
:n
=
,.,
Case 3
Suppose the coefficient is upper triangular. Then, the equations will be of the following form;
+
0
+ .+
+ .+
,
=
..
1
=(
thus:
, we evaluate
,
as:
.
A=
Operation 1
Multiplying each element of a row by a constant:
(read as
becomes
).
Operation 2
Multiplying one row by a constant and subtracting it from another row, i.e.
. We write
.
can be replaced by
Operation 3
Two rows can be exchanged: If
A= 0
0
..
0
an2
an3..ann
| |=
..
..
..
Pivotal Condensation
Consider a matrix,
A =
.
an1
..
..
.
....
an2 an3 ..ann
, for i = 2,3,4,n
Then the lower diagonal entries of the first column will become zero. Note that these operations
not affect the determinant value of A.
In the above operation,
, that is:
A = 0
0
..
0
an2
an3..ann
| |=
..
..
..
Now, we can once again repeat the above procedure on the reduced matrix to get determinant:
| |=
A was a
matrix. In the first step, we condensed it into a ( 1) ( 1) matrix. Now, it
has further been condensed into( 2) ( 2) matrix. Repeating the above procedure, we can
condense the matrix into1 1. So, determinant, =
.
.
..
.
Algorithm Development
Let A be the given matrix,
1. Do the row operation
(for = 2,3,4 . )
This makes all the lower diagonal entries of the first column zero.
2. Do the row operation
(for = 3,4 . )
This also makes all the lower diagonal entries of the second column zero.
3. Do the row operation
(for = 4,5 . )
This makes all the lower diagonal entries of the third column zero.
In general, in order to make the lower diagonal entries of the
4. Do the row operation,
for =
column zero,
+ 1, + 2 . )
,,
Notice that the following segment will do the required row operation:
=
For = 1
=
column zero.
=1
3.
=1
4.
5.
6.
7.
=1
8.
1
+1
+1
9.
10.
=1
=
11.
12.
13.
14.
=1
15.
=1
16.
17.
18.
19.
.
20.
Practice Questions
1. Write a FORTRAN program to implement the pivotal condensation method, to find the
determinant of any matrix of order n.
2. Find the determinant of :
-1.4
4.3
1.2
4.6
+ +
+ +
++
This can be in matrix form and solved using the row operation which was done for the pivotal
condensation method.
The algorithm consists of three major steps thus:
(i)
(ii)
(iii)
Algorithm:
Read Matrix A.
1. Read
2.
=1
3.
=1
+1
4.
5. Next j
6.
Reduce to upper Triangular
7.
=1
8.
9.
1
+1
=1
10.
=
11.
+1
12. Next j
13.
14.
Backward Substitution
,
15.
16.
=
17.
19.
18.
+1
20. Next j
=
21.
22.
Print Answer
23.
=1
24.
25.
26.
Example:
Solve the following system of equations by the Gauss elimination method:
+
+2
+
+
+
+2
2
1
2
= 2
+
= 3
=0
= 3.5
0.5 1 3.5
-1 2 0
1 -2
-3 1 2
1 -3
-1 0 0
2 0
In order to make zero, the lower diagonal entries of the first column, do the following operations
+3
1 1 0.5 1 3.5
0.5 2 1.5
0 4 3.5 4 7.5
0 1 0.5 3 3.5
4
3
1 1 0.5
1
3.5
0.5
2
1.5
0 0 2.833 1.33 5.5
0 0 0.66 2.33 3
Now, doing:
0.66
2.33
1 1 0.5
1
3.5
0.5
2
1.5
0 0 2.833 1.33
5.5
0 0 0
2.0196 1.70588
+ 1.33
+2
2.0196
2.833
= 1.544
1
+ (1.544) + 2(0.84466) = 1.5
2
= 0.3204
,
values:
= 2.2039
CHAPTER SEVEN
DIFFERENTIAL EQUATIONS
The following are some differential equations:
+ (1
If
( )
=(
+ )
=(
1)
Example:
Consider the differential equation:
= 6 +4
+2
+2
1
1 is a solution to the differential
equation.
Numerical Solutions
Consider the equation:
A solution is
=6 +4
+2
we can find the numerical values of y for various pivotal values of x. The solution from
0
0.2
0.4
0.6
0.8
1.0
0.912
0.616
0.064
0.792
2.0
+2
= ( , ); ( ) =
value at
. The solution
is
=
=?
+
=?
=?
=?
Eulers Method
Consider the initial value problem:
= ( , );
( )=
+ ) denotes
( )denotes
value at
+ ) = ( ) +
value at
1!
( )+
+ , e.t.c.
Given;
( )=
2!
( ) +
+ ) = ( ) =
(say)
( )=
= ( , )
But,
( )= ( ,
Now, let
( )= ( ,
)=
( )=
In general,
= +
, where
= ( ,
1.
,
2.
3.
, ,
=0
4.
5.
+ ( , )
6.
7.
8.
Assignment: Implement the above in any programming language (FORTRAN of BASIC)
Example:
Solve the initial value problem:
; (1) = 0.8;
= 1(0.5)3
Solution:
Given: ( , ) =
= 0.8
=1
=
But
But
But
But
= 0.8, = 0.5, = 1
=?
=2
3
=?
= 2.5
=?
=3
= 14.287635
= 2.5
= 119.48088
=3
+
= ( ,
+
= ( ,
Therefore,
=
= 1,
=?
= 1.5
= ( ,
Therefore,
=
Therefore,
=
+
= ( ,
Therefore,
= 1.62
= 1.5
= 4.0572
=2
0.3,
=3
; (0) = 1
= 0.1
Where,
; (0) = 1; = 0(0.2)0.4
Solution:
( , )=2
= 0,
= 1, = 0.2
+ (2
Therefore,
=
Hence,
=
(1 2
OR
=
=1
=0
=?
= 0.2
(1 2
=?
= 0.4
(1 2
1
= 1.0032102
(
1 2 0.2)(0.2)
1.0032102
= 1.0295671
1 2(0.2)(0.4)
= 1 in the formula:
Put
(1 2
=1
=0
= 1.0032102
= 0.2
= 1.0295671
= 0.4
Euler-Richardsons Method
The formula is written as
=
Where
= ( ,
=
Also,
+ ;
+2
Algorithm
( , )
, , ,
=0
1
1.
2.
3.
4.
5.
6.
7.
( ,
( ,
)+2 (
8.
9.
10. End
= (1 + )
Hence,
Note: Let
= 0,
=
(0) = 1;
= 1, = 0.1,
and
= 0(0.1)0.6
=6
15
+ ) =
( )
+
1!
1!
2!
( )
+
2!
( ,
Where,
( , )
=
(
)=
1!
2!
( )=
+1
(0) = 1.5
= 0(0.2)0.8
Here,
=4
+1
=4
+1
= 12
= 12
= 24
( )
= 24
( )
=0
= 24
( )
( )
= 24
=0
+ 1) +
(12
2
)+
(24 ) + (24)
6
24
+ 0.8
+ 0.2 + 0.24
+ 0.052
+ 0.0016
,
( )=
+ ) = ( ) + (
+ )
<1
+ , (
+ )
,
2
= (
,
2
)
+
Therefore,
=
+,
,
2
)
+
+2
Therefore,
=
1
+ (
6
+4
= (
,
2
,
2
= (
+,
1
+ (
6
+2
+3
2
)
Therefore,
=
Example
Solve the initial value problem value using the Runge Kutta second order method.
= (1 +
(0) = 1 ;
= 0(0.2)0.6
Solution:
( , ) = (1 +
=1
=0
) ;
=?
= 0.2
= 0,
= 1, = 0.2
=?
= 0.4
=?
= 0.6
To find
= (
, ) = 0.2(1 +
= 0.2(1)(1) = 0.2
=
,
2
Therefore,
=
1 + 0.2222
= 1.2222
To find
:
= (
) = 0.2(1 +
= 0.2(1 + 0.04)(1.2222)
= 0.2542222
=
,
2
= 0.2941546
Then,
To find
= (
) = 0.2(1 +
= 0.2(1 + 0.16)(1.5163768)
= 0.3517994
=
,
2
= (0.5, 1.6922785)
= 0.4230691
Then,
= 1.5163768 + 0.4230691
= 1.9394459
Assignment
Solve the problem given below, using the Runge Kutta fourth order method:
= (1 +
(0) = 1 ;
= 0(0.2)0.6
CHAPTER EIGHT
NUMERICAL INTEGRATION
Methods:
1. Trapezoidal Formula
( )
+
2
= ( ),
+.
( = 0,1,2, . . , )
=
2. Simpsons Formula (Parabola formula)
( )
[
3
+ 2(
) + 4(
+ .
+ .+
( )
3
[
8
+ .+
+ 2(
)+
+ .
)]
, =
) + 3(
)]
Example 1
Evaluate the integral, employing the trapezoidal rule, for n = 10
Solution:
Form a table of the integrand function
0.0
1.0000
0.1
0.01
0.9900
0.2
0.04
0.9608
0.3
0.09
0.9139
0.4
0.16
0.8521
0.5
0.25
0.7755
0.6
0.36
0.6977
0.7
0.49
0.6125
0.8
0.64
0.5273
0.9
0.81
0.4449
10
1.0
1.00
0.3679
We note that : (
)+
( )
+
2
= 7.4620
Therefore,
=
+.
Example 2
Compute the integral;
Solution:
Form a table of the function:
Values of
= 0, 10
0
0.00
0.1
0.01
0.2
0.04
0.3
0.09
0.4
0.16
0.5
0.25
0.6
0.36
0.7
0.49
0.8
0.64
0.9
0.81
10
1.0
1.00
1.0000
1.0101
1.0408
1.0942
1.1735
1.2840
1.4333
1.6323
1.8965
2.2479
2.7183
3.7183
5.5441
1
[(3.7183) + 2(5.5441) + 4(7.2685)]
30
= 1.46268 1.4627
7.2685
Example 3
Compute the integral, using the Newtons formula for h = 0.1
.
1+
Solution:
If = 0.1
=6
= 0, = 6
=
=3
= 1,2,4,5
1.00
1.0000
0.1
1.10
0.9091
0.2
1.20
0.8333
0.3
1.30
0.4
1.40
0.7143
0.5
1.50
0.6667
0.6
1.60
0.7692
0.6250
1.6250
0.7692
3.1234
( )
3
[
8
+ .+
1+
+ 2(
)+
+ .
) + 3(
)]
3
0.1 (1.6250 + 1.5384 + 9.3702) 0.47001
8
Bibliography
1. Erwin Kreyszig (1993) Advanced Engineering Mathematics.
New York: John Wiley & Sons Inc. Seventh Edition
2. Riley, K.F., Hobson, M.P. and Bence, S.J. (1999). Mathematical Methods for Physics
And Engineering. Cambridge: University Press. Low Price Edition.
3. Xavier, C.(1985): FORTRAN 77 and Numerical Methods.