Numerical Methods (Nurul Alam)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

CE 401 : Numerical Methods and Basic Computer Programming

3.00 credit, 3 hrs/week.


Basic components of computer system, FORTARN / C/C++ language, numerical solution of
algebraic and transcendental equations, matrices, solution of systems of linear equations, curve-
fitting by least squares, finite differences, divided differences, interpolation, computer
applications to Civil Engineering problems, numerical differentiation and integration, numerical
solution of differential equations.
BOOKS RECOMMENDED:( Numerical Methods)
1. Introductory Methods of Numerical Analysis : S. S. Sastry
2. Numerical Methods for Engineers : Steven C. Chapra & Raymond P. Cnale
3. Numerical Mathematics and Computing : Ward Cheney & David Kincaid
4. Numerical Methods : S. Balachandra Rao & C. K. Shantha
5. Numerical Analysis :A.R VASISHTHA,VIPIN VASISHTHA
BOOKS RECOMMENDED:( Computer Programming)
1. Computer Fundamentals : Pradeep K. Sinha
2. Elements of Computer Science : S. K. Sarkar & A. K. Gupta
3. Computer Fundamentals : Dr. M. Lutfar Rahman & Dr. M.
Alamgir Hossain
1. Programming with ANSI C : E Balagurusamy
2. Programming in C : Stephen G. Cochan
3. C: The Complete Reference : Herbert Schildt
4. Turbo C: The Complete Reference : Herbert Schildt

Finite Differences
Basic Information/Important Formula:
1. Let u(x) be any function which is sum of the function f(x),g(x),p(x) ,…so that
u ( x)  f ( x)  g ( x)  p( x)  ....
then(i) Eu ( x)  Ef ( x)  Eg ( x)  Ep( x)  ....
(ii )u ( x)  f ( x)  g ( x)  p( x)  ....
2. E and  are commutative with regard to a constant ,i.e
(i) E{cf ( x)}  cEf ( x)(ii){cf ( x)}  cf ( x)
3. E and  obey the law of indict
 i  E m E n f ( x)  E mn f ( x);  ii   m  n f ( x)   mn f ( x);
4. E n f ( x)  f ( x  nh)
5.
 i  E  1  ; or  E  1 ii    1  E 1  iii  E  E  ;  iv      ;  v 1   1     1
 vi  E  ehD  1  
6. Newton's Binomial Expansion Formula
Suppose 𝑦0 , 𝑦1 , 𝑦2 , … , 𝑦𝑛 denote the values of the function 𝑦 = 𝑓(𝑥) corresponding to the
values 𝑥0 , 𝑥0 + ℎ, 𝑥0 + 2ℎ, … , 𝑥0 + 𝑛ℎ of 𝑥. Let one of the values of 𝑦 is missing since 𝑛
values of the functions are known.
Therefore, we have
Δ𝑛 𝑦0 = 0
or (𝐸 − 1)𝑛 𝑦0 = 0

7.

Operator Definition

Forward difference operator Δ Δf(x) = f(x + h) − f(x)

Backward difference operator ∇ ∇f(x) = f(x) − f(x − h)

h h
Central difference operator 𝛿 𝛿f(x) = f (x + ) − f (x − )
2 2

Shift operator E Ef(x) = f(x + h)

h h
Average operator 𝜇 𝜇f(x) = 0.5 [f (x + ) − f (x − )]
2 2

Differential operator 𝐷 Df(x) = f ′ (x)

Numerical Method/Analysis: Numerical Method /Analysis is that branch of mathematics which


deals with the approximate methods of calculation and also the methods of estimating the
accuracy of such calculations.
Difference Operator:
Shift Operator(E):
The shift operator is denoted by E and define as Ef ( x)  f ( x  h).

In general E n f ( x)  f ( x  nh)

In particular

Ey0  y1 ; E 2 y0  y2 ;.....E n y0  yn
Ey1  y11  y2 .............E n y1  yn 1
Inverse of shift operator: The inverse of shift operator is denoted by E 1 and define as
E 1 f ( x)  f ( x   1 h)  f ( x  h).

In general E n f ( x)  f ( x  nh)

Forward difference operator(  ):The operator  is called Forward difference operator and
defined as f ( x)  f ( x  h)  f ( x).

Backward difference operator(  ):The operator  is called backward difference operator and
defined as f ( x)  f ( x)  f ( x  h).

Forward difference: Let y  f ( x) be a function of x. Also let the consecutive value of


x be x0  a, x1  a  h, x2  a  2h,......xn 1  a  (n  1)h, xn  a  nh and the corresponding values of
y be y0  f (a), y1  f (a  h), y2  f (a  2h)....... yn 1  f (a  (n  1)h), yn  f (a  nh).
Then the differences
y1  y0  f (a  h)  f (a), y2  y1  f (a  2h)  f (a  h), yn  yn1  f (a  nh)  f (a  (n 1)h) are
called the first forward differences at
x0  a, x1  a  h, x2  a  2h,.......xn 1  a  (n  1)h, xn  a  nh
respectively and are denoted by y0 , y1 , y2 ...yn 1 or f (a ), f (a  h),....f (a  ( n  1) h).

y0  f (a  h)  f (a )  y1  y0
y1  f (a  2h)  f (a  h)  y2  y1
y2  f (a  3h)  f (a  2h)  y3  y2
...........................................................
...........................................................
yn 1  f (a  nh)  f (a   n  1 h)  yn  yn 1

This  is called the forward difference operator.


The second forward differences of the function are define by

 2 y0  f (a  h)  f (a )  y1  y0
 2 y1  f (a  2h)  f (a  h)  y2  y1
 2 y2  f (a  3h)  f (a  2h)  y3  y2
...........................................................
...........................................................
 2 yn 1  f (a  nh)  f (a   n  1 h)  yn  yn 1

The Higher order forward differences of the function are define by


 n yk   n1 yk 1   n1 yk

Forward differences Table:

Backward Differences:
Let y  f ( x) be a function of x. Also let the consecutive value of
x be x0  a, x1  a  h, x2  a  2h,......xn 1  a  (n  1)h, xn  a  nh and the corresponding values of
y be y0  f (a), y1  f (a  h), y2  f (a  2h)....... yn 1  f (a  (n  1)h), yn  f (a  nh).
Then the differences
y1  y0  f (a  h)  f (a), y2  y1  f (a  2h)  f (a  h), yn  yn1  f (a  nh)  f (a  (n 1)h) are
called the first backward differences at
x1  a  h, x2  a  2h,.......xn 1  a  (n  1)h, xn  a  nh
respectively and are denoted by y1 , y2 ...yn 1 , yn or f (a ), f (a  h ),....f (a  ( n  1)h), f (a  (n)h).

y1  f (a  h)  f (a )  y1  y0
y2  f (a  2h)  f (a  h)  y2  y1
y3  f (a  3h)  f (a  2h)  y3  y2
...........................................................
...........................................................
yn 1  f (a  nh)  f (a   n  1 h)  yn  yn 1

This  is called the backward difference operator.


The second forward differences of the function are define by
 2 y2  y2  y1
 2 y3  y3  y2
 2 y4  y4  y3
...........................................................
...........................................................
 2 yn  yn  yn 1

The Hight order forward differences of the function are define by

n yk  n1 yk  n1 yk 1

Central difference operator: The central difference operator is denoted by the symbol  and is
h h
defined by  f ( x)  f ( x  )  f ( x  ) or ,  y x  y h  y h .
2 2 x x
2 2

Theorem: State and prove Fundamental Theorem for finite differences.


Statement: The 𝑛th differences of a polynomial of the 𝑛th degree are constant and higher
differences are zero.
constant if 𝑟 = 𝑛
i. e. Δ𝑟 *𝑓(𝑥)+ = {
0 : if 𝑟 > 𝑛

Proof: Let 𝑓(𝑥) be a polynomial of the nth degree in 𝑥 be


𝑓(𝑥) = 𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + ⋯ + 𝑎𝑛−1 𝑥 𝑛−1 + 𝑎𝑛 𝑥 𝑛 , where 𝑛 is a positive integer and
𝑎0 , 𝑎1 , 𝑎2 , ⋯ , 𝑎𝑛 are constants and 𝑎𝑛 ≠ 0.

∴ 𝑓(𝑥 + ℎ) = 𝑎0 + 𝑎1 (𝑥 + ℎ) + 𝑎2 (𝑥 + ℎ)2 + ⋯ + 𝑎𝑛−1 (𝑥 + ℎ)𝑛−1 + 𝑎𝑛 (𝑥 + ℎ)𝑛

Now by definition of Δ, we have


Δ𝑓(𝑥) = 𝑓(𝑥 + ℎ) − 𝑓(𝑥)
= ,𝑎0 + 𝑎1 (𝑥 + ℎ) + 𝑎2 (𝑥 + ℎ)2 + ⋯ + 𝑎𝑛−1 (𝑥 + ℎ)𝑛−1
+ 𝑎𝑛 (𝑥 + ℎ)𝑛 - − ,𝑎0 + 𝑎1 𝑥 + 𝑎2 𝑥 2 + ⋯ + 𝑎𝑛−1 𝑥 𝑛−1 + 𝑎𝑛 𝑥 𝑛 -
= 𝑎1 ℎ + 𝑎2 *(𝑥 + ℎ)2 − 𝑥 2 + + ⋯ + 𝑎𝑛−1 *(𝑥 + ℎ)𝑛−1 − 𝑥 𝑛−1 +
+ 𝑎𝑛 *(𝑥 + ℎ)𝑛 − 𝑥 𝑛 +
∴ Δ𝑓(𝑥) = 𝑎0′ + 𝑎1′ 𝑥 + 𝑎2′ 𝑥 2 ⋯ + 𝑎𝑛−2

𝑥 𝑛−2 + 𝑛𝑎𝑛 ℎ𝑥 𝑛−1 ⋯ ⋯ (1)

where 𝑎0′ , 𝑎1′ , 𝑎2′ , ⋯ , 𝑎𝑛−2



are constant coefficients

Thus the first difference of a polynomial of the nth degree is also a polynomial of degree (𝑛 − 1)
in which the coefficient of 𝑥 𝑛−1

= 𝑛 ⋅ ℎ𝑎𝑛 , the coefficient of 𝑥 𝑛 in 𝑓(𝑥)-

To find the second difference of 𝑓(𝑥) we have

Δ2 𝑓(𝑥) = Δ,Δ𝑓(𝑥)-
= Δ,𝑓(𝑥 + ℎ) − 𝑓(𝑥)-
= Δ𝑓(𝑥 + ℎ) − Δ𝑓(𝑥)
= *𝑎0′ + 𝑎1′ (𝑥 + ℎ) + 𝑎2′ (𝑥 + ℎ)2 + ⋯ + 𝑎𝑛−2 ′
(𝑥 + ℎ)𝑛−2
+ 𝑛𝑎𝑛 ℎ(𝑥 + ℎ)𝑛−1 + − *𝑎0′ + 𝑎1′ 𝑥 + 𝑎2′ 𝑥 2 + ⋯ + 𝑎𝑛−2

𝑥 𝑛−2 + 𝑛𝑎𝑛 ℎ𝑥 𝑛−1 +
2
∴ Δ 𝑓(𝑥) = 𝑎0′′ + 𝑎1′′ 𝑥 + 𝑎2′′ 𝑥 2 + ⋯ + 𝑎𝑛−3

𝑥 𝑛−3 + 𝑛(𝑛 − 1)𝑎𝑛 ℎ2 𝑥 𝑛−2

∴ The second differences is thus a polynomial of degree (𝑛 − 2)in which the coefficient of
𝑥 𝑛−2 ।

𝑛(𝑛 − 1)ℎ2 𝑎𝑛 .

Continuing, the above process, we see that the nth difference of f(x) is a polynomial of degree
zero.
i. e. we arrive at the result

Δ𝑛 𝑓(𝑥) = 𝑛(𝑛 − 1) ⋯ − 2 ⋅ 1 ⋅ ℎ𝑛 ⋅ 𝑎𝑛
= 𝑛! ℎ𝑛 𝑎𝑛

Therefore, the nth difference of a n-th degree polynomial is constant and all higher differences
are zero, that is, the (𝑛 + 1)th and higher differences of a polynomial of the nth degree are
zero.(prove).

Question: Evaluate the following  i  3 1  x 1  2 x 1  3x  ii   n  eax b 

Question :Prove that the


(a) 𝐸 ≡ 1 + Δ or Δ ≡ 𝐸 − 1.
Prove: We have
Δ𝑓(𝑥) = 𝑓(𝑥 + ℎ) ⋯ 𝑓(𝑥)
= 𝐸𝑓(𝑥) − 𝑓(𝑥)
= (𝐸 − 1)𝑓(𝑥).

Thus Δ𝑓(𝑥) = (𝐸 − 1)𝑓(𝑥), for any function 𝑓(𝑥).

∴ Δ≡𝐸−1
𝐸 ≡ 1 + Δ.

(b)Prove that   1  E 1 or E 1  1 

Prove: we have

f ( x)  f ( x)  f ( x  h)  f ( x)  E 1 f ( x )  (1  E 1 ) f ( x )
Thus f ( x)  (1  E 1 ) f ( x), for any function of f ( x )
  1  E 1 or , E 1  1  .(Pr oof )

(c)Prove that
 i  E  E    ii      .  iii 1   1     1 iv  E  e hD  1    v     1   
1

1  2 3  4  1  2 3  4 
 vi 1    ( E  1) 1  vii  D            
h  4  h  4 
... viii D ...
2 3 2 3
 
 ix  y  2  2 y  3 y   4 y  ...  x       .
1 11
h  12   
 xi  Showthat  r yk   r yk r .
(d)

 i  If u0  1, u1  5, u2  8, u3  3, u4  7, u5  0; find 5u0
 ii  If u6  2, u7  6, u8  8, u9  9, u10  17, u5  0; find  4u6
 iii  f u0  2, u1  11, u2  80, u3  200, u4  100, u5  8; find 5u5
 iv  If the third differences are cons tan t , find u6 if u0  9, u1  18, u2  20, u3  24.
(e)Express  i  x 4  3x 3  5 x 2  6 x  7  ii  3x 3  2 x 2  7 x  6  iii  2 x 3  3x 2  3x  10 in factorial
polynomials and get their successive forward difference taking h=1.
(f)Find the missing term in the following table
x 1 2 3 4 5 6 7
y 2 4 8 ? 32 64 128

(g) Find the missing term in the following table


x 0 1 2 3 4
y 1 3 9 ? 81

(h) Find the missing term in the following table


x 10 15 20 25 30 35 40
y 270 ? 222 200 ? 164 148

(i) ) Find the missing term in the following table


x 2.0 2.1 2.2 2.3 2.4 2.5 2.6
y 0.135 ? 0.111 0.100 ? 0.082 0.074

(j)Find the number of students of Civil Engineering in 2060 from the following table.
Year(x) 2020 2030 2040 2050 2060 2070
Number 55 64 70 76 ? 90
Of
Student
(y)

Solution: There are five given values, we can have unique 4th degree polynomial to satisfy
the data. then Can written
 5 yk  0
  E  1 yk  0
5

  E 5  5E 4  10 E 3  10 E 2  5E1  1 yk  0
 yk 5  5 yk  4  10 yk 3  10 yk  2  5 yk 1  yk  0
Putting k  0 we get ;
y5  5 y4  10 y3  10 y2  5 y1  y0  0
 90  5 y4  10(76)  10(70)  5(64)  55  0
 y4  83
Hence the number of student 83 in 2060.
(k) Find the missing term in the following table
x 1 2 3 4 5 6 7 8
y 1 8 ? 64 ? 216 343 512

(l) Find the missing term in the following table


x 16 18 20 22 24 26
y 39 85 ? 151 264 388
Md.Nurul Alam
Lecturer(Mathematics)
Barishal Engineering College,Barishal.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy