Yassin Notes
Yassin Notes
Yasin K. Kowa
Email:[email protected]
Definition
Numerical Methods are methods for solving problems numerically
(in terms of number) on computer or calculator or by hand.
Numerical methods emphasize the implementation of algorithms.
Definition
Numerical Methods are methods for solving problems numerically
(in terms of number) on computer or calculator or by hand.
Numerical methods emphasize the implementation of algorithms.
Definition
Numerical methods provide systematic methods of solving
problems in numerical form. Normally starts from an initial data,
using high precision digital computers, steps in algorithms and
finally obtaining the results.
Definition
The numerical methods give approximate results or solution, that
is they have errors.
Definition
The numerical methods give approximate results or solution, that
is they have errors.
Definition
That is True Value=approximate+error
Error
Error refers to the difference between the true value and the
estimated (approximated) value
Error
Error refers to the difference between the true value and the
estimated (approximated) value
Error
Error=Actual value-Estimated value
Error
Approximate values or numbers are those that represent the
numbers to a certain degree of accuracy.
Error
Approximate values or numbers are those that represent the
numbers to a certain degree of accuracy.
Error
But error is different from mistakes (blunders), the last one are
the deviations due to human factors such as misreading a number,
misreading from a scale or using faulty instrument, misprinting,
misfeeding e.t.c
Sources of Error
When a computational procedure is involved in solving a scientific
-mathematical problem, errors often will be involved in the process
Sources of Error
When a computational procedure is involved in solving a scientific
-mathematical problem, errors often will be involved in the process
Sources of Error
(a) Error due to method itself
Sometimes numerical method by virtue of what they are,
introduce some error in the result. This error is called
Discretization error
Sources of Error
(b) Truncation Error
This occurs due to the failure to do the problem in a finite
steps, we are forced to terminate our calculations somewhere
or carry a few terms.
Sources of Error
(b) Truncation Error
This occurs due to the failure to do the problem in a finite
steps, we are forced to terminate our calculations somewhere
or carry a few terms.
Sources of Error
For instance Taylor’s series,
f 0 (a) f 00 (a)
f (x ) = f (a) + (x − a) + (x − a)2 + . . .
1! 2!
Sources of Error
(c) Round-off Error
Is the error that a rises due to the fact that when we have
large number of digits and it will be necessary to cut them to
usable number of figures. This process is called rounding off
Sources of Error
(c) Round-off Error
Is the error that a rises due to the fact that when we have
large number of digits and it will be necessary to cut them to
usable number of figures. This process is called rounding off
Sources of Error
(d) Propagated Error
This is an error in the succeeding steps of the process due to
the occurrence of earlier error.
Sources of Error
(e) Modeling Error
Mathematical modeling is a process when mathematical
equations are used to represent a physical systems. This
modeling introduces errors and are called modeling error
Accuracy
Accuracy refers to how closely a computed or measured value
agrees with the true value.
Accuracy
Accuracy refers to how closely a computed or measured value
agrees with the true value.
Precision
Precision refers to how closely individual computed or measured
values agree with each other.
Calculation of Errors
Absolute Error =⇒ ex = |x − x ∗ | where
x − represents a true value of a quantity
x ∗ − represent approximate value
Calculation of Errors
Absolute Error =⇒ ex = |x − x ∗ | where
x − represents a true value of a quantity
x ∗ − represent approximate value
Calculation of Errors
When
(i) x ∗ > x , the number x ∗ is said to be an approximation with
excess
(ii) x ∗ < x , the number x ∗ is said to be an approximation with
deficit
Calculation of Errors
For instance√
x ∗ = 1.4 ≈ √ 2 ,an approximation with deficit
∗
x = 2.24 ≈ 5, an approximation with excess
Calculation of Errors
For instance√
x ∗ = 1.4 ≈ √ 2 ,an approximation with deficit
∗
x = 2.24 ≈ 5, an approximation with excess
Calculation of Errors
From True Value=Approximate+error, we can write as
x = x ∗ ± ex
Relative Error
The relative error is the ratio of the absolute error to actual figure,
that is
|x − x ∗ | ex
rx = =
x x
Relative Error
The relative error is the ratio of the absolute error to actual figure,
that is
|x − x ∗ | ex
rx = =
x x
Relative Error
Where rx is the relative error, the relative error is expressed as
percentage.That is
ex
rx = × 100%
x
Example-1
Suppose that you have the task of measuring the length of bridge
and rivet and come up with 9999 cm and 9 cm respectively. If the
true values are 10000 cm and 10 cm respectively. Compute
Example-1
Suppose that you have the task of measuring the length of bridge
and rivet and come up with 9999 cm and 9 cm respectively. If the
true values are 10000 cm and 10 cm respectively. Compute
Example-1
(a) the true error
(b) relative error in %
Solution-1
(a) Case I
Given x = 10000cm
x ∗ = 9999cm
ex = |10000 − 9999|cm=1cm
Case II
x=10cm
x ∗ = 9cm
Solution-1
(a) Case I
Given x = 10000cm
x ∗ = 9999cm
ex = |10000 − 9999|cm=1cm
Case II
x=10cm
x ∗ = 9cm
Solution-1
ex = |10 − 9| cm = |9 − 10| cm = 1cm
Solution-1
(b) Case I
ex 1 cm
rx = × 100% = × 100% = 0.01%
x 10000 cm
Solution-1
(b) Case I
ex 1 cm
rx = × 100% = × 100% = 0.01%
x 10000 cm
Solution-1
Case II
ex 1cm
rx = × 100% = = 10%
x 10cm
Exercise-1
Which of the following is more accurate estimate?
Exercise-1
Which of the following is more accurate estimate?
Exercise-1
√
0.84 × 45
(a) 10 as an estimate for or
0.6
(b) 150cm2 as the area of circle of diameter 14cm
Exercise-2
1
Three approximate values of the number are given as 0.30, 0.33
3
and 0.34. Which of these values is the best approximate?
Theorem
In addition and subtraction on error bound for the results, is given
as the sum of error bounds for the terms.
Theorem
In addition and subtraction on error bound for the results, is given
as the sum of error bounds for the terms.
Proof
For addition
ex +y = |(x + y ) − (x ∗ + y ∗ )| = |x − x ∗ + y − y ∗ |
By triangular rule
ex +y ≤ |x − x ∗ | + |y − y ∗ | =⇒ ex +y ≤ ex + ey
For subtraction
ex −y = |(x −y )−(x ∗ −y ∗ )| = |(x −x ∗ )−(y −y ∗ )| ≤ |x −x ∗ |+|y −y ∗ |
ex −y = ex + ey
Theorem
In multiplication and division, a bound for the relative error of the
results is given by the sum of the bounds for the relative errors of
the given terms or numbers.
Theorem
In multiplication and division, a bound for the relative error of the
results is given by the sum of the bounds for the relative errors of
the given terms or numbers.
Proof
For multiplication we what to prove that rx .y = rx + ry
exy |xy − x ∗ y ∗ | |xy − (x − ex )(y − ey )|
rx .y = = =
xy xy xy
|xy − xy + xey + yex + ex ey | |xey + yex + ex ey |
rxy = =
xy xy
Neglecting the small product we have
Proof
xey + yex ey ex
rxy = = +
xy y x
Proof
xey + yex ey ex
rxy = = +
xy y x
Proof
rxy ≈ rx + ry
Proof
For division, we want to prove r yx ≈ rx + ry
Proof
For division, we want to prove r yx ≈ rx + ry
Proof
x x∗ x x −ex
y − y∗ y − y −ey x (y − ey ) − y (x − ex ) y
r yx = x = x =
y y y (y − e y ) x
xy − xey − yx + yex y −xey + yex y
r yx = =
y (y − ey ) x y (y − ey ) x
ye x − xe y
ry = (y − ey )−1
x y
Introduction
Consider a function y = f (x ) defined on (a, b), x and y are the
independent and dependent variables respectively. If the points
x0 , x1 , . . . , xn are taken at equidistance.
Introduction
Consider a function y = f (x ) defined on (a, b), x and y are the
independent and dependent variables respectively. If the points
x0 , x1 , . . . , xn are taken at equidistance.
Introduction
That is xi = x0 + ih, i = 0, 1, 2, . . . , n then the value of y when
x = xi is denoted as yi , where yi = f (xi )
Introduction
Then y1 − y0 , y2 − y1 , y3 − y2 , . . . yn − yn−1 are called the
differences of y . Denoting these differences by
4y0 , 4y1 , . . . , 4yn−1 respectively, we have
Introduction
Then y1 − y0 , y2 − y1 , y3 − y2 , . . . yn − yn−1 are called the
differences of y . Denoting these differences by
4y0 , 4y1 , . . . , 4yn−1 respectively, we have
Introduction
4y0 = y1 −y0 , 4y1 = y2 −y1 , 4y2 = y3 −y2 · · ·4yn−1 = yn −yn−1
Where 4 is the forward difference operator and
4y0 = y1 −y0 , 4y1 = y2 −y1 , 4y2 = y3 −y2 · · ·4yn−1 = yn −yn−1
are called first forward differences
Introduction
The differences of the first forward differences are called second
forward differences and are denoted by
42 y0 , 42 y1 , . . . , 42 yn−1
Introduction
The differences of the first forward differences are called second
forward differences and are denoted by
42 y0 , 42 y1 , . . . , 42 yn−1
Introduction
Similarly we can define the third, fourth, . . .
We will consider three types of finite differences namely
Forward Finite differences
Backward Finite differences
Central Finite differences
x y 4y 42 y 43 y 44 y
x0 y0
4y0
x1 y1 42 y0
4y1 43 y0
x2 y2 42 y1 44 y0
42 y2 43 y1
x3 y3 42 y2
4y3
x4 y4
x1 y1 5y1
x2 y2 5y2 52 y2
x3 y3 5y3 52 y3 53 y3
x4 y4 5y4 52 y4 53 y4 54 y4
Example-3
(a) Construct the forward difference table and the horizontal tab;e
for the following data
x 1 2 3 4 5
y 4 6 9 12 17
Example-3
(b) Construct a forward difference table for the following data
x 0 10 20 30
y 0 0.174 0.347 0.518
Example-3
(c) Obtain the backward differences for the function f (x ) = x 3
from x = 1 to 1.05 to three decimal places take h = 0.01
Example-4
Calculate differences up to the fourth order for the function y = x 3
from x = 1 to x = 6 take h = 1
Solution -4
x y 4y 42 y 43 y 44 y
1 1
7
2 8 12
19 6
3 27 18 0
37 6
4 64 24 0
61 6
5 125 30
91
6 216
Solution -4
From the table above we see that third differences are constant (6)
and the fourth differences as zero.
Solution -4
Thus the finite difference of order n of an algebraic polynomial of
degree n is constant.
Example- 5
Find the missing values in the following table
x 45 50 55 60 65
y 3 - 2 - -2.4
Example- 6
Assuming that the following values of y belongs to polynomial to
degree 4, compute the next three values
x 0 1 2 3 4 5 6 7
y 1 -1 1 -1 1 - - -
Example -6
The following table gives the values of a polynomial of degree five.
It is given that f (4) is in error. Correct the value of f (4)
Example -6
x 1 2 3 4 5 6 7
y 0.975 -0.6083 -3.5250 -5.5250 -6.3583 4.2250 36.4750
Example -7
The following table gives the values of a polynomial of degree five.
It is given that f (3) is in error. Correct the error
Example -7
x 0 1 2 3 4 5 6
y 1 2 33 254 1054 3126 7777
Example- 8
4f (x )
Show that 4 log f (x ) = log 1 +
f (x )
Example- 8
4f (x )
Show that 4 log f (x ) = log 1 +
f (x )
Example-9
!
42
Evaluate x3
E
Exercise
Prove that (1 + 4)(1 − 4) = 1
Exercise
Prove that (1 + 4)(1 − 4) = 1
Exercise
Prove that 45 = 4 − 5
Example-9
Estimate the missing term in the following table by using shift
operator
Example-9
Estimate the missing term in the following table by using shift
operator
Exercise
x 0 1 2 3 4
y 4 3 4 - 12
Example -10
(a) Find 43 ((1 − 3x )(1 − 2x )(1 − x ))
(b) Express f (x ) = 3x 3 + x 2 + x + 1, in the factorial notation,
interval of differencing being unity
Interpolation
Interpolation is the approximate computation of the values of the
function f (x ) from several of its given values
f (x0 ), f (x1 ), f (x2 ), . . . , f (xn ), corresponding to the set of
x0 , x1 , x2 , . . . , xn equally spaced values of independent variable.
Interpolation
Interpolation is the approximate computation of the values of the
function f (x ) from several of its given values
f (x0 ), f (x1 ), f (x2 ), . . . , f (xn ), corresponding to the set of
x0 , x1 , x2 , . . . , xn equally spaced values of independent variable.
Interpolation
Let y = f (x ) which takes the values y0 , y1 , y2 , . . . , yn
corresponding to set of equally spaced values of the independent
variable, x0 , x1 , x2 , . . . , xn that is xi = x0 + ih such that
i = 0, 1, 2, . . . , n where h is spacing.
Interpolation
Let φ(x ) be a polynomial of the nth degree in x . Then φ(x )
represents the continuous function y = f (x ) such that
f (xi ) = φ(xi ) for i = 0, 1, 2, . . . , n and at all points
f (x ) = φ(x ) + R(x ) where R(x ) is called the error term of the
interpolation formula
Interpolation
Let φ(x ) be a polynomial of the nth degree in x . Then φ(x )
represents the continuous function y = f (x ) such that
f (xi ) = φ(xi ) for i = 0, 1, 2, . . . , n and at all points
f (x ) = φ(x ) + R(x ) where R(x ) is called the error term of the
interpolation formula
Interpolation
Let φ(x ) = a0 + a1 (x − x0 ) + a2 (x − x0 )(x − x1 ) + a3 (x − x0 )(x −
x1 )(x − x2 ) + · · · + an (x − x0 )(x − x1 )(x − x2 ) . . . (x − xn−1 ) and
φ(xi ) = yi , ∀ i = 0, 1, 2, 3, . . . , n
Interpolation
The constants a0 , a1 , a2 , . . . , an can be determined by
substituting x = x0 , x1 , x2 , . . . , xn successively in the equation
above, and get
Interpolation
The constants a0 , a1 , a2 , . . . , an can be determined by
substituting x = x0 , x1 , x2 , . . . , xn successively in the equation
above, and get
Interpolation
a0 = y0 when x = x0 , taking x = x1 we have
y1 = y0 + a1 (x1 − x0 )
y1 − y0 4y0
y1 − y0 = a1 (x1 − x0 ) =⇒ a1 = =
x1 − x0 h
Interpolation
For x = x2 we have
y1 − y0
y2 = y0 + (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − (x2 − x0 ) = a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − 2h = a2 (2h)(h)
h
Interpolation
For x = x2 we have
y1 − y0
y2 = y0 + (x2 − x0 ) + a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − (x2 − x0 ) = a2 (x2 − x0 )(x2 − x1 )
x1 − x0
y1 − y0
y2 − y0 − 2h = a2 (2h)(h)
h
Interpolation
y2 − y0 − 2y1 + 2y0 = 2a2 h2
y2 − 2y1 + y0 = a2 (2h2 )
42 y0
42 y0 = a2 (2h2 =⇒ a2 =
2!h2
Interpolation
43 y0
Continuing in this way we have, a3 =
3!h3
4n y0
Generally an =
n!hn
4y0 42 y0 43 y0
φ(x ) = y0 + (x − x0 ) + (x − x0 )(x − x1 ) + (x −
h n
2!h2 3!h3
4 y0
x0 )(x −x1 (x −x2 )+· · ·+ (x −x0 )(x −x1 )(x −x2 ) . . . (x −xn−1 )
n!hn
Interpolation
43 y0
Continuing in this way we have, a3 =
3!h3
4n y0
Generally an =
n!hn
4y0 42 y0 43 y0
φ(x ) = y0 + (x − x0 ) + (x − x0 )(x − x1 ) + (x −
h n
2!h2 3!h3
4 y0
x0 )(x −x1 (x −x2 )+· · ·+ (x −x0 )(x −x1 )(x −x2 ) . . . (x −xn−1 )
n!hn
Interpolation
x − x0
Let x = x0 + kh =⇒ k = , then
h
x − x1 = (x − x0 ) − (x1 − x0 ) = kh − h = (k − 1)h
x − x2 = (x − x1 ) − (x2 − x1 ) = (k − 1)h − h = (k − 2)h e.t.c
Interpolation
Now we have
k(k − 1) 2 k(k − 1)(k − 2) 3
φ(x ) = y0 + k 4 y0 + 4 y0 + 4 y0 +
2! n 3!
k(k − 1)(k − 2) . . . 1 4 y0
··· +
n!
Interpolation
Now we have
k(k − 1) 2 k(k − 1)(k − 2) 3
φ(x ) = y0 + k 4 y0 + 4 y0 + 4 y0 +
2! n 3!
k(k − 1)(k − 2) . . . 1 4 y0
··· +
n!
Interpolation
This is called Newton’s Forward Interpolation Formula
Example- 11
(a) Find a polynomial of degree two which takes the following
value
x 1 2 3 4
f (x ) 6 11 18 27
√ √
(b) Given that √ 15500 = 124.4990, √ 15510 =
124.5392, √ 15520 = 124.5793, 15530 = 124.6194. Find
the value of 1516
Example- 11
(a) Find a polynomial of degree two which takes the following
value
x 1 2 3 4
f (x ) 6 11 18 27
√ √
(b) Given that √ 15500 = 124.4990, √ 15510 =
124.5392, √ 15520 = 124.5793, 15530 = 124.6194. Find
the value of 1516
Example- 11
(c) A second degree polynomial passes through the points
(1, −1), (2, −2), (3, −1), (4, 2). Find the polynomial
Example- 12
(a) Evaluate y = e 3x at x = 0.05. Using the following table
x 0 0.1 0.2 0.3 0.4
e 3x 1 1.3499 1.8221 2.4596 3.3201
Example- 12
(a) Evaluate y = e 3x at x = 0.05. Using the following table
x 0 0.1 0.2 0.3 0.4
e 3x 1 1.3499 1.8221 2.4596 3.3201
Example- 12
(b) Find the value of sin 42◦ . Using the following table
x 40 45 50 55 60
sin x 0.6428 0.7071 0.7660 0.8192 0.8660
Exercise
Find the cubic polynomial which takes the following values
y (1) = 24, y (3) = 120, y (5) = 336, y (7) = 720. Hence obtain
the value of y (8), using Newton’s Forward Difference Interpolation.
Example-13
Calculate the value of f (84) for the data given in the table below
x 40 50 60 70 80 90
f (x ) 204 224 246 270 296 324
Example-14
Values of x in degrees and sinx are given in the following table
x 15 20 25 30 35 40
sin x 0.2588 0.3420 0.4226 0.5 0.5736 0.6428
Example-14
Values of x in degrees and sinx are given in the following table
x 15 20 25 30 35 40
sin x 0.2588 0.3420 0.4226 0.5 0.5736 0.6428
Example-15
From the following table estimate the number of students who
obtained marks in GSB 3204 between 75 and 80
Example- 16
Use Gauss’s Forward Interpolation Formula to find y for x = 20
given that
x 11 15 19 23 27
y 19.5673 18.8243 18.2173 17.1236 16.6162
Laplace-Everett’s Formula
Eliminating odd differences in Gauss’s Forward formula, by using
the relation
4y0 = y1 −y0 , 43 y−1 = 42 y0 −42 y−1 , 45 y−2 = 44 y−1 −44 y−2
Laplace-Everett’s Formula
Eliminating odd differences in Gauss’s Forward formula, by using
the relation
4y0 = y1 −y0 , 43 y−1 = 42 y0 −42 y−1 , 45 y−2 = 44 y−1 −44 y−2
Laplace-Everett’s Formula
u(u − 1) 2 (u + 1)u(u − 1) 2
y = y0 + u(y1 − y0 ) + 4 y−1 + (4 y0 −
2! 3!
(u + 1)u(u − 1)(u − 2) 4
42 y−1 ) + 4 y−2 +
4!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
(4 y−1 − 44 y−2 ) + . . .
5!
Laplace-Everett’s Formula
1 u+1
y = (1 − u)y0 + uy1 + u(u − 1) − 42 y−1 +
2! 3!
(u + 1)u(u − 1) 2 1 u+2
4 y0 + (u + 1)u(u − 1)(u − 2) − 44
3! 4! 6!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
y−2 + 4 y−1 + . . .
5!
Laplace-Everett’s Formula
1 u+1
y = (1 − u)y0 + uy1 + u(u − 1) − 42 y−1 +
2! 3!
(u + 1)u(u − 1) 2 1 u+2
4 y0 + (u + 1)u(u − 1)(u − 2) − 44
3! 4! 6!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
y−2 + 4 y−1 + . . .
5!
Laplace-Everett’s Formula
u(u − 1)(u − 2) 2
y = (1 − u)y0 + uy1 − 4 y−1 +
3!
(u + 1)u(u − 1) 2 (u + 1)u(u − 1)(u − 2)(u − 3) 4
4 y0 − 4 y−2 +
3! 5!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y−1 + . . .
5!
Laplace-Everett’s Formula
Let v = 1 − u =⇒ u = 1 − v , u − 2 = −v − 1
(1 − v )v (v + 1) 2 (u + 1)u(u − 1) 2
y = vy0 + uy1 + 4 y−1 + 4
3! 3!
(v + 2)(v + 1)v (v − 1)(v − 2) 4
y0 + 4 y−2 +
5!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y−1 + . . .
5!
Laplace-Everett’s Formula
Let v = 1 − u =⇒ u = 1 − v , u − 2 = −v − 1
(1 − v )v (v + 1) 2 (u + 1)u(u − 1) 2
y = vy0 + uy1 + 4 y−1 + 4
3! 3!
(v + 2)(v + 1)v (v − 1)(v − 2) 4
y0 + 4 y−2 +
5!
(u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y−1 + . . .
5!
Laplace-Everett’s Formula
v (v 2 − 1) 2 v (v 2 − 1)(v 2 − 4) 4
y = vy0 + 4 y−1 + 4 y−2 +. . . +uy1 +
3! 5!
(u + 1)u(u − 1) 2 (u + 2)(u + 1)u(u − 1)(u − 2) 4
4 y0 + 4 y−1 +. . .
3! 5!
Example
Use Everett’s Interpolation formula to find the value of y given
that x = 1.60 from the following table
(x − x0 )(x − x2 )(x − x3 ) . . . (x − xn )
f (x1 ) . . . +
(x1 − x0 )(x1 − x2 )(x1 − x3 ) . . . (x1 − xn )
Example
Apply Lagrange’s Interpolation Formula to find a polynomial of
which passes through the point (0, -20), (1,-12), (3, -20) and (4,
-24)
Example
Apply Lagrange’s Interpolation Formula to find a polynomial of
which passes through the point (0, -20), (1,-12), (3, -20) and (4,
-24)
Example
(a) Use Lagrange’s Interpolation Formula to find a polynomial
which passes through the points (0, -12), (1, 0), (3, 6), (4,
12)
(b) Use Lagrange’s Interpolation Formula to find the value of y
corresponding to x = 10 from the following table
x 5 6 9 11
y 380 -2 196 508
Numerical Differentiation
Numerical differentiation is the process of calculating the derivative
of a function at some particular value of independent variable by
means of a set of given values of that function.
Numerical Differentiation
Numerical differentiation is the process of calculating the derivative
of a function at some particular value of independent variable by
means of a set of given values of that function.
Numerical Differentiation
Consider the function y=f(x) which is tabulated for the values
x = a + nh, n = 0, 1, 2, ....
Numerical Differentiation are based on numerical interpolation as
follows:
Numerical Differentiation
(a) Derivatives based on Newton’s Forward interpolation Formula.
This formula is used to find the derivative for some given x
lying near the beginning of the data table/points.
(b) Derivatives based on Newton’s Forward interpolation Formula.
This formula is used to find the derivative for some given x
lying near the end of the data table/points.
(c) Derivatives based on Stirling’s Interpolation Formula. This
formula is used to find the derivative for some point lying near
the middle of tabulated value
4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....
24
4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....
24
dy dy du
= ×
dx du dx
4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....]
24
If x = x0 , u = 0
4u 3 − 18u 2 + 22u − 6 4
4 y0 + ....]
24
If x = x0 , u = 0
d 2y 1 11 4 5
2
= 2 [42 y0 − 43 y0 + 4 y0 − 45 y0 + ...]
dx h 24 6
d 2y 1 11 4 5
2
= 2 [42 y0 − 43 y0 + 4 y0 − 45 y0 + ...]
dx h 24 6
Example
dy d 2y
From the following table find the value of and at the
dx dx 2
point x = 1.0
Example
dy d 2y
From the following table of values of x and y, obtain and
dx dx 2
for x = 1.1 and x = 1.2
Example
dy d 2y
From the following table of values of x and y, obtain and
dx dx 2
for x = 1.1 and x = 1.2
For x = xn , u = 0 we have
For x = xn , u = 0 we have
1 11 4
f 00 (x ) = 2
[52 yn + 53 yn + 5 yn + ......]
h 12
Example
A slider in a machine moves a long a fixed straight rod. Its
distance xm along the rod are given in the following table for
various values of the time t(seconds).
t(sec) 1 2 3 4 5 6
x(m) 0.0201 0.0844 0.3444 1.0100 2.3660 4.7719
Find the velocity and acceleration of the slider at time t=6 sec
Example
A slider in a machine moves a long a fixed straight rod. Its
distance xm along the rod are given in the following table for
various values of the time t(seconds).
t(sec) 1 2 3 4 5 6
x(m) 0.0201 0.0844 0.3444 1.0100 2.3660 4.7719
Find the velocity and acceleration of the slider at time t=6 sec
f (x ) =
4y−1 + 4y0 u2 2 u 3 − u 43 y−2 + 43 y−1
y0 + u[ ]+ 4 y−1 + [ ]+
2 2! 3! 2
u4 − u2 4 u 5 − 5u 3 + 4u 45 y−3 + 45 y−2
4 y−2 + [ + ....]
4! 5! 2
f (x ) =
4y−1 + 4y0 u2 2 u 3 − u 43 y−2 + 43 y−1
y0 + u[ ]+ 4 y−1 + [ ]+
2 2! 3! 2
u4 − u2 4 u 5 − 5u 3 + 4u 45 y−3 + 45 y−2
4 y−2 + [ + ....]
4! 5! 2
Derivatives Based on Stirling’s Interpolation Formula
x − x0
where u =
h
Then
1 4y−1 + 4y0 3u 2 − 1 43 y−2 + 43 y−1
f 0 (x ) = [ + u 42 y−1 + [ ]+
h 2 6 2
3
4u − 2u 4 4 2 5
5u − 15u + 4 4 y−3 + 4 y−2 5
4 y−2 + [ ] + .......]
4! 5! 2
Yasin K. Kowa Email:[email protected] GSB 3204: Statistics & Numerical Analysis
Numerical Differentiation
1 1 4
f 00 (x ) = [42 y−1 − 4 y−2 + ..........]
h2 12
Exercise
Compute the values of f 0 (3.1) and f 0 (3.2) using the following table
x 1 2 3 4 5
f(x) 0 1.4 3.3 5.6 8.1