This action might not be possible to undo. Are you sure you want to continue?
CHAPTER 3
NUMERICAL METHODS
Roots of Nonlinear equations
Interpolation (In 2Dimension)
Numerical Integration
Numerical Solution of Differential Equations
2
3.1 Roots of Nonlinear
Equations
Let say we want to find the solution of
f (x) = 0. For example:
These equations can not be solved directly.
0 sin 2 )
, 0 1 )
= ÷
= ÷
x x b
xe a
x
We need numerical methods to compute
the approximate solutions.
3
3.1.1 Iteration Methods
Let x
0
be an initial value that is close to the
solution of f (x) = 0. From f (x) = 0, another
equation is produced such that we can use x
0
to
compute x
1
.
This step is repeated to obtain values of
x
2
, x
3
,...This method is called I teration Method.
We hope that every new x
i
converges to the
solution of f (x) = 0.
4
3.1.2 Fixed Point Iteration
method
Step
1. Write f (x) = 0 in the form x = F (x).
2. Formula
3. Choose initial value/root (or given) to find
4. Similarly, we will obtain x
2
, x
3
, … and so on.
) (
1 i i
x F x =
+
0
x
1
x
5
Fixed point iteration is of the form
) (
), (
), (
), (
1
2 3
1 2
0 1
i i
x F x
x F x
x F x
x F x
=
=
=
=
+
6
Note that F (x) is not unique.
For instance, see the following.
Example 3.1
Find the solution for
3
1
1 3
0 1 3 )
0 1 3 ) (
3
3
3
3
÷
= ¬
÷ = ¬
= ÷ ÷
= ÷ ÷ =
x
x
x x
x x i
x x x f LET
0 1 3
3
= ÷ ÷ x x
7
more. many and
1 3
1 3
0 1 3 )
3
1
1 ) 3 (
1 3
0 1 3 )
2
3
3
2
2
3
3
x
x
x
x x
x x iii
x
x
x x
x x
x x ii
+
= ¬
+ = ¬
= ÷ ÷
÷
= ¬
= ÷ ¬
= ÷ ¬
= ÷ ÷
( )3
1
3
3
1 3
1 3
0 1 3 )
+ = ¬
+ = ¬
= ÷ ÷
x x
x x
x x iv
8
We shall use these forms (x = F (x)) in our next
example, denoted by
( ) ) ( 1 3 )
) (
1 3
)
) (
3
1
)
) (
3
1
)
4
3
1
3
2
2
2
1
3
x F x x iv
x F
x
x
x iii
x F
x
x ii
x F
x
x i
= + =
=
+
=
=
÷
=
=
÷
=
Choose the suitable form to apply Fixed Point
Iteration method
9
converge. possibly could iteration the such that
) ( 1 ) ( '
OR
1 ) ( ' 1
condition the satisfies that
value initial the choose must We
0
0
0
criteria Convergent x F
x F
x
<
< < ÷
10
Stopping Criteria
( ) 0 2.
or
. (succeeds) converges iteration This
.  1  – xi xi   – xi 1 xi  when iteration Stop . 1
~
< +
i
x f
11
Example 3.2
Find the solution for using
Fixed Point Iteration method with initial value
0 1 3
3
= ÷ ÷ x x
9 . 0
0
= x
( ) ) ( 1 3 )
) (
1 3
)
) (
3
1
)
) (
3
1
)
) ( for form previous Use
4
3
1
3
2
2
2
1
3
x F x x iv
x F
x
x
x iii
x F
x
x ii
x F
x
x i
x F
= + =
=
+
=
=
÷
=
=
÷
=
12
Solution
3
1
) (
formula Thus,
iteration. the proceed may We
. convergent is value initial with this iteration the and
satisfied is 1 ) ( ' 1 Condition
. 1 81 . 0 ) ( ' have we , 9 . 0 For
) ( '
3
1
) ( i)
criteria convergent for TEST
, 0 1 3 For
3
1
0
0 1 0
2
1
3
1
3
÷
= =
< < ÷
< = =
= ¬
÷
=
= ÷ ÷
+
i
i i
x
x F x
x F
x F x
x x F
x
x F
x x
13
9 . 0 ,
3
1
) (
0
3
1
=
÷
= =
+
x
x
x F x
i
i i
Stop iteration since
Take
( ) 000000 . 0 000001 . 0
7
~ = x f
) ( 347296 . 0
7
solution final x ÷ =
i Xi f(xi)
0 0.9 2.971000
1 0.090333 0.729737
2 0.333579 0.036382
3 0.345706 0.004197
4 0.347105 0.000504
5 0.347273 0.000061
6 0.347294 0.000007
7 0.347296 0.000001
14
converge. possibly could it since examined, be can
value initial with this iteration the Therefore,
. 1 ) ( ' 1 condition satisfies
that 38 . 0 ) ( ' have we , 9 . 0 For
) 3 (
2
) ( '
3
1
) ( ii)
0
0 2 0
2 2
2
2
2
< < ÷
÷ ~ =
÷
÷ = ¬
÷
=
x F
x F x
x
x
x F
x
x F
3
1
) (
formula Thus,
2
1
÷
= =
+
i
i i
x
x F x
i Xi f(xi)
0 0.9 2.971000
1 0.456621 0.274656
2 0.358231 0.028721
3 0.348229 0.002460
4 0.347375 0.000207
5 0.347303 0.000017
6 0.347296 0.000001
15
Stop iteration since
Take
( ) 000000 . 0 000001 . 0
6
~ = x f
) ( 347296 . 0
6
solution final x ÷ =
16
that see we proceed, we IF
proceed. not Do
diverges. value initial with this iteration the Thus,
satisfied. not is 1 ) ( ' 1 Condition
. 1 45 . 6 ) ( ' have we , 9 . 0 At
2 3
) ( '
1 3
) ( iii)
0
0 3 0
3
3
2
3
< < ÷
÷ < ÷ ~ =
+
÷ = ¬
+
=
x F
x F x
x
x
x F
x
x
x F
17
We have x
i+1
– x
i
 >  x
i
– x
i1
. This shows
that this iteration diverges (Iteration fails).
0.9. Take ,
1 3 1 3
0
2
1
2
=
+
= ¬
+
=
+
x
x
x
x
x
x
x
i
i
i
i Xi f(xi)
0 0.9 2.971
1 4.567901 80.609
2 0.704682 2.764
3 6.271024 226.800
4 0.503819 2.384
5 9.894097 937.882
6 0.313426 1.909
7 19.751190 7644.874
8 0.154453 1.460
9 61.342061 230635.854
10 0.049172 1.147
11 474.597717 106898385.541
12 0.006326 1.019
18
( ) ( )
( )3
1
1
0
0 1 0
3
2
4
3
1
4
1 3 ) (
formula Thus,
iteration. the proceed may We
. convergent is value initial with this iteration the and
satisfied is 1 ) ( ' 1 Condition
. 1 418 . 0 ) ( ' have we , 9 . 0 For
1 3 ) ( ' 1 3 ) ( iv)
criteria convergent for TEST
+ = =
< < ÷
< = =
+ = ¬ + =
+
÷
i i i
x x F x
x F
x F x
x x F x x F
19
Stop iteration since
Take
( ) 0 000001 . 0
13
~ = x f
) ( 879385 . 1
13
solution final x =
i Xi f(xi)
0 0.9 2.971000
1 1.546680 1.940041
2 1.780030 0.700050
3 1.850824 0.212381
4 1.871264 0.061320
5 1.877083 0.017457
6 1.878733 0.004950
7 1.879201 0.001402
8 1.879333 0.000397
9 1.879370 0.000112
10 1.879381 0.000032
11 1.879384 0.000009
12 1.879385 0.000003
13 1.879385 0.000001
20
879385 . 1 & 347296 . 0 ÷ ~ x
( )
0
000001 . 0
1 ) 347296 . 0 ( 3 ) 347296 . 0 (
3
6
~
÷ ~
÷ ÷ ÷ ÷ ~ x f
is 0 1 3
3
= ÷ ÷ x x
REMARK
From the convergent iteration, we conclude
that two of the solutions
CHECK :
( )
0
000001 . 0
1 ) 879385 . 1 ( 3 ) 879385 . 1 (
3
13
~
÷ ~
÷ ÷ ~ x f
21
EXERCISE 1
Find the solution for using
Fixed Point Iteration method with initial value
0 2 4
3
= ÷ ÷ x x
8 . 0
0
= x
( )
) (
2 4
)
) (
4
2
)
) ( 2 4 )
3
2
2
3
1
3
1
x F
x
x
x iii
x F
x
x ii
x F x x i
given Use
=
+
=
=
÷
=
= + =
22
3.1.3 NewtonRaphson Method
Tangent line of f (x) is f ′(x). This is the basic of
NewtonRaphson Method described below.
f (x)
x
x
0
x
1
x
2
O
f (x
0
)
f (x
1
)
f (x
2
)
Figure 3.2 NewtonRaphson Method
23
Gradient of the tangent line of f (x) at
(x
0
, f (x
0
)) is given by f ′(x
0
). If we continue
the tangent line at (x
0
, f (x
0
)) to (x
1
,0), then
the gradient of this tangent line can be
determined by
Equalizing these two values, we have
.
) ( 0
0 1
0
x x
x f
÷
÷
(4) .
) (
) (
or
) ( 0
) (
0
'
0
0 1
0 1
0
0
'
x f
x f
x x
x x
x f
x f
÷ =
÷
÷
=
24
This means that from the initial value x
0
, using
formula (4), we can compute x
1
which is close
to the solution of f (x) = 0.
Using the same formula, we can compute x
2
which is a better approximation to the solution
compare to x
1
.
We can also compute x
3
, x
4
, … and so on.
We hope that our iteration converges to the
solution of f (x) = 0.
25
In general, NewtonRaphson method can be
formulated as
.
) (
) (
'
1
i
i
i i
x f
x f
x x ÷ =
+
26
Example 3.4
using Newton Raphson method
using Newton raphson method
3
Solve 3 1 0 inthe interval [3,2] x x ÷ ÷ =
Solution
1. Write formula
2. Let
3. Contruct sign table & choose
4. Condition
.
) (
) (
'
1
i
i
i i
x f
x f
x x ÷ =
+
3 3 ) ( ' 1 3 ) (
2 3
÷ = ¬ ÷ ÷ = x x f x x x f
0
x
0 ) ( ' = x f
Sign Table
27
x(i) f(xi) sign f(xi) Sub interval
3 19  f'(3)=24
2 3 
[2,1]
f'(2)=9
1 1 +
[1,0]
f'(1)=0
0 1 
f'(0)=3
1 3 
[1,2]
f'(1)=0
2 1 + f'(2)=9
1
st
Interval [2,1], which one ?
IF Newton Raphson
can’t be applied
But if
So choose for interval [2,1].
( ) 0 3 1 3 3 3 ) ( ' , 1
2 2
0 0 0
= ÷ ÷ = ÷ = ÷ = x x f x
0
x
( ) 0 9 3 2 3 3 3 ) ( ' , 2
2 2
0 0 0
= = ÷ ÷ = ÷ = ÷ = x x f x
2
0
÷ = x
So, we have 3 possibly we have 3 different
answer.
28
2
nd
Interval [1,0]
IF
But if
So choose for interval [2,1].
( ) 0 3 1 3 3 3 ) ( ' , 1
2 2
0 0 0
= ÷ ÷ = ÷ = ÷ = x x f x
( ) 0 3 3 0 3 3 3 ) ( ' , 0
2 2
0 0 0
= ÷ = ÷ = ÷ = = x x f x
0
0
= x
( ) 0 3 1 3 3 3 ) ( ' , 1
2 2
0 0 0
= ÷ = ÷ = = x x f x
( ) 0 9 3 2 3 3 3 ) ( ' , 2
2 2
0 0 0
= = ÷ = ÷ = = x x f x
2
0
= x
3
rd
Interval [1,2]
IF
But if
So choose for interval [1,2].
2 , 0 , 2
0
÷ = x
29
x0=2 1
st
interval
i xi f(xi)= f'(xi)=
0 2 3 9
1 1.666667 0.629630 5.333333
2 1.548611 0.068040 4.194589
3 1.532390 0.001218 4.044659
4 1.532089 0.000000 4.041890
Stop iteration since f(x4)=0
Root 1.532089
1 3
3
÷ ÷
i i
x x
.
) (
) (
'
1
i
i
i i
x f
x f
x x ÷ =
+
3 3
2
÷
i
x
30
x0=0
2
nd
interval
i xi f(xi) f'(xi)
0 0 1 3
1 0.333333 0.037037 2.666667
2 0.347222 0.000196 2.638310
3 0.347296 0.000000 2.638156
Stop iteration since f(x3)=0
Root 0.347296
3 3 ) ( '
1 3 ) ( : Recall
2
3
÷ =
÷ ÷ =
i i
i i i
x x f
x x x f
31
x0=2
3
rd
interval
i xi f(xi) f'(xi)
0 2 1 9
1 1.888889 0.072702 7.703704
2 1.879452 0.000504 7.597015
3 1.879385 0.000000 7.596267
Stop iteration since f(x3)=0
Root 1.879385
3 3 ) ( '
1 3 ) ( : Recall
2
3
÷ =
÷ ÷ =
i i
i i i
x x f
x x x f
32
IMPORTANT!!!
NewtonRaphson method fails if the
approximate root of equation, for instance
x = x
0
, close to roots of f ′(x) = 0.
Therefore, we have to make sure that the
starting point x
0
does not give f ′(x
0
) close
to zero.
The reason is that dividing a number by a
value close to zero will give a number
with large absolute value.
33
3.1.4 Secant Method
This method is a revision of NewtonRaphson
method as described in the following figure.
f (x)
x
x
0
x
1
x
2
x
3
O
f (x
0
)
f (x
1
)
f (x
2
)
f (x
3
)
Figure 3.3 Secant Method
34
In this method, we begin with two initial values x
0
and x
1
. The straight line from (x
0
, f (x
0
)) to (x
1
,f (x
1
))
is continued to the xaxis.
Let x
2
be the value where this straight line intersects
the xaxis.
By equalizing gradient from (x
0
, f (x
0
)) to (x
1
, f (x
1
))
and gradient from (x
1
, f (x
1
)) to (x
2
,0), we obtain
35
Using the same formula, we compute x
3
, x
4
, ... and so
on.
We hope that x
i
converges to the solution of f (x) = 0.
.
) ( ) (
) ( or
) ( ) ( ) ( 0
0 1
0 1
1 1 2
0 1
0 1
1 2
1


.

\

÷
÷
÷ =
÷
÷
=
÷
÷
x f x f
x x
x f x x
x x
x f x f
x x
x f
36
In general, Secant method can be formulated as


.

\

÷
÷
÷ =
÷
÷
+
) ( ) (
) (
1
1
1
i i
i i
i i i
x f x f
x x
x f x x
. and Choose
1 0
x x
37
Example 3.5
using Secant method
3
Solve 3 1 0 inthe interval [3,2] x x ÷ ÷ =
Solution
1. Write formula
2. Let
3. Contruct sign table & choose
4. Start iteration with i=1
5. Then, i=2
1 3 ) (
3
÷ ÷ = x x x f
1 0
&x x


.

\

÷
÷
÷ =
÷
÷
+
) ( ) (
) (
1
1
1
i i
i i
i i i
x f x f
x x
x f x x


.

\

÷
÷
÷ =
) ( ) (
) (
0 1
0 1
1 1 2
x f x f
x x
x f x x


.

\

÷
÷
÷ =
) ( ) (
) (
1 2
1 2
2 2 3
x f x f
x x
x f x x
Sign Table
38
x(i) f(xi) sign f(xi) Sub interval
3 19  f'(3)=24
2 3 
[2,1]
f'(2)=9
1 1 +
[1,0]
f'(1)=0
0 1 
f'(0)=3
1 3 
[1,2]
f'(1)=0
2 1 + f'(2)=9
39
2) 2
nd
Interval [1,0]
1 , 2
1 0
÷ = ÷ = x x
3) 3
rd
Interval [1,2]
1) 1
st
Interval [2,1]
0 , 1
1 0
= ÷ = x x
2 , 1
1 0
= = x x
40
x0=2 x1=1 1
st
interval
i xi f(xi)=
0 2 3
1 1 1
2 1.250000 0.796875
3 2.230769 5.408739
4 1.375942 0.522869
5 1.451295 0.297084
6 1.550443 0.075740
7 1.530301 0.007212
8 1.532052 0.000149
9 1.532089 0.000000
Stop iteration since f(x9)=0.000000
Root 1.532089
1 3
3
÷ ÷
i i
x x


.

\

÷
÷
÷ =
÷
÷
+
) ( ) (
) (
1
1
1
i i
i i
i i i
x f x f
x x
x f x x
41
x0=1 x1=0 2
nd
interval
i xi f(xi)
0 1 1
1 0 1
2 0.500000 0.375000
3 0.363636 0.042825
4 0.346056 0.003274
5 0.347305 0.000022
6 0.347296 0.000000
Stop iteration since f(x6)=0.000000
Root 0.347296
1 3 ) (
: Recall
3
÷ ÷ =
i i i
x x x f


.

\

÷
÷
÷ =
÷
÷
+
) ( ) (
) (
1
1
1
i i
i i
i i i
x f x f
x x
x f x x
42
x0=1 x1=2 3
rd
interval
i xi f(xi)
0 1 3
1 2 1
2 1.750000 0.890625
3 1.867769 0.087484
4 1.880597 0.009212
5 1.879375 0.000080
6 1.879385 0.000000
Stop iteration since f(x6)=0
Root 1.879385
1 3 ) (
: Recall
3
÷ ÷ =
i i i
x x x f


.

\

÷
÷
÷ =
÷
÷
+
) ( ) (
) (
1
1
1
i i
i i
i i i
x f x f
x x
x f x x
43
From the table, notice that:
* Iteration x
i
converges to x ~  0.347296.
* Values in column f (x
i
) go to zero.
(Remark as in NewtonRaphson method)
If f (x
i
) is farer from zero than f (x
i 1
), then the
iteration fails. This means that we made a
mistake in estimating x
i
using this iteration.
44
3.1.5 How to choose initial values?
Besides conditions of the method we use, we
may also see sign of f (x) for the tested x.
For instance, see values of f (x) = x
3
– 3x – 1
used in our previous example.
We can make the following sign table:
45
x f (x)
Sign f (x) Remark
5 111 ve
The sign changes
3 51 ve
2 3 ve *
1 1 +ve *
0 1 ve *
1 3 ve *
2 1 +ve *
46
From the sign table, we know that the
solution of f (x) = 0 is clearly in between
x = 2 and x = 1,
x = 1 and x = 0,
and x = 1 and x = 2.
If we use Secant Method, we may choose
the following
x
0
= 2 and x
1
= 1,
or x
0
= 1 and x
1
= 0,
or x
0
= 1 and x
1
= 2.
47
If we use NewtonRaphson Method, we focus
on the first derivative of f (x) = x
3
– 3x – 1,
i.e. f ′(x
0
) = 3x
2
– 3.
We may not choose x
0
= 1 or x
0
= 1, since this
gives f ′(x
0
) = 0.
But, from the sign table, we may choose x
0
= 2
or x
0
= 0 or x
0
= 2 as long as f ′(x
0
) is not too
close to zero.
If we use Fixed Point Method, we can
choose x
0
that satisfies
. 1 ) ( 1 or 1 ) (
0
'
0
'
< < ÷ < x F x F
48
3.2 Interpolation (In 2dimension)
The meaning of interpolation in 2dimension is
to define a curve that passes through given data
points. As an example, see the following:
Figure 3.4 Points interpolation
x
x
x
x
x
49
3.2.1 Interpolation Polynomial
unique. and exists , , for
system the of solution that the implies This
equations. t independen and
consistent of number ) 1 ( of system a build to
of values different with , , 1, , 0 ), , (
points ) 1 ( need we , , , find To
s. coeficient unknown are , , where
,
: polynomial following he Consider t
1 0
1 0
1 0
2
2 1 0
n
k k
n
n
n
n
C C C
n
x n k y x
n C C C
C C C
x C x C x C C y
+
=
+
+ + + + =
50
Given the data points (0,2), (1,3) and (3,3), what
is the unique polynomial that passes through the
data points?
Solution
Since we are given three different points, then
we can only find unique value for three
coefficients: C
0
, C
1
and C
2
. Then, our
interpolation polynomial is quadratic:
y = C
0
+ C
1
x + C
2
x
2
.
Example 3.6
51
If we substitute the given data points (0,2), (1,3) and
(3,3) to the polynomial, we get the following three
equations:
2 = C
0
3 = C
0
+ C
1
+ C
2
3 = C
0
+ 3C
1
+ 9C
2
.
This is a system of linear equations. The solution is
.
3
1
,
3
4
, 2
2 1 0
÷ = = = C C C
52
Thus, the unique interpolation polynomial that
passes through the given data points is
.
3
1
3
4
2
2
x x y ÷ + =
53
Theorem 3.1 (Interpolation polynomial)
. , , 1 , 0 , ) (
) (
,
), , ( , ), , ( ), , ( ) 1 (
1 1 0 0
n k y x P that such
n to equal or than less order of x P polynomial
unique a produce can we x of value dif f erent with
y x y x y x points data n Given
k k
n n
= =
+
54
There are many methods to find this unique
interpolation polynomial. In this part, we only
consider two methods: Lagrange Method and
Newton’s Divided Difference Interpolation.
55
3.2.2 Lagrange Method
.
) ( ) )( ( ) )( (
) ( ) )( ( ) )( (
) (
where
) ( ) ( ) ( ) (
is Method Lagrange by built polynomial ion Interpolat
). , ( , ), , ( ), , (
: points data following given the are say we Let
1 1 1 0
1 1 1 0
2 2 1 1 0 0
1 1 0 0
n i i i i i i i
n i i
i
n n
n n
x x x x x x x x x x
x x x x x x x x x x
x L
y x L y x L y x L y x L y
y x y x y x
÷ ÷ ÷ ÷ ÷
÷ ÷ ÷ ÷ ÷
=
+ + + + =
+ ÷
+ ÷
56
Given the data points (0,2), (1,3) and (3,3).
Apply Lagrange Method to find interpolation
polynomial passing through these points.
2 2 1 1 0 0
2 2 1 1 0 0
) ( ) ( ) (
by given is polynomial ion interpolat Lagrange Then,
(3,3). ) , ( dan (1,3) ) , ( (0,2), ) , ( Let
y x L y x L y x L y
y x y x y x
+ + =
= = =
Example 3.7
Solution
57
.
2
3
2
1
) 3 (
2
1
) 3 )(1 0 (1
) 3 )( 0 (
) )( (
) )( (
) (
. 1
3
4
3
1
) 3 1)( (
3
1
) 3 0 )( 1 0 (
) 3 1)( (
) )( (
) )( (
) (
where
2
2 1 0 1
2 0
1
2
2 0 1 0
2 1
0
x x x x
x x
x x x x
x x x x
x L
x x x x
x x
x x x x
x x x x
x L
+ ÷ = ÷ ÷ =
÷ ÷
÷ ÷
=
÷ ÷
÷ ÷
=
+ ÷ = ÷ ÷ =
÷ ÷
÷ ÷
=
÷ ÷
÷ ÷
=
58
.
3
1
3
4
2
) 3 (
6
1
6
1
) 3 (
2
3
2
1
) 2 ( 1
3
4
3
1
polynomial ion interpolat the
obtain we equation, s Lagrange' the to ) ( ng Substituti
.
6
1
6
1
1) (
6
1
) 1 3 )( 0 3 (
) 1 )( 0 (
) )( (
) )( (
) (
2
2 2 2
2
1 2 0 2
1 0
2
x x
x x x x x x y
x L
x x x x
x x
x x x x
x x x x
x L
i
÷ + =

.

\

÷ +

.

\

+ ÷ +

.

\

+ ÷ =
÷ = ÷ =
÷ ÷
÷ ÷
=
÷ ÷
÷ ÷
=
59
3.2.3 Newton’s Divided Difference
Interpolation
Lagrange method has the following weaknesses:
1) Lagrange Interpolation Polynomial is hard to find
if we have many data points.
2) If we want to add data, we have to restart our
computation from the beginning.
In this part, we discuss a method that can handle the
weaknesses of Lagrange Method, called Newton’s
Divided Difference Interpolation. Before that, we
first need to produce a table of divided difference.
60
3.2.3.1 Table of Divided Difference
3.5. Table
in listed formulas by the defined are on so and
three two, one, orders of difference divided The
)). ( , ( , )), ( , ( )), ( , (
: points following given the are we Suppose
1 1 0 0 n n
x f x x f x x f x
61
n
n n
x x
x x f x x f
÷
÷
÷
0
1 1 0
] , , [ ] , , [
2
2 1 1
] , [ ] , [
+
+ + +
÷
÷
i i
i i i i
x x
x x f x x f
Order Symbol Definition
0 f [x
i
] f (x
i
)
1 f [x
i
, x
i +1
]
2 f [x
i
, x
i +1
, x
i +2
]
3 f [x
i
, x
i +1
, x
i +2
, x
i +3
]
n f [x
0
, x
1
,…, x
n  1
, x
n
]
1
1
] [ ] [
+
+
÷
÷
i i
i i
x x
x f x f
3
3 2 1 2 1
] , , [ ] , , [
+
+ + + + +
÷
÷
i i
i i i i i i
x x
x x x f x x x f
Table 3.5 Orders of Divided Difference
62
x f (x)
x
0
f (x
0
)
x
1
f (x
1
)
x
2
f (x
2
)
x
3
f (x
3
)
Table 3.6 Divided Difference Formula
2
c
3
c
1
c
1 0
1 0
1 0
) ( ) (
] , [
x x
x f x f
x x f
÷
÷
=
2 0
2 1 1 0
2 1 0
] , [ ] , [
] , , [
x x
x x f x x f
x x x f
÷
÷
=
2 1
2 1
2 1
) ( ) (
] , [
x x
x f x f
x x f
÷
÷
=
3 0
3 2 1 2 1 0
3 2 1 0
] , , [ ] , , [
] , , , [
x x
x x x f x x x f
x x x x f
÷
÷
=
3 1
3 2 2 1
3 2 1
] , [ ] , [
] , , [
x x
x x f x x f
x x x f
÷
÷
=
3 2
3 2
3 2
) ( ) (
] , [
x x
x f x f
x x f
÷
÷
=
63
Based on Table 3.5, we can produce table of
divided difference as in Table 3.6.
Though Table 3.6 shows an estimation for four
data points, a similar way can be used for
different number of data points.
Example 3.8
Produce a table of divided difference for the
following data points:
(1,3), (2,0), (4,8), (3,÷8) and (÷2,17).
Solution
Table of divided difference for this data is
64
2
c
x f (x)
1 3
2 0 7/3
4 29/6
4 8 12 65/72
16 17/8
3 8 21/6
5
2 17
3
c
1
c
3
2 1
0 3
÷ =
÷
÷
4
c
65
3.2.3.2 Newton’s Divided Difference
Interpolation
]. , , , [ ) ( ) )( (
] , , [ ) )( (
] , [ ) (
) ( ) (
as written is polynomial ion interpolat difference
divided s Newton' , difference divided of definition the From
1 0 1 1 0
2 1 0 1 0
1 0 0
0
n n
x x x f x x x x x x
x x x f x x x x
x x f x x
x f x P y
÷
÷ ÷ ÷ +
+
÷ ÷ +
÷ +
= =
66
Example 3.9
Find interpolation polynomial that passes through
(0,2), (1,3) dan (3,3) using Newton’s divided
difference interpolation.
Solution
Table of divide difference for these three points is
x y
0 2
1
1 3
0
3 3
3
1
÷
2
c
1
c
67
.
3
1
3
4
2
3
1
) 1 )( 0 ( ) 1 )( 0 ( 2
] , , [ ) )( ( ] , [ ) ( ) ( ) (
2
2 1 0 1 0 1 0 0 0
by given is example for this polynomial
ion interpolat difference divided s Newton' the Thus,
x x
x x x
x x x f x x x x x x f x x x f x P y
÷ + =

.

\

÷ ÷ ÷ + ÷ + =
÷ ÷ + ÷ + = =
68
REMARKS
. 3
) 3 (
3
1
) 3 (
3
4
2 ) 3 ( , 3 when )
. 3
) 1 (
3
1
) 1 (
3
4
2 ) 1 ( , 1 when )
. 2 ) 0 ( , 0 when )
2
2
=
÷ + = =
=
÷ + = =
= =
P x iii
P x ii
P x i
69
3.3 Integral Solution Using
Numerical Methods
In this part, we discuss the following numerical
integration methods:
1) Rectangular Rule
2) Trapezoidal Rule
3) Simpson’s Rule
Before doing the approximation, we first have to
give the number of subintervals that we want to
consider and find the length of each subinterval.
70
3.3.1 Number of subintervals and
the length of each subinterval
We suppose that the interval from x = a to
x = b is divided into n number of subintervals,
where the length of each subinterval is
If x
0
= a and x
n
= b, then in general, x
i
= a + ih.
.
n
a b
h
÷
=
71
The positions of x
0
, x
1
, … ,x
n
are shown
in the following figure.
f (x)
x
y
     
x
0
x
1
x
2
x
3
x
n
h h
Figure 3.5 Number of subintervals
72
3.3.2 Rectangular Rule
In this method, we suppose that every subinterval forms
a rectangle, where the height of each subinterval is
Areas of all rectangles are computed.
Total area of these rectangles is the approximate area
below the curve of the function, which is also the
estimation of the integral that we want to determine.
). (
2
1
), (
1
* *
÷
+ =
i i i i
x x x x f
73
Figure 3.6 Rectangular Rule
f (x)
x
y
  
x
1
*
x
2
*
x
3
*
74
We have given the length of each subinterval
denoted by h.
If the height of the i
th
rectangle is
then the area of the i
th
rectangle is
Total area of all rectangles
), (
*
i
x f
). (
*
i
x f h
)]. ( ) ( ) ( [
) ( ) ( ) (
* *
2
*
1
* *
2
*
1
n
n
x f x f x f h
x f h x f h x f h
+ + + =
+ + + =
75
RECTANGULAR RULE
. ls subinterva of number the increase we
if accurate more be will ) ( of Estimation
: Note
). (
2
1
where
1
*
n
dx x f
x x x
b
a
i i i
}
÷
+ =
] ) ( ) ( ) ( [ ) (
* *
2
*
1 n
b
a
x f x f x f h dx x f + + + ~
}
76
Example 3.10
.
1
0
2
als subinterv ten using dx e Estimate
x
}
÷
. 747131 . 0
) 471308 . 7 ( 1 . 0 table, the from Thus,
0.1
10
0 1
is l subinterva
each of length then the 1, and 0 Given
1
0
2
~
~
=
÷
=
÷
=
= =
}
÷
dx e
n
a b
h
b a
x
Solution
77
i x
i
x
i
*
f (x
i
*
)
0 0  
1 0.1 0.05 0.997503
2 0.2 0.15 0.977751
3 0.3 0.25 0.939413
4 0.4 0.35 0.884706
5 0.5 0.45 0.816686
6 0.6 0.55 0.738968
7 0.7 0.65 0.655406
8 0.8 0.75 0.569783
9 0.9 0.85 0.485537
10 1 0.95 0.405555
TOTAL 7.471308
2
x
e
÷
=
78
3.3.3 Trapezoidal Rule
A revision of the Rectangular Rule.
While in the Rectangular Rule we make a rectangle
for each subinterval, in Trapezoidal Rule we make
a trapezoid for each subinterval.
Areas of all trapezoids are computed.
Total area of all trapezoids is the estimation of the
area below the curve of the function, which is also
the approximation of the integral of the function.
79
Figure 3.7 Trapezoidal Rule
f (x)
x
y
x
0
x
1
x
2
x
n
80
Thus,
If the length of each subinterval is h,
Height of the left hand side of the i
th
trapezoid =
Height of the right hand side of the i
th
trapezoid =
Then the area of the i
th
trapezoid is
), (
1 ÷ i
x f
), (
i
x f
)). ( ) ( (
2
1
1 ÷
+
i i
x f x f h
81
Total area of all trapezoids
. ) (
2
1
) ( ) ( ) ( ) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
) (
2
1
)) ( ) ( (
2
1
)) ( ) ( (
2
1
)) ( ) ( (
2
1
1 2 1 0
1
1 2 0 1
1
1 2 0 1
(
¸
(
¸
+ + + + + =
+ +
+ + + + =
+ +
+ + + + =
÷
÷
÷
n n
n n
n n
x f x f x f x f x f h
x hf x f h
x hf x f h x hf x f h
x f x f h
x f x f h x f x f h
82
TRAPEZOIDAL RULE
(
¸
(
¸
+ + + + + ~
÷
}
) (
2
1
) ( ) ( ) ( ) (
2
1
) (
1 2 1
b f x f x f x f a f h dx x f
n
b
a
where x
0
= a and x
n
= b
83
. interval in ) ( graph for the
minimum a ) ( and maximum a ) (
give which and Here,
). (
12
) (
) (
12
) (
: Rule l Trapezoida for bound Error
"
2
"
1
"
2 1
2
"
2
3
1
"
2
3
b x a x f
t f t f
b t a b t a
t f
n
a b
t f
n
a b
s s
s s s s
÷
÷ s s
÷
÷ c
84
Example 3.11
0.1
10
0 1
is l subinterva
each of length then the 1, and 0 Given
=
÷
=
= =
h
b a
.
1
0
2
}
÷
dx e estimate to
als subinterv ten with Rule l Trapezoida Use
x
Solution
85
i x
i
f (a) & f (b
)
f (x
i
) i=1,.,n÷1
0 0 1
1 0.1 0.990050
2 0.2 0.960789
3 0.3 0.913931
4 0.4 0.852144
5 0.5 0.778801
6 0.6 0.697676
7 0.7 0.612626
8 0.8 0.527292
9 0.9 0.444858
10 1 0.367879
TOTAL 1.367879 6.778167
2
x
e
÷
=
86
. ) 2 3 ( 4 ) (
) 1 2 ( 2 ) (
2 ) ( Then , ) ( Given
ation. differenti following the
do to need we bound, error the compute To
. 746211 . 0
) 778167 . 6 ( ) 367879 . 1 (
2
1
1 . 0
table the from Thus,
2
2
2 2
2
2 "'
2 "
'
1
0
x
x
x x
x
e x x x f
e x x f
xe x f e x f
dx e
÷
÷
÷ ÷
÷
÷ =
÷ =
÷ = =
~

.

\

+ ~
}
87
Figure 3.7 Trapezoidal Rule
x
f ª(x)
f ª(x)
O 1
below. described as 1 0
interval in increasing is ) ( graph that means This
. 1 0 interval in every for , 0 ) ( that Note
"
"'
< <
< < >
x
x f
x x x f
88
. ly respective , 2 ) 0 ( and 735759 . 0 ) 1 (
are 1 0 interval in ) (
of values minimum and maksimum the , So
735759 . 0 ) 1 ) 1 ( 2 ( 2 ) 1 (
and 2 ) 1 ) 0 ( 2 ( 2 ) 0 (
have we , ) 1 2 ( 2 ) ( From
1. 0 interval in maximum is ) 1 ( and
minimum is ) 0 ( , versus ) ( of graph the From
" "
"
1 2 "
0 2 "
2 "
"
" "
2
2
2
÷ = =
s s
= ÷ =
÷ = ÷ =
÷ =
s s
÷
÷
÷
f f
x x f
e f
e f
e x x f
x f
f x x f
x
89
. 001667 . 0 000614 . 0 or
) 2 (
) 10 ( 12
) 0 1 (
) 735759 . 0 (
) 10 ( 12
) 0 1 (
or
) (
12
) (
) (
12
) (
: Rule l Trapezoida of formula error the
to values minimum and maximum the ng substituti by
ion approximat this of bound error the estimate we Now
2
3
2
3
2
"
2
3
1
"
2
3
s s ÷
÷
÷
÷ s s
÷
÷
÷
÷ s s
÷
÷
c
c
c t f
n
a b
t f
n
a b
90
ion. approximat integral the to bound error the adding by
estimation our of accuration the increase can We
0.747878. 745597 . 0 or
0.001667 0.746211 000614 . 0 0.746211
interval following in the is result the Thus,
1
0
1
0
2
2
s s
+ s s ÷
}
}
÷
÷
dx e
dx e
x
x
91
3.3.4 Simpson’s Rule
Basic of Rectangular Rule Using constant to
estimate the area of each subinterval.
Basic of Trapezoidal Rule Using linear equation
to estimate the area of each subinterval.
Basic of Simpson’s Rule Using quadratic equation
to estimate the area of each subinterval.
92
. 2 or
2
and
gives This
. and between in is of value The
integrate. want to hat we function t in the
ls subinterva successive two define that points the be
)), ( , ( and )) ( , ( )), ( , ( Let
1 2 0
2 0
1
0 1 1 2
2 0 1
2 2 1 1 0 0
x x x
x x
x
h x x x x
x x x
x f x x f x x f x
= +
+
=
= ÷ = ÷
93
: figure following in the described as ), ( parabola
below area the is ) ( that know We
. )) ( , ( and )) ( , ( )), ( , (
es interpolat that parabola a be ) ( Let
2
0
2 2 1 1 0 0
2
x P
dx x P
x f x x f x x f x
c bx ax x P
x
x
}
+ + =
Figure 3.7 Simpson’s Rule
x
y
x
0
x
1
x
2
h h
P(x) = ax
2
+ bx + c
94
)). ( ) ( ) ( ) ( ( 2
)) ( ) ( ) ( ) ( ( 4
) ( ) ( (
3
) (
have we , and Taking
: follows as Rule s Simpson' formulate can we curve, a
below area estimate to parabola using of result the From
2 6 4 2
1 5 3 1
0
÷
÷
+ + + + +
+ + + + +
+ ~
= =
}
n
n
b
a
n
x f x f x f x f
x f x f x f x f
b f a f
h
dx x f
b x a x
95
ly respective , interval in ) ( of values
minimum and maximum the are ) ( and ) (
and , where
) (
180
) (
) (
180
) (
by given is Rule s Simpson' for bound error The
) 4 (
2
) 4 (
1
) 4 (
2 1
2
) 4 (
4
5
1
) 4 (
4
5
b x a x f
t f t f
b t a b t a
t f
n
a b
t f
n
a b
s s
s s s s
÷
÷ s s
÷
÷ c
96
. ) (
following the have Then we
. bound error with
) (
is Rule s Simpson' using
integral an of value e approximat that the Suppose
2 1
2 1
S
b
a
S
S S
b
a
E S dx x f E S
E E
S dx x f
+ s s +
s s
~
}
}
c
97
Example 3.12
integral. the compute to us help that will table a make We
. 1 . 0
10
0 1
interval each of length The
. 1 to 0 from respect to
with ) ( integrate want to We . ) ( Given
2
=
÷
= =
= =
=
÷
h
b a x
x f e x f
x
.
1
0
2
}
÷
dx e compute to
als subinterv ten with Rule s son' Apply Simp
x
Solution
98
i x
i
f (a) & f (b) f (x
odd
) f (x
even
)
0 0 1
1 0.1 0.990050
2 0.2 0.960789
3 0.3 0.913931
4 0.4 0.852144
5 0.5 0.778801
6 0.6 0.697676
7 0.7 0.612626
8 0.8 0.527292
9 0.9 0.444858
10 1 0.367879
TOTAL 1.367879 3.740266 3.037901
99
( )
. 1 0 interval in ) ( of values minimum and
maximum the find to need we bound, error the estimate To
. 746825 . 0
) 037901 . 3 ( 2 ) 740266 . 3 ( 4 367879 . 1
3
1 . 0
have we table, the From
) 4 (
1
0
2
s s
~
+ + ~
}
÷
x x f
dx e
x
100
. 0 ) 15 20 4 ( 8 ) (
write We
. 0 ) ( of solution the calculate to need we
), ( of points extrimum get To
. ) 15 20 4 ( 8 ) (
) 3 12 4 ( 4 ) (
2 ) (
have we , ) ( From
2
2
2
2
2
2 4 ) 5 (
) 5 (
) 4 (
2 4 ) 5 (
2 4 ) 4 (
'
= ÷ + ÷ =
=
÷ + ÷ = ¬
+ ÷ = ¬
÷ = ¬
=
÷
÷
÷
÷
÷
x
x
x
x
x
e x x x x f
x f
x f
e x x x x f
e x x x f
xe x f
e x f
101
. 357589 . 7 ) 1 (
and , 419481 . 7 ) 958572 . 0 (
, 12 ) 0 (
compute can we
, ) 3 12 4 ( 4 ) ( from Now,
958572 . 0 or 0 15 20 4 ii)
or , 0 or 0 8 i)
have only we
1 0 interval in then , 0 since but
tested, be can that factors three exists There
) 4 (
) 4 (
) 4 (
2 4 ) 4 (
2 4
2
2
÷ ~
÷ ~
=
+ ÷ =
~ = ÷ + ÷
= =
s s =
÷
÷
f
f
f
e x x x f
x x x
x x
x e
x
x
102
1. 0 ) ( 3.8 Figure
) 4 (
s s x interval in x versus x f Graph
O
12
÷7.419481
÷7.357589
minimum
maximum
f
(4)
(x)
x
1
0.958572
103
. 000005 . 0 000007 . 0
00000412 . 0 00000667 . 0
) 419481 . 7 (
) 10 ( 180
) 0 1 (
) 12 (
) 10 ( 180
) 0 1 (
by given is bound error the Thus,
419481 . 7 ) 958572 . 0 ( is value minimum the
and 12 ) 0 ( is value maximum the
, 1 0 interval in ) ( for
: that conclude can we n, computatio our on Based
4
5
4
5
) 4 (
) 4 (
) 4 (
s s ÷ ¬
s s ÷ ¬
÷
÷
÷ s s
÷
÷
÷ ~
=
s s
c
c
c
f
f
x x f
104
lue. biggest va the take always we
error, maximum for and
alue, smallest v the take always we
error, minimum for the example, For
lue. closest va not the
interval, biggest a take always we
them, of ion approximat the
take to need we if that bounds error for Note
error bounds
approximate error bounds
105
. 746830 . 0 ) ( 746818 . 0
000005 . 0 746825 . 0 ) ( 000007 . 0 746825 . 0
Conclusion
s s ¬
+ s s ÷
}
}
b
a
b
a
dx x f
dx x f
106
3.4 Numerical Solution of
Differential equations
In this part, we discuss two numerical methods to
compute approximate solutions of differential
equations:
1) Onestep Euler method
2) The fourth order RungeKutta method
107
NOTATION
). , ( '
i.e. , and in function
a as notation this use also we part, In this
or '
by denoted is operation al differenti the Usually,
y x f y
dx
dy
y x
dx
dy
y
= =
108
3.4.1 Onestep Euler Method
This method is the most basic numerical
method used to solve differential equation.
We shall discuss this Euler Method using the
following example:
Example 3.13
2.
(1,1). ) 2 (
=
+ ÷ =
x at y of value the e Approximat
through passing y x x
dx
dy
Given
109
Figure 3.9 Onestep Euler Method with h = 1.
Solution
See the following figure
h
1 2
(x
0
, y
0
)
(x
1
, y
1
)
4 ÷
1 ÷
y
x
110
. of value the of ion approximat the is
that assume we figure, previous In the
. ' by given is curve a of
line tangent the of gradient that the know We
1
y
y
dx
dy
y =
111
l. subinterva considered the of length the is and
), , ( at line tangent the of gradient the is ' where
'
'
have we together, line tangent the of
gradient the and equation gradient the Putting
0 1
0 0 0
0 0 1
0 1
0 1
0 1
0
x x h
y x y
hy y y
h
y y
x x
y y
y
÷ =
+ = ¬
÷
=
÷
÷
=
112
3 ) 2 )( 1 ( 1
'
is 2 at of value e approximat the Thus,
1 1 2
and
2 1 ) 1 2 ( 1
) 2 (
) , ( '
that Note
0 0 1
0 1
0 0 0
0 0 0
= + =
+ =
=
= ÷ =
÷ =
= + ÷ =
+ ÷ =
=
hy y y
x y
x x h
y x x
y x f y
113
table following in the explained as
2 at 3 e approximat that we is result The = ~ x y
Notice that in general, the formula we use to
estimate y can be written as
'
1 i i i
hy y y + =
+
The formula of Onestep Euler Method
i x
i
y
i
y
i
’
0 1 1 2
1 2 3 
114
2.0. 1.5, , 0 . 1 and
5 . 0
2
1 2
is l subinterva each of length Then the
ls. subinterva two into interval the divide we Suppose
ls? subinterva more or two into divided is 2 to
1 from interval the if ion approximat
our of accuracy the increase Can we
2 1 0
= = =
=
÷
=
=
=
x x x
h
x
x
115
See the following figure:
Figure 3.10 Onestep Euler Method with h = 0.5.
(x
0
, y
0
)
(x
2
, y
2
)
4 ÷
1 ÷
y
x
(x
1
, y
1
)
1 1.5 2
h h
116
. 2
) 2 )( 5 . 0 ( 1
'
obtain we , 5 . 0 with now but before, did we As
. 5 . 1 at of value e approximat the is Here
. compute to have we , computing Before
. is 2 at of value
e approximat that the suppose Now,
0 0 1
1
1 2
2
=
+ =
+ =
=
=
=
hy y y
h
x y y
y y
y x y
117
. .
. .
y x x
,y x f y
y
x
x y
75 2
2 ) 5 1 2 )( 5 1 (
) 2 (
) ( ' Thus,
2. using gradient the
e approximat to is do can What we . 5 . 1 at
line tangent the of gradient exact the compute not can we
, 5 . 1 at of e exact valu the know not do we Since
1 1 1
1 1 1
1
=
+ ÷ =
+ ÷ =
=
=
=
=
118
i x
i
y
i
y
i
′
0 1 1 2
1 1.5 2 2.75
2 2 3.375 
: table following in the listed are results The
before. one n the better tha is ion approximat This
. 375 . 3
) 75 . 2 )( 5 . 0 ( 2
'
' and
1 1 2
1 2
1 2
1 2
1
=
+ =
+ = ¬
÷
=
÷
÷
=
hy y y
h
y y
x x
y y
y
119
3. 2.8, , .4, 1 1.2, , 1
are of Values
3 ) 2 . 0 ( 1
= = = = =
=
x x x x x
x
x
Example 3.14
NOTATION
. at last value the reaching until l subinterva of
n calculatio every in of value the to up add
and begin with that we means notation This
. ) (
by denoted be can considered be to of values The
b x
x h
a x
b h a x
x
=
=
=
3. 2.8, , .4, 1 1.2, , 1
are of Values
3 ) 2 . 0 ( 1
= = = = =
¬
=
x x x x x
x
x
120
Example 3.15
. 2 , (1,1)
) 2 ( ,
=
+ ÷ =
x at y e approximat through passing
y x x
dx
dy
given i.e. problem previous our
solve to als subinterv five take we Suppose
. 2 ) 2 . 0 ( 1 and
. 2 . 0
5
1 2
Here,
=
=
÷
=
x
h
Solution
121
i x
i
y
i
y
i
’
0 1.0 1 2
1 1.2 1.4 2.36
2 1.4 1.872 2.712
3 1.6 2.4144 3.0544
4 1.8 3.02528 3.38528
5 2.0 3.702336 
The results of our approximation are listed
in the following table:
Approximation by Onestep Euler method with h = 0.2.
122
If we take ten subintervals, we have
i x
i
y
i
y
i
’
0 1.0 1 2
1 1.1 1.2 2.19
2 1.2 1.419 2.379
3 1.3 1.6569 2.5669
4 1.4 1.91359 2.75359
5 1.5 2.188949 2.938949
6 1.6 2.482844 3.122844
7 1.7 2.795128 3.305128
8 1.8 3.125641 3.485641
9 1.9 3.474205 3.664205
10 2.0 3.840626 
Approximation by Onestep Euler method with h = 0.1.
123
3.4.2 : The fourth order RungeKutta
Method
RungeKutta Method is more accurate
compare to Euler Method.
As usual, given y′ = f (x, y) and the initial
condition (x
0
, y
0
) and we want to find the
value of y at other values of x.
124
). 2 2 (
6
1
and
where
) , (
2
,
2
2
,
2
) , (
: follows as values te intermedia four
calculate to need we Method, Kutta  Runge In
4 3 2 1 1
1
3 4
2
3
1
2
1
k k k k y y
x x h
k y h x hf k
k
y
h
x hf k
k
y
h
x hf k
y x hf k
i i
i i
i i
i i
i i
i i
+ + + + =
÷ =
+ + =

.

\

+ + =

.

\

+ + =
=
+
+
125
Example 3.16
2. ) 5 . 0 ( 1
(1,1). ) 2 (
=
+ ÷ =
x for y of value the e Approximat
through passing y x x
dx
dy
Given
have we (1,1), ) , (
Using values. te intermedia four following the
calculate we , 5 . 1 at estimate To
. 2 , 5 . 1 , 1 have we example In this
0 0
1
2 1 0
=
=
= = =
y x
x y
x x x
Solution
126
. 273438 . 1
] 609375 . 1 ) 25 . 1 2 ( 25 . 1 )[ 5 . 0 (
) 609375 . 1 , 25 . 1 ( (0.5)
2
,
2
21875 . 1
] 5 . 1 ) 25 . 1 2 ( 25 . 1 )[ 5 . 0 (
) 5 . 1 , 25 . 1 ( (0.5)
2
,
2
1 ] 1 ) 1 2 ( 1 )[ 5 . 0 (
) 1 , 1 ( (0.5)
) , (
2
0 0 3
1
0 0 2
0 0 1
~
+ ÷ =
=

.

\

+ + =
=
+ ÷ =
=

.

\

+ + =
= + ÷ =
=
=
f
k
y
h
x hf k
f
k
y
h
x hf k
f
y x hf k
127
1.5. at 249349 . 2 : Result
. 249349 . 2
) 511719 . 1 ) 273438 . 1 ( 2 ) 21875 . 1 ( 2 (1
6
1
1
) 2 2 (
6
1
and
511719 . 1
] 273438 . 2 ) 5 . 1 2 ( 5 . 1 )[ 5 . 0 (
) 273438 . 2 , 5 . 1 ( (0.5)
) , (
1 1
4 3 2 1 0 1
3 0 0 4
= ~
~
+ + + + ~
+ + + + =
~
+ ÷ =
=
+ + =
x y
k k k k y y
f
k y h x hf k
128
have We
2.249349). (1.5, ) , ( using now but n, calculatio
previous our repeat we , 2 at compute To
1 1
2
=
=
y x
x y
. 718343 . 1
] 2.999186 ) 75 . 1 2 ( 75 . 1 )[ 5 . 0 (
) 2.999186 , 75 . 1 ( (0.5)
2
499674 . 1
2.249349 ,
2
5 . 0
5 . 1 (0.5)
2
,
2
499674 . 1
] 2.249349 ) 5 . 1 2 ( 5 . 1 )[ 5 . 0 (
) 2.249349 , 5 . 1 ( (0.5)
) , (
1
1 1 2
1 1 1
~
+ ÷ =
=

.

\

+ + =

.

\

+ + =
~
+ ÷ =
=
=
f
f
k
y
h
x hf k
f
y x hf k
129
. 011180 . 2
] 022359 . 4 ) 2 2 ( 2 [ ) 5 . 0 (
) 022359 . 4 , 2 ( ) 5 . 0 (
) 773010 . 1 249349 . 2 , 5 . 0 5 . 1 ( (0.5)
) , (
3 1 1 4
~
+ ÷ =
=
+ + =
+ + =
f
f
f
k y h x hf k
773010 . 1
] 108521 . 3 ) 75 . 1 2 ( 75 . 1 )[ 5 . 0 (
) 108521 . 3 , 75 . 1 ( ) 5 . 0 (
2
718343 . 1
249349 . 2 ,
2
5 . 0
5 . 1 (0.5)
2
,
2
2
1 1 3
~
+ ÷ =
=

.

\

+ + =

.

\

+ + =
f
f
k
y
h
x hf k
130
i x
i
y
i
k
1
k
2
k
3
k
4
0 1 1 1 1.21875 1.273438 1.511719
1 1.5 2.249349 1.499674 1.718383 1.773010 2.011180
2 2 3.998276    
: n calculatio our of result for the table following the See
2. when 998276 . 3 : Result
. 998276 . 3
) 2 2 (
6
1
and
2 2
4 3 2 1 1 2
= ~
~
+ + + + =
x y
k k k k y y
131
Conclusion
If we increase the number of subintervals
(i.e. with smaller value of h),
then we obtain a more accurate approximation
. 2 at 999997 . 3 obtain we 1(0.1)2, i.e.
ls, subinterva by taking continue, we If
. 2 at 999948 . 3 have we
2, ) 2 . 0 ( 1 i.e. ls, subinterva take we If
= ~ =
= ~
=
x y x
ten
x y
x f ive
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.