Document

advertisement
Save from: www.uotechnology.edu.iq
2ndclass
Advance Mathematics and
numerical analysis
‫اﻟﺮﯾﺎﺿﯿﺎت اﻟﻤﺘﻘﺪﻣﺔ واﻟﺘﺤﻠﯿﻞ اﻟﻌﺪدي‬
‫ﻋﺒﺪاﻟﻤﺤﺴﻦ ﺟﺎﺑﺮﻋﺒﺪاﻟﺤﺴﯿﻦ‬.‫د‬.‫م‬:‫اﺳﺘﺎذ اﻟﻤﺎده‬
CHAPTER ONE
Definition
1-Partial Derivative
If f is a function of the variables x, and y in the region xy plane
the Partial Derivative of f with respect to (w. r. to) x, at point
(x, y) is
f ( x  x, y )  f ( x, y )
∂f/∂x = x lim

 0
x
And (w. r. to) y at point (x, y) is
f ( x, y  y )  f ( x, y )
∂f/∂y = y lim

 0
y
To find ∂f/∂x is simply regards y as constant in f (x, y) and
Differential (w. r to) x is written in form
∂f/∂x = ∂z/∂x = ∂F/∂x or
DX f= Zx =Fx
Using same way to find ∂f/∂y is simply regards x as constant in
f (x, y) and Differential (w. r. to) y is written in form
∂f/∂y = ∂z/∂y = ∂F/∂y or
Dy f = Zy =Fy
Since a partial derivative of function twice variables to obtain
second partial derivative as
1-∂f/∂x = fx
2-∂f/∂y = fy
3- ∂/∂x (∂f/∂x) =∂2f/∂x2 = fx x
4- ∂/∂y (∂f/∂y) =∂2f/∂y2 = fyy
5- ∂/∂x (∂f/∂y) =∂2f/∂x∂y = fy x
6- ∂/∂y (∂f/∂x) =∂2f/∂y∂x = fxy
Note I
It is easy to extend the partial derivative of function of three
variables or more
∂/∂x (∂2f/∂y∂x) =∂3f/∂x∂y = fx y x
Theorem
If f (x, y) and it's partial derivatives fx , fy , fy x ,and fxy are
define in region containing a point (a, b) and are all
continuous at (a, b), then fy x = fxy.
2
Example1
Let f(x, y) = x2 -y2 +xy +7.
Then find fx , fy , fx x ,and fxy
Solution
fx= 2x + y
fy = -2y +x
fxy = 1.
Problem
1-Let f(x, y) = e-x siny + ey cosx +8
Then find fx , fy
2-Find fx and fy at point (1,3/2) if f = 4  x 2  y 2
3-If f(x, y) = x ey - sin(x/y) + x3y2 .
Then find fx , fy , fx x , Fyy and fxy
4-If U = x2y +arc tan(xz), then find Ux , Uy and Uz .
5-If V = x2 + y2+ z2+ Log(xz), then find Vx , Vy , Vz ,Vxy and
Vzz .
6-If f = xy, then find f x , fy .
7-Prove that
Uxy= Uy x
If
a-U = x siny + ycosx
b-U = x Lny
2-Chain Rule
1- Function of one variables
If y = f (x), and x = x (t), y = y (t) then
y
= y x
t
 x t
2- Function of two or three variables is
a- If Z = f(x, y), x = x (t), y = y (t) then
Z
=  Z  x + Z  y
t
x
t
y
t
b- If Z = f(x, y, w), x = x (t), y = y (t) , w = w (t) then
Z
=  Z  x + Z  y +  Z  w
t
x
t
y
t
w
t
Example2
Let f(x, y) = exy, x = rcosθ, y= r sinθ
Find f r and f , in term r and θ.
Solution
3
f
= f x +  f  y
r
x r  y  r
f
= yexy
x
f
= xexy
y
x
= cosθ
r
y
= sinθ
r
f
r
= yexy cosθ+ xexy sinθ
= 2r sin  cos  e r cos  cos 
= r sin 2 e r cos  cos  .
2
2
f

x

y

f

=
f x
x  
y
y 
+ f
= -r sinθ
= rcosθ
= yexy (-r sinθ)+ xexy (rcosθ)
=  r 2 sin 2  e r cos  cos  + r 2 cos 2  e r cos  cos 
= r 2 e r cos  cos  (cos 2   sin 2  )
= r 2 cos 2 e r cos  cos  .
Problem
Find ft, in the following function
1- f(x, y) = x2 - y2, x = et, y= 2 t-6
2- f = x2 - xy2, x = cos t, y= e-t
3- f = y/x, x = ln t, y= cot t
4- f = exyln( x - y), x = t3 , y= 2 t- t3
5- f = x  y , x = sin-1t, y= sint
2
2
2
2
6- f =
x
,
x y
x = cosh t, y= sinh t
7- f = sin(x+ y - z), x = sin t, y=
8- f =
x
tan  1 ( ) ,
y
et
2
, z = ln t
x = et cos t, y= et sin t
4
9- f = x , x = et, y= 2 t-6
y
Find U x , U y and U z, in the following function
10- U = tanh  1 ( r ) , r = x sin yz, s= x cos yz
s
11-U = ln( r+ s + t)if, r = xy, s= x z, t= y z
3- The Total Differential
The total differential of function
W = f(x, y, z),………………………………..(1)
Is defined to be
dw = f dx +
x
f
dy
y
+ fz dz
Or
dw = fx dx + fy dy + fz dz
In general the total differential of function
W = f(x, y, z, u,………..,v) is defined by
dw = fx dx + fy dy + fz dz+ fu du+…….+ fv dv
where x , y, z, u…….and v are independent variables.
But if x, y and z are not independent variabl but are them can
selves given by
x = x (t), y = y (t), z = z (t),
then we have
dx = x dt , dy = y dt, dz= z dt.
t
t
t
Or in the form:x = x(r, s), y= y(r, s), z = z(r, s).
Then we ha
dx = x dr+ x ds
r
y
r
z
r
s
y
s
z
s
dy = dr+ ds
……………………..(2)
dz = dr+ ds
Then (1) become in case
W = f(x, y, z) = f(x(r, s), y(r, s), z(r, s))
= f(r, s).
Then from (2) and (3) we obtain:dw = wx dx + wy dy + wz dz
dw =[ xr dr+ xs ds ]
w
x
+ [ yr dr+ ys ds
5
]
w
y
+[ zr dr+ zs ds]
w
z
=[ wx
x
r
+ wy
y
r
+ wz
z
r
] dr+ [ wx
x
s
+ wy
y
s
+ wz
z
s
]ds…….(4)
Example3
Find the total differential of function
W = x2 + y2+ z2 if
x = r coss, y= r sins and z = r
Solution
dw = wx dx + wy dy + wz dz
= 2xdx + 2y dy + 2z dz
dx = x dr+ x ds, or
r
s
dx = xr dr + xs ds =cossdr - r sins ds
dy = yr dr + ys ds = sins dr + rcossds,
dz = zr dr + zs ds = dr.
Now dw = 2x[cossdr - r sins ds] + 2y [sins dr + rcossds]
+ 2r [dr.]
= 2 rcoss [cossdr - r sins ds] + 2 r sins [sins dr +
rcossds] + 2r [dr.]
dw = 2[rcos2s]dr - r sins ds] + 2y [sins dr + rcossds]
+ 2r [dr.]
= 2 [rcos2s + r sin2s +r] dr + 2 [-r2 sins coss+ r2 sins
coss ] ds + 2r dr.],
dw = 4r dr].
Problem
If U = f(x, y) Find dU, in the following:1- U = 2Lnx + Lny2 if, x = e-t, y= et.
2- U = tan-1x + = 1  y 2 if, x = t2, y= t-1.
3- U = sin(x+ y) +cos xy, , x = π +2t, y= π-4t.
4- U = x2 + y2+ 6xy, x = 3t-1, y= 4t-3.
5- U =
x
,
y
x = sech t, y= coth t.
6- U = tanh  1 ( r ) , r = x sin yz, s= x cos yz
s
7-U = ln( r+ s + t)if, r = xy, s= x z, t= y z.
8- If f(x, y) = xcosy+y ex. Prove that fy x = fxy.
9- If f(x, y) =
x
tan  1 ( ) .
y
Prove that fx x + fyy. = 0
10- If f(x, y) = e-2y xcos2x. Prove that fx x + fyy. = 0
6
11- If
12- If
13- If
14- If
W= sin(x+ ct). Prove that Wtt = c2 W x x.
W= cos(2x+ 2ct). Prove that Wtt = c2 W x x.
W= Ln(2x+ 2ct)+ cos(2x+ 2ct). Prove that
Wtt = c2 W x x.
W= tan(x- ct). Prove that Wtt = c2 W x x.
7
CHAPTER TWO
Differential Equations (d.e)
Introduction:Definition 1.1
Differential Equations (d.e)
If y is a function of x, where y is called the dependent variable and x is
called the independent variable. A differential equation is a relation
between x and y which includes at least one derivative of y with respect
to (w.r.to) x. Which has two types:1- Ordinary d.e.
If (d.e) involves only a single independent variable this derivatives
are called ordinary derivatives, and the equation is called ordinary
(d.e).
2- Partial d.e.
If there are two or more independent variables derivatives are
called partial derivatives, and the equation is called partial (d.e).
For example
(a)
d3y
dx 3
2
3
2
(b) ∂ u/∂x
(c)
d2y
dx 2
3
dy
 y  2e x
dx
+ ∂2u/∂y2 = 0
df
+x = sinx
dx
(d) y˝΄- 3 y˝ + y = 0
The Order of (d.e)
Is that the derivative of highest order in the equation for example (a)
order 3 (b) order 2 (c) order 1 (d) order 3?
Solution of Differential Equations
Any relation between the variables that occur in (d.e) that satisfies the
equation is called a solution or when y and it's derivatives are replace
through out by f(x) and it's derivatives for example
Show that y= acos2x +bsin2x, of derivative a solution of (d.e)
y˝ + 4y = 0 …………………………………………………….. (1),
Where a and b are arbitrary constant.
Solution
Since y= acos2x +bsin2x,
y ΄ =-2asin2x + 2bcos2x
y˝
-4acos2x -4bsin2x, put y and y˝ in (1)
-4acos2x -4bsin2x + 4(acos2x +bsin2x) =0
8
0 =0, then this solution called the general solution.
Exercises
Show that each equation is a solution of the indicated (d.e)
(1) y˝΄ = y˝ where y = c1+ c2x+ c3ex
(2) x y˝+ y ΄ =0 where y = c1lnx+ c2
(3) y˝+9 y = 4cosx
where 2y = cosx
2x
(4) y˝ -y = e
where y = e2x
2
(5) y˝ =2 y sec x where y = tanx.
First Order Differential Equations
The first order differential equation take in the form:M(x,y) dx+N(x,y) dy =0……………………………………(2)
Where M and N are functions of x and y or both.
To solve this type of (d.e), we consider the following methods:1-Variable Separable
Any (d.e) can be put in the form:f(x)dx +g(x)dx =0, or x and derivative of x in term and y derivative of y
in another term.
This equation called Variable Separable, this equation can be solve by
take the integral of two sides of this equation
∫ f(x)dx +∫g(x)dy =c, where c is arbitrary constant.
Example
Solve xdy=ydx
ydx-xdy=0
(ydx-xdy=0)
1
,
xy
dx dy

 0 , by integral of two sides
x
y
dx
dy
 x  y  c,
Lnx-lny=c,
ln
x
 c,
y
x
 e c  c1 ,
y
x
y .
c1
Problems
Solve the following differential equations:1- x(2y-3)dx +(x2+1)dy=0
2- x2(y2+1)dx +y
x 3  1 dy  0
9
34-
dy x-y
=e
dx
xy
dy
=1
dx
5- eysecxdx+cosxdy=0.
2-Homogeneous Differential Equation (H.d.e)
The differential equation as form
M(x,y) dx+N(x,y) dy =0,
Where M and N are functions of x and y is called (H.d.e) if satisfy the
condition
M (kx, ky) =knM(x, y)
N (kx, ky) =knN(x, y)
Where k is constant.
For example
1- (x2 -y2)dx + 2xydy=0
M = x2 -y2 , N =2xy
M(kx,ky) =(kx)2- (ky)2= k2x2 –k2y2 = k2(x2 –y2 )
k2(M)
N (kx,ky) =2 (k2xy)= k2(2xy )
k2(N).
The equation is (H.d.e).
3- Solve (x-y)dx +xydy =0
M = x -y , N =xy
M(kx,ky) =(kx)- (ky)= k(x –y )
k(M)
N (kx,ky) = k2 (xy )
k2(N).
The equation is not (H.d.e).
If the equation is homogeneous we can solve by the following
method:Put (H.d.e) in the form
dy
= f(y/x)………………………………………………… (3)
dx
Let v= y/x…………………………………………………. (4)
Put (4) in (3) 
dy
= f(v)…………………………………..(5)
dx
From (4)
y=xv, and
dy = xdv+vdx, divided by dx
10
dy
dy
dv
= f (v) from (5)
x
 v , since
dx
dx
dx
dv
dv
f(v)  x  v  f (v)-v  x
dx
dx
dv
dx
(f(v)-v)dx =xdv 

f (v )  v
x
dx
dv

 0 . Or
x v  f (v )
……………………………………………… (6)
dx
dv

0
x
f (v )  v
After solving replace v by y/x.
Example
Solve (x2 +y2) dx + 2xydy=0
Solution
Since this equation (H.d.e). Now
2xydy= - (x2 +y2)dx ,
dy
x 2  y2
=
,
dx
2 xy
put y=xv
dy
1  v2
x 2  x 2v 2
=
=
dx
2 x ( xv )
2v
1  v2
 f(v) = 
'
2v
dx
dv

0 ,
x v  f (v )
dx
dv

 0,
x
1  v2
v
2v
2vdv
dx

 0 , by integral both sides
x 1  3v 2
lnx + 1/3ln(1+3v2) = c,
lnx + 1/3ln(1+3y2/x2) = c
3 y2
 ln x 3 1 
x2
3
x
3
x2  3 y2
 c1
,
x
 c,
where c1  e c
x 2  3 y 2  c1
Problems
Solve the following differential equations:(1) 2xydx -(xy+x2)dy=0
(2) (x2+2y2+3xy)dx +x(x-2y)dy =0
11
(3) (12x2y -4y3)dx +x(3y2 -6x2)dy =0
(4) ( xey/x -yey/x)dx+ xey/xdy=0
(5) (3x+ xey/x-yey/x)dx+ xey/xdy=0
3-Exact Differential Equation
The differential equation as form
M(x,y) dx+N(x,y) dy =0………………………………….……..(7)
There is function
f(x,y)=c………………………………………………….……...(8),
Which a solution of (7).
df(x,y)=0……………………………………………….………..(9).
From total partial differential equation
df(x,y)= ∂f/∂x dx + ∂f/∂y dy…………………………………(10).
From 7,8,9 and 10,
∂f/∂x =M
………………………………………………... (11)
∂f/∂y = N
Now
∂2f/∂y∂x = ∂M/∂y, ∂2f/∂x∂y = ∂N/∂x,
Since ∂2f/∂y∂x = ∂2f/∂x∂y
∂M/∂y = ∂N/∂x, ……………………………………………………. (12).
Which condition of exact?
To solve equation (7) we must find f which the solution of equation (7).
∂f/∂x =M from (11),
∂f =M ∂x,
f= ∫ M ∂x + A(y) ………………………………………………….(13),
Where A(y) is function of y.
We must find A(y)
∂f/∂y = N = ∂/∂y [∫ M ∂x]+ A΄ (y), since ∂f/∂y = N, from (11),
 A΄ (y) = N-∂/∂y [∫ M ∂x]
 A (y) = ∫{N-∂/∂y [∫ M ∂x]}+c………………………………..(14)
Now put (14) in (13) which complete solution.
Example
Solve the following differential equation
dy xy 2  1
=
dx 1  x 2 y
Solution
(1- x2y)dy – (xy2 -1)dx =0,
N= 1- x2y , M = 1– xy2 ,
∂M/∂y = ∂N/∂x = -2xy,
∂f/∂x = M,
f= ∫ M ∂x + A(y) = ∫ (1– xy2) ∂x + A(y)
12
f= (x– (x2 y2)/2 + A(y)…………….(*)
(we must find A(y),
∂f/∂y = - x2y + A΄ (y) = N= 1- x2y
 A΄ (y) =1,
A(y) = y+c put in (*)
F= (x– (x2 y2)/2 + y+c.
Problems
Solve the following differential equations:(1) (2x + y)dx +(x + y)dy=0
(2) (3x - y)dx - (x-y)dy =0
(3) (cosx+y)dx +(2y + x)dy =0
(4) ( yex +y)dx+ (x + ex )dy=0
(5) tany dx+ x sec2y dy=0.
Integrating Factor
If the equation
M dx+N dy =0.
Is not exact, then there is  such that
 M dx+  N dy =0……………………………………………….(*)
Is exact then
∂ (  M)/∂y = ∂ (  N)/∂x.
To find  (  is called integrating factor).
Theorem I
(i)
M N

y x
 f (x) (function of x, or constant.
If
N
Then  = e∫
(ii)
f(x)dx
.
N M

x y
If
 g ( y ) (function of y, or constant.
M
Then  = e∫ g(y)dx.
(iii) If  is function of x and y, then there is no general method
to find  (integrating factor).
Example
Solve the following differential equation
ydx +(3+3x -y)dy=0
Solution
M=y, N= 3+3x –y.
My = 1  Nx =3, not exact
13
Nx  M y

M
3 1 2
 , is function of y
y
y
Then  = e∫
 =
g(y)dy
2
e
 y dy
 e 2 ln y  y 2
(ydx +(3+3x -y)dy=0) y2
y3dx +(3 y2+3x y2 -y3)dy=0
M= y3, N= 3 y2+3x y2 -y3.
My = 3 y2=Nx =3 y2 exact
∂f/∂x = M,
f= ∫ M ∂x + A(y) = ∫ (y3) ∂x + A(y)
f= y3x+ A(y)……………. (*)
We must find A(y),
∂f/∂y = 3xy2+ A΄ (y) = N= 3 y2+3x y2 -y3
2
3
 A΄ (y) =3 y -y ,
A(y) = y3 -y4/4 +c put in (*)
f= y3x+ y3 -y4/4 +c.
Example
Solve the following differential equation
dy
=x-y
dx
Solution
dy= (x-y)dx
(x-y)dx-dy=0
M=x-y, N= –1.
My = -1  Nx =0, not exact
M y  Nx
N
1 0
 1, is function of x
1
dx
= e∫ f(x)dx = e   e x

Then 
((x-y) dx-dy=0) ex
ex (x-y)dx- ex dy=0
M= xex-y ex, N= -ex.
My = -ex =Nx =- ex exact
∂f/∂x = M,
f= ∫ M ∂x + A(y) = ∫ (xex-y ex) ∂x + A(y)
f= xex -ex -y ex + A(y)……………. (*)
We must find A(y),
∂f/∂y = -ex + A΄ (y) = N= -ex
 A΄ (y) =0,
A(y) = c put in (*)
f= xex -ex -y ex +c.
14
4- First – Order Linear Differential Equation
If the equation as form:dy
+P(x) y = Q(x)……………………………………………… (15)
dx
Where P and Q are functions of x.
To solve equation (15), we must find (I) where
I= e∫ pdx { I is integrating factor}.
Now multiple both sides of (15) by I
dy + Py dx = Q dx…………………………………………………(15)
e∫ pdx { dy + Py dx = Q dx }
e∫ pdx dy + e∫ pdx Py dx = e∫ pdx Q dx }
d [ye∫ pdx ]=Q e∫pdx dx………………………………………………(16)
by integrate (16)
ye∫ pdx = ∫Q e∫pdx dx +c,
Which the solution of (15), or the solution is
Iy = ∫IQ dx +c
Example
Solve the following differential equation
dy
y
+ =2
dx
x
Sol
Since P =1/x, Q = 2
I= e∫ pdx = I= e∫ dx/x = e lnx = x.
The solution
Iy = ∫IQ dx +c
xy = ∫2x dx +c,
xy = x2 +c
y =x + c/x
Problems
Solve the following differential equations:(1)
y΄ + 2y= ex
(2) xy΄ +3y =x2
(3)
y΄ + ycotx = cosx
(4) x y΄ +2y = x2-x +1
(5)
y΄ -y tanx =1.
4.1The Bernoulli Equation
The equation
dy
+P(x) y = Q(x) yn ……… (*), if n  1.
dx
Is similar to L-equation is called Bernoulli Equation.
We shall show how transform this equation to linear equation. In fact we
must reduce this equation to linear, product (*) by (y-n) or
15
dy
+P(x) y = Q(x) yn] y - n
dx
dy -n
y +P y1-n = Q …………………. (**).
dx
Let w = y1-n  dw = (1-n) y – n dy or
[
dw
= y – n dy put in (**)
1 n
dw
+P y1-n = Q,
(1  n)dx
or
Which is L-equation
dw
+ (1-n)P w = (1-n) Q
dx
Example
Solve the following differential equation
dy
y
+ =y2
dx
x
Sol
[
dy
y
+ =y2] y -2
dx
x
dy -2
y +
dx
y 1
= 1…………. (#),
x
Let w = y -1  dw =- y -2 dy
-dw = y -2 dy, put in (#)
dw
+
dx
dw w
dx x
1
P=x
-
w
=1
x
= -1.
,
Q = - 1,
I= e∫ pdx = I= e-∫ dx/x = e -lnx =
The solution
Iw = ∫IQ dx +c,
1
.
x
1
w
= ∫ - dx +c,
x
x
16
1
w
= - lnx + c,. Since w = y -1 =
y
x
1
= - lnx + c,
xy
1
y=
.
x (c  ln x)
Problems
Solve the following differential equations:(1)
y΄ - 2y/x = 4x y2
(2) y΄ +y/x =x y2
(3)
y΄ + y = y3 e2x sinx
(4) y΄ + 2y/x = 5 y2/x2
(5) x y΄ +y = y2.
Second – Order Differential Equation
Special Types
Certain types of second order differential equation
such that
F(x, y,
dy d 2 y
,
)…………………………………………………(17)
dx dx 2
Can be reduced to first order equations by a suitable of variables:Type I
Equation with dependent variable when equation as form
F(x,
dy d 2 y
,
)……………………………………………..……(18)
dx dx 2
It can be reduced to first order equation by suppose that:dy
,
dx
p=
d2y
dx 2
=
dp
dx
Then equation (18) takes the form
F(x, p,
dp
) =0,
dx
Which is of the first order in p, if this can be solved for p as function
of x says?
p = q(x,c1).
Then y can be found from one additional integration
y=∫
(
dy
) dx +c=∫ p dx +c =∫ q(x,c1 ) dx +c.
dx
Type II
Equation with independent variable when equation (17) does not
contain x explicit but has the form
17
F(y,
dy d 2 y
,
)=0…………………………………………..……(19)
dx dx 2
The substitution to use are :p=
d2y
dy
,
dx
dx
=
2
dp dp dy
dp
=
.
=
p
dx dy dx
dy
The equation (19) become
F(y, p, p
dp
) =0,
dx
Which is of the first order in p. Which solution gives p in terms of y,
and then further integration gives the solution of equation (19).
Example 1
Solve the following differential equation
d2y
dx
+
2
Let
dy
=0…………………………………..……………. (*)
dx
p=
dy
,
dx
d2y
dp
p, put in (*)
dy
=
dx 2
dp
p +p =0, ÷ p
dy
dp
+1 =0,
dy
dp +dy =o. by integration
p+y = c1
dy
+y = c1
dx
dy
= c1 - y
dx
dy
= dx  -ln(c1 –y) =x+c2
c1  y
ln(c1 –y) = -x+c2  c1 –y = e  x  c1 = ce-x
y = c1 - ce-x
Example 2
Solve the following differential equation
X2
d2y
dx
2
d y
dx
2
Let
+x
2
+
p=
dy
=1
dx
1 dy
= 1/x2……………………………………………. (**)
x dx
dy
and
dx
d2y
dx
2
=
18
dp
, put in (**)
dx
dp
dx
+
1
p = 1/x2 , which linear in p,
x
I= e∫ pdx = I= e∫ dx/x =x.
Ip = ∫IQ dx +c  Ip = ∫x(1/x2 ) dx +c = lnx+c
 xp =lnx +c
P = (lnx)/x + c/x
Let
dy
= (lnx)/x + c/x
dx
dy= [(lnx)/x]dx +( c/x)dx,
y = (lnx)2/2 + c lnx +c1
Problems
Solve the following differential equations:(1) y˝ +y΄ = 0
(2) y˝ +y y΄ = 0
(3) x y˝+ y΄ =0
(4) y˝ -y΄ = 0
(5) y˝+ w2y=0 , where w constant  0.
Homogeneous-Second – Order (D. E) With Constant Coefficient
Consider linear equation with constant coefficient which in the
form:y˝ +a y΄ +by=0……………………………………………… (20)
where a, b are constant.
How to solve this equation we shall now find how to determine m
such that
y= emx is a solution of (20) then
y΄ = memx and y˝ =m2emx, put in (20)
2 mx
m e +a memx +bemx =0
emx (m2 +a m+b) =0,
since emx  0, then
m2 +a m+b =0………………………………………………. (21).
Which called characteristic equation.
Then we saw that emx is a solution of (20)  m is root of (21).
Note
The general solution of (20), there is three cases:Case i
If m1 =m2 in equation (21), the solution of (20) (homogeneous
equation ) is
yh= (c1 + xc2) emx
Case ii
If m1  m2 in equation (21), the solution of (20) (homogeneous
equation ) is
yh= c1e m1 x  c2e m2 x
19
Case iii
If m1 and m2 roots ( m=  + i where i=  1 ) in equation (21),
the solution of (20) (homogeneous equation ) is
yh= ex (c1 cos  x  c2 sin  x )
Ex i
Solve y˝ +4y΄ +4y=0…………………………………………..(*)
Sol
let
y= emx , y΄ = memx and y˝ =m2emx, put in (*)
m2emx +4 memx +4emx =0
emx (m2 +4 m+4) =0,
since emx  0, then
m2 +4 m+4 =0
Which called characteristic equation?
(m+2)2 =0  m1 =m2 = -2, the solution of (*) is
yh= (c1 + xc2) e-2x
Ex ii
Solve y˝ +y΄ -6y=0…………………………………………..(**)
Sol
let
y= emx , y΄ = memx and y˝ =m2emx, put in (*)
m2emx + memx -6emx =0
mx
e (m2 + m-6) =0,
since emx  0, then
m2 +m-6 =0
This called characteristic equation
(m+3)(m-2) =0  either m1 = -3 or m2 =2, the solution of (**) is
yh= c1 e-3x + c2 e2x
Ex iii
Solve y˝ -4y΄ +5y=0…………………………………………..(**)
Sol
let
y= emx , y΄ = memx and y˝ =m2emx, put in (*)
m2emx -4memx +5emx =0
emx (m2 -4 m+5) =0,
since emx  0, then
m2 -4m+5 =0
This called characteristic equation
4  16  20 4   4

,
2
2
 =2,  =1,
m2 = 2  i   + i ,
m1 =
yh= e2x (c1 cosx + c2 sinx).
20
Non-Homogeneous-Second – Order (D. E) With Constant
Coefficient
Consider the equation which in the form:y˝ +a y΄ +by= f(x)…………………………………………… (22)
where a, b are constant.
To find the general solution of (22). We find solution of
homogeneous part
y˝ +a y΄ +by=0……………………………………………… (23),
let yh be solution of (23).
Then the solution of (22) take by added the solution yh to any another
special solution yp of (22)such that the general solution of (22)
become
y (x) =yh + yp
Method of Undetermined Coefficient
The condition of this may that the form f(x), may be guessed for
example f(x) may be a single power of x a polynomial an exponential
function a sin, coin or sum function.
The general solution of (non- H. D.E) become.
y (x) =yh + yp.
We student to find yh .We can select yp from the following table.
Table 1
f ( x)
kx
yp
mod
n
k n x n  k n 1 x n 1  .........  k1 x  k 0
(n  1,2,.........)
ke px
k sin x
k cos x
k n ,......, k1 , k 0 are cons tan ts
ce px , c cons tan t
m cos x  n sin x
m and n cons tan t
How to use the table to find yp:(a) If f(x) function of first column of table, then we take yp from
second column which corresponding it.
(b) If f(x) is sum of two function of 1-st column then we selected yp
sum of function of 2-th column which corresponding.
(c) If the number of f(x) is root of yh we must modify the solution of
yp,
21
0
p
i
Modification Rule
If the number listed in the table 1 the last column root of yh (H-part)
of equation (23).
Then the function in second column of table must be multiplied by xm
where m is the multiplicity of the root in that equation [hence for a
second –order equation m may be equal 1 or 2].
Example1
By use table 1 write yp where
(a) f(x)= 2x3
(b) f(x)= 3e2x
(c) f(x)= 4sin2x
(d) f(x)= cos  x +sin  x
(e) f(x)= e3x +x
Sol
(a) yp = k3 x3 + k2 x2 + k1 x +k0
(b) yp= ce2x
(c) yp = m cos  x +nsin  x
(d) yp = m cos  x +nsin  x
(e) yp= ce3x +k1 x +k0
Example2
Find the general solution of the following (d.e)
y˝ -4y= 8x2………………………………………………….(*)
Sol
y˝ -4y= 0…………………………………………………….(**)
let
y= emx , y΄ = memx and y˝ =m2emx, put in (**)
m2emx - 4emx =0
emx (m2 - 4) =0,
since emx  0, then
m2 - 4 =0
This called characteristic equation
m2 =4  m =  2, ( or m1 = 2, m2 = -2;
yh= c1 e-2x + c2 e-2x ,
yp = k2 x2 + k1 x +k0, we must find k2 , k1 and k0
yp = k2 x2 + k1 x +k0, yp΄ = 2k2 x + k1 and yp˝ = 2k2 put in (*)
2k2 -4(k2 x2 + k1 x +k0)= 8x2
-4k2 =8, 2k2 -4k0=0
k2 =-2, k1 = 0, k0=-1
yp = -2 x2 -1
y (x) =yh + yp
y (x) = c1 e-2x + c2 e-2x -2 x2 -1.
22
Variation of Parameter
Consider the equation which in the form:y˝ +a y΄ +by= f(x)…………………………………………… (24)
Where a, b are constant, f(x) be any function of x.
To solve (24)
(a) Find yh (solution of (H-part),
yh = c1 u1 + c2 u2………………………………………………(25)
Where c1 and c2 are arbitrary constant, and u1 and u2 are two
function as form:let emx or xemx ex cos  x or ex sin  x ) , which solution of (H-part).
(b) We replace c1 and c2 by function of x say v1 and v2 then (#)
become
yh = c1 v1 + c2 v2……………………………………………..(26),
Which solution of (24),
yh΄= v1u΄1 v΄1 u1 + v2 u΄2 + v΄2 u2
yh΄= (v1u΄1 + v2 u΄2 )+ (v΄1 u1 + + v΄2 u2)…………………….…(27),
from this
yh΄= v1u΄1 + v2 u΄2,
and
v΄1 u1 + + v΄2 u2=0………………………………………………..(28)
Now
yh˝ = v΄1 u΄1 + v1u˝ 1 + v΄2 u΄2 + v2 u2˝
(c) Now put yh, yh΄ and yh˝ in (24)
v΄1 u΄1 + v1u˝ 1 + v΄2 u΄2 + v2 u2˝ + a[v1u΄1 + v2 u΄2 ]+ b[c1 v1 + c2
v2]=f(x)
v1 [u1˝ +a u1΄ +b u1] + v2[u2˝ +a u2΄ +b u2]+ v΄1 u΄1 + v΄2 u΄2=f(x)
Since y˝ +a y΄ +by=0,
 u1˝ +a u1΄ +b u1=o, u2˝ +a u2΄ +b u2 =o, and
v΄1 u΄1 + v΄2 u΄2=f(x).
{the value in brackets vanish because by hypothesis both u1 and u2 are
solution of homogeneous equation corresponding to (24).
Then the equation (24) satisfy by equation
v΄1 u1 + v΄2 u2=0………………………………….................... (29)
v΄1 u΄1 + v΄2 u΄ 2=f(x)…………………………………………. (30).
(d) By solve (29) and (30) we find two unknown v΄1, v΄2 and we find
v1 ,v2 by integral.
(e) The general solution of (non- H. D.E) (24) is
Y(x) = v1 u1 + v2 u2
Example1
Find the general solution of the following (d.e)
y˝ -y΄-2y= e-x…………………………………………………. (*)
23
Sol
(1) Find the general solution of (H.d.e) y˝ -y΄-2y=0, or
m2 – m-2 =0,
(m-2)(m+1) =0 
yh= c1 e2x + c2 e-x ,
u1 = e2x, u2= e-x,
u΄1 = 2e2x, u΄ 2= -e-x
v΄1 u1 + v΄2 u2=0……………………#
v΄1 u΄1 + v΄2 u΄ 2=f(x)………………. ##
v΄1 e2x + v΄2 e2x=0……………………#
2v΄1 e2x- v΄2 e-x = e-x)………………. ##
v΄1 e2x = e-x  v΄1 =1/3e-3x  v1 = -1/9e-3x +c1,
2x
From (#)v΄1 e
= - v΄2 e-x, or v΄2 =- v΄1 e3x
v΄2 = -1/3 
v2 = -1/3x+c2
Since Y(x) = v1 u1 + v2 u2
Y(x) =(-1/9e-3x +c1)e2x + (-1/3x+c2 )e2.
Problems
Solve the following differential equations:(1) y˝ +4y΄ = 3x
(2) y˝- 4 y΄ = 8x2
(3) y˝- y΄ -2y =10cosx
(4) y˝ -4y΄ +3y = ex
(5) y˝ +y = secx.
Problems
Solve the following differential equations:1-x(2y-3)dx +(x2 + 1)dy=0
2- x2 (y2+1) dx +y
3- Sinx
x 3  1 dy =0
dx
+cosh2y = 0
dy
dy
=1
dx
x
dx
5- Lnx
=
dy
y
x2 1
y
6- ( xe dy+
dx=0
y
4-
2 xy
2
7- y 1  x dy + y  1 dx = 0
2
24
8- x2y
9-
dy
= (1+x) cscy
dx
dy
= ex-y
dx
10- ey secx dx + cosx dy = 0
(H. d. e)
11- (x2 + y2) dx +xydy = 0
12 - x2 dx + (y2 –xy)dy = 0
13 – x ey/x +y)dx –xdy = 0
14 –(x +y) dy +(x – y) dx = 0
15 -
dy
y
yx
=
+ cos (
)
dx
x
x
16- xdy-2ydx= 0
17- 2xydy +( x2 -y2)dx = 0
(Linear d. e)
dy
+ 2y = e-x
dx
sin x
19- x y΄ +3y =
x2
18-
20- 2 y΄- y =ex/2
21- xdy+ ydx = sinx dx
22- xdy +ydx = ydy
23- (x-1)3 y΄ + 4 (x-1)2 y =x+1
24- Coshx dy+ (y sinhx+ ex) dx=0
25- e2y dx +2(x e2y –y)dy = 0
26 – (x-2y) dy + y dx = 0
27 – (y2 +1) dx+ (2xy + 1) dy = 0
(Exact d. e)
Use the given integrating factor to make (d. e) exact then solve the
equation
28 - (x+2y) dx – x dy = 0,
29 – y dx + x dy = 0 ,
1
)
x3
1
1
) or (I =
)
(I =
xy
( xy ) 2
(I =
Solve (exact d. e)
30 - (x + y) dx + (x+y2) dy = 0
31 – ( 2xey +ex) dx + (x2 +1) ey dy = 0
32 – ( 2xy + y2)dx + (x2 + 2xy – y )dy = 0
25
33- (x+
xy
y 2  1 )dx – (y-
)dy =0
2
y 1
3
34- x dy+ y dx+ x dx =0
35- x dy- y dx = x2 dx
36- (x2 +x-y) dx +xdy = 0
37- (ex +lny +
y
x
) dx +( + lnx +siny) dy =0
x
y
y2
38- (
- 2y) dx + (2y tan-1x – 2x + sinhy)dy =0
2
1 x
y  sin x
dx = 0
39- dy +
x
(Second- Order)
40- y˝ +2y =0
41- y˝ +5 y΄ +6y= 0
42- y˝ +6y΄ +5y= 0
43- y˝ - 6 y΄ +10y= 0
44- y˝ + y= 0
45- y˝ +y΄ x
46- y˝ +y= sinx
47- y˝- 2 y΄ +y= e-x
48- y˝ +2 y΄ +y= ex
49- y˝- y= sinx
50- y˝ +4 y΄ +5y= x+2.
51- y˝ - y= ex
52- y˝ +y= secx
53-y˝ +y= tanx
54-y˝ +y= cotx
26
CHAPTER THREE
Laplace Transformation (L. T)
Definition 2.1
Let f (t) be function of variable t which define on all value of
t such that (t >0).
The Laplace transformation of f (t) which written as L {f (t)} is

F(s) = L {f (t)} =  e  st f ( t ) dt ............................................................ (1)
0
Note 1
The Laplace transformation is define in (1) is converge to value
of s, and no define if the integral in (1) has no value of s.
Laplace Transformation of Some Function:Using the definition (1) to obtain the following transforms:1- If f(t) =1
Solution

L {f (t)} =  e
Since
0
 L (1) =
 st

1
1 0 1
I
f ( t ) dt =  e  st 0 =0+ e =
s
s
s
1
.
s
2-If f (t) = e at
Solution
Since

L {f (t)} =  e  st f ( t ) dt
0


L {f (t)} =  e  st e at dt = L {f (t)} =  e (a  s )t dt
0
0


=
e
( s  a )t
0
=

1  ( s  a )t I
e
dt = 
0
sa
1
sa
 l {e at }
=
1
sa
.
Note 2
Let f(t) be function and c constant then
(i)
L {cf (t)} = cL {f (t)}
(ii) L {f1 (t)  f2 (t)} = L {f1 (t)}  L {f2 (t)}
3-If f(t) = cos(wt)
4-If f(t) = sin(wt).
27
Solution
From Euler formula
e  iwt = cos (wt) + isin (wt).
L{ e  iwt } = L{ cos (wt)} + i L{sin (wt)}……………………(*).
But
l {e iwt } =
1
s  iw
1
s  iw
1
s  iw
=
=
 l {e iwt } =
s w

s
2
s w
s
2
, from (2)
+i
2
s  iw
s  iw
+i
2
=
s  iw
s2  w 2
w
2
s  w2
w
2
s  w2
, from (*)
L{ cos (wt)} + i L{sin (wt)}= l {e iwt } =
From this
3- L {cos (wt)} =
4- L {sin (wt)} =
s
2
s w
2
s
s2  w 2
w
s2  w 2
5-If f(t) = sinh (wt).
6-If f(t) = cosh (wt).
Solution
Since sinhx =
1 wt -wt
[ e – e ],
2
Now sinh (wt) =
L {sinh (wt)} =
1 x -x
[ e – e ], coshx =
2
1
{L ( ewt) – L( e-wt)},
2
=
1
1
{
2 sw
=
1
2
 L {sinh (wt)} =
2w
s2  w 2
w
s2  w 2
1
sw
=
}.
w
s2  w 2
, and
28
1 x -x
[ e + e ].
2
+i
w
2
s  w2
L {cosh (wt)} =
s
.
s2  w 2
Example 1
Find L{8-6e3t + e-4t +5sin3t+7cosh3t}
Solution
1
8
= .
s
s
6
L (6 e3t) = 6L ( e3t) =
s3
1
L ( e-4t) =
s4
L(8)= 8L(1)= 8
3
L {5sin (3t)} = 5L {sin (3t)} = 5
2
L {7cosh (3t)} = 7L {cosh (3t)} =
s 9
7s
=
15
2
s 9
s2  9
Laplace Transformation of Differential
Theorem_:If f(t)is continuous function of exponential on [o,  ) whose
derivative is also exponential then the (L.T) of f ΄(t) is given by formula

L {f ΄ (t)} =  e  st f ´ t  dt
0
Proof
∫udv = uv-∫vdu.
Let u= e  st  du =-s e  st dt,
dv = f ΄ (t) dt  v =f(t),



e
 st
f ´ t  dt = e
 st
0

f ( t ) I0

+  s e  st f ( t ) dt
0

=o- e0f(0) +s  e  st f ( t ) dt
0
= -f(0) + s L{f(t)}.

Where s  e  st f ( t ) dt = s L {f (t)}.
0
 L {f ΄ (t)} = s L {f (t)} – f (0).
Corollary
If both f(t) and f ΄ (t) are continuous functions of exponential
order on [o,  ) , and if f ˝(t) is also exponential then :29
L {f ˝ (t)} = s2 L {f (t)} – s f (0) - f ΄ (0)
Proof
L{ f ˝(t)} = L {f ΄ (t)}΄ = sL {f ΄ (t)} - f ΄ (0)
= s [s L {f (t)} – f (0)] - f ΄ (0)
= s2 L {f (t)} – s f(0) - f ΄ (0) .
Now in general
L { fn (t)} = sn L {f (t)} – sn-1 f(0) ----------- fn-1 (0).
Problem
Prove that
n!
L {tn} =
s
n1
, where n=1, 2, 3, ……….., and n!= n(n-1)(n-2)…..(n-n).
And 0! =1.
Properties of L. T
(1) Shifting
If L {f (t)} = f(s) = L{ e at f(t)} f(s-a)
Example
Find L{ e-4tcos3t}
Solution
f(t) =cos3t, a=-4, then f(s) = L {f (t)}= L{ cos3t} =
L{ e-4tcos3t} =
s  (  4)
2
( s  ( 4))  9
=
(2) L. T of Integrals:
t
L {  f (u) du} =
0
f ( s)
s
Example
t
Find L
{  sinh2tdt}
0
Solution
30
s4
( s  4) 2  9
s
2
s 9
F (u) = L{sinh2t} =
=
2
2
t
, L {  sinsh2tdt}=
s2  4
0
.
2
s ( s  4)
(3) Multiplication by tn
If L {f (t)} = f(s), then
L {tn f (t)} = (-1)n
d n f ( s)
ds n
Example
2 3t
Evaluate L {t e }
Solution
f(t)= e3t
L ( f(t)) = L ( e3t) =
f ΄(s)= ∂f/∂s =
1
=f(s)
s 3
1
( s  3)2
2
f ˝(s) = ∂2f/∂s2 =
L {t2 e3t } = (-1)2
( s  3)3
2
( s  3)3
=
2
( s  3)3
(4) Division by t
If L {f (t)} = f(s) , and t lim

 0
L{
f (t )
}=
t


f (t )
exist
t
f(u)du
s
Example
Evaluate
sin t
L{
}
t
Solution
lim
 0
t 
sin t
= 1, exists.
t
 L{sint} =
f(t) = sint 
1
2
s 1
=f(s)
31
2
s2  4
s
 f(u)=
L{
1
2
u 1
f (t )
sin t
}= L {
}=
t
t
-1


s
1
2
u 1
du = tan-1u

I
s
= tan-1  - tan-1s
= Π/2 - tan s.
Example
Let f(t) =2cos3t.
Find
L {f ˝ (t) }
Solution
L {f ˝ (t)} = s2 L {f (t)} – s f (0) - f ΄ (0)
f(t) =2cos3t, f(0)=2cos(0)=2, f ΄ (t) = -6sin3t , f ΄ (0) = -6sin(0)=0 ,
s
L {f (t)}= L{ cos3t} =
s2  9
,
L {f (t)}= L{2 cos3t} = 2L{ cos3t} =
L {f ˝ (t)} = s2 [
=
L {f ˝ (t)} =
2s
s 9
=f(s).
] – s [2] - 0
2
s 9
3s
2s
2
-2s
s2  9
 18s
.
s2  9
Unit Step Function ua (t)
Definition 2.2
The unit step function is defined by:0 when t < a
ua (t) =
1 when t > a
If a=0, then
0
u0 (t) =
1
when t < 0
When t > 0.
If a=2, then
0
U2 (t) =
1
when t < 2
when t > 2
Definition 2.3.1
32
To find Laplace Transformation of unit step function (L { ua
(t)}) is defined as :Since
ua (t) =

L
{ ua (t)} =
 e
0
when t < a
1
when t > a
 st
0
a
= e
 st
0
 L { ua (t)} =

f (t ) dt =  e  st u a (t ) dt
0

(0) dt   e
a
e
 st
1
(1) dt =  e  st
s

I
a=
-
1
[0 – e-sa ] =
s
 sa
s
.
Definition 2.3.2
To find the terms of the unit step function is defined by:1 when 0<t < 1
f(t) =
2 when 1<t < 2
-1 when 2<t < 3.

f(t) = 1[u0 – u1] + 2[u1 – u2] - 1[u2 – u3]
= u0 – u1 + 2u1 – 2u2 - u2 +u3

f(t) = u0 + u1 – 3u2 +u3
Problem
Find Laplace Transformation of f (t) which defines in
(Definition 2.3.2).
Solution
Since f(t) = u0 + u1 – 3u2 +u3
 L{f(t)} = L{u0(t)} + L{u1(t)} – 3 L{u2(t)} +L{u3(t)}
e  s (0) e  s
e 2 s
e 3 s
+
-3
+
=
s
s
s
s
33
1
= +
s
es
e 2 s e 3 s
-3
+
.
s
s
s
L. T of Periodic Functions
If f (t) is Periodic function of period T>0 satisfy such that
f(x+T) = f(x), then
T
 st
 e f (t )dt
L {f (t)} =
0
1  e  sT
Gamma Function
Definition 2.4
If (n >0), then the gamma (n) becomes:
 (n)=  t n 1e t dt ………………………………………………………….( )
0
Important Properties of gamma function
(i)  (n+1) = n  (n)
ii)  (n+1) = n!
(iii)  (
1
) =  (Π)
2
Table I
Some elementary function f (t) their Laplace Transforms L {f (t)} = f(s).
34
f (t )
1
L{ f (t )}  f ( s)
1
s
1
1
2
t
3
2
s2
2!
t
s3
n!
n
4
t , n  1,2,3,...
s n 1
5
eat
1
sa
s
6
cos wt
2
s  w2
w
7
sin wt
2
s  w2
s
8
cosh at
9
sinh at
10
y(t )
11
y(t )
s2  a2
a
2
s  a2
sL{ y (t )}  y (0)  sf ( s)  y (0)
s 2 L{ y (t )}  sy (0)  y(0)  s 2 f ( s)  sy (0)  y(0)
f (s)
t
12
 f (u)du
0
n
s
(1) n  n f ( s)
13
t f (t )
s n
14
t n (npositive)
(n  1)
s n 1
35
Problems
Find Laplace transform (f(s)) of the following functions :1- f(t) = sin2 t
4 3t
2- f(t) = t e
-t
3- f(t) = e cosh 3t
4- f(t) =
sinh t
t
= t2 e3t
= 3t+4
= t2 +at +b
= ( a+bt)2
= t e-t
= (e2t -4)2
= t eatsinat
= cosh at cos at
0 when 0<t < 2
13-f (t) =
4 when 2<t.
5- f(t)
6- f(t)
7- f(t)
8- f(t)
9- f(t)
10- f(t)
11- f(t)
12- f(t)

14 -Prove that
t e
 3t
sin t dt 
0
3
50
15- Prove that
as  b
s2
s2  a2
(b) = L {t cos at} = 2
,
2 2
(s  a )
(a) = L {a+bt} =
Inverse Laplace Transformation
If L {f (t)} = f(s). Then we call f(t) is
the inverse of (L. T) of function f(s) and which written as:
f(t) = L-1{f(s)}, for example
L ( e3t) =
1
s 3
=f(s).
L-1{f(s)} = L-1{
1
s 3
} = e3t.
Some Properties of Inverse L. T
36
We see the L. T of first (9) in table I, we can inverse there Laplace to find
inverse of this for example
L(1) = f(s)=
1
,
s
1
} =1,
s
L-1{f(s)} = L-1{
Example1
5
s3
Find f (t), if f(s) =
Solution
f(t) = L-1{
5
s 3
Example1
} = 5L-1{
1
s 3
} = 5 e-3t
s 1
Find f (t), if f(s) =
s2  1
Solution
f(s) =
s
+
2
s 1
f (t) = L-1{
1
2
s 1
s
,
} + L-1{
2
s 1
= cost + sint.
1
},
2
s 1
Partial Fraction
If we want to find the inverse transform of a rational function as
f ( x)
, where f and g
g ( x)
are polynomials which the degree of f less than degree of g then.
We can take advantage of partial transform is easily found as see in examples:Example1
1
Find the inverse Laplace transform (f (t)), if f(s) =
2 2
s ( s  1)
Solution
f(s) =
1
2
,
s ( s 2  1)
1
A B
=

2 2
s s2
s ( s  1)
+
Cs  D
s2  1
,
1= As3 +Bs2 + As + B + Cs3 +Ds2,
B =1,
B+D =0,
A+ C =0,
 A=0 
 C=0,
D = -1 
1
1
1
=
2 2
2
2
s ( s  1)
s
s 1
,
37
1
f (t) = L-1{
2
2
s ( s  1)
} = L-1{
1
s
} - L-1{
2
1
2
s 1
},
= t2 – sint.
Example2
Find the inverse Laplace transform (f (t)), if f(s) =
s 1
2
s s6
Solution
f(s) =
s 1
2
s s6
=
s 1
( s  3)( s  2)
=
A
B

.
s3 s2
S+1 =As - 2A + Bs + 3B,
-2A +3B = 1,
A+B =1,
-2A +3B = 1
2A + 2B = 2 +
 B =3/5, A = 2/5,
5B=3 
f (t) = L-1{ F(s} = 2/5L-1{
= 2/5 e-3t +3/5 e2t
1
1
} - 3/5L-1{
},
s3
s2
Problems
Find f(t) { the inverse Laplace transform} of the following:(1) f(s) =
(2) f(s) =
(3) f(s) =
(4) f(s)=
(5) f(s) =
(6) f(s) =
1
2
s 1
,
1
2
s ( s 2  1)
,
s2  6
s 3  4s 2  3s
1
s ( s 2  4)
,
,
4
3s
2
s  2 s  16
+
5
2
s 4
1
,
s3
38
,
1
(7) f(s) =
2
s 9
2s  3
(8) f(s) =
s2  9
(9) f(s) =
,
,
s3
2
s s6
.
Application of Laplace Transformation
Linear (D. E) With Constant Coefficient
To solve L- non homogeneous (d. e) of order n with constant
coefficient.
We use same way as second- order (d. e) as form :a0 y˝ + a1 y΄ + a2 y= f(x)…………………………………… … (*)
Where a0, a1 and a2 are constant, which satisfy initial
condition:
y(0)= A and y΄ (0) =B……………………………………………(**)
Where A and B are choice constant.
Example1
Find the solution of the following (d.e) by (L. T)
y˝ + 3 y΄ + 2 y=0……………………………………………… (*)
Which satisfies initial condition?
y (0)= 0 and y΄ (0) =1.
Solution
L {y ˝ (t)} = s2 {y (s)} – s y (0) - y ΄ (0)
L {y ΄ (t)} = s {y (s)} – y (0).
L {y (t)} = y (s)
Since L {y} = y (s)
Put in (*)
s2 {y (s)} – s y (0) - y ΄ (0) +3[s {y (s)} – y (0)] + 2 y (s) =0
By use y (0) = y΄ (0) =1,
(s2 + 3s +2) y (s) = (s+3) y (0) + y ΄ (0),
(s2 + 3s +2) y (s) = s+3+1 = s+4,
y (s) =
s4
s 2  3s  2
=
s4
( s  1)( s  2)
S+4 = As+ 2B + As + A,
A+B= 1
A +2B = 4 -B =-3  B =3  A =-2,
39
=
A
B

.
s  2 s 1
2
3
,

s  2 s 1
y(s) =
y (t) = L-1{ y(s} = 3L-1{

y (t) = 3e-t - 2e-2t
1
1
} - 2L-1{
},
s 1
s2
Example2
Find the solution of the following (d.e) by (L. T)
y˝ + 4 y΄ + 4 y= 2……………………………………………… (i)
Which satisfies initial condition?
y (0)= 1 and y΄ (0) =1.
Solution
L {y ˝ (t)} = s2 {y (s)} – s y (0) - y ΄ (0)
L {y ΄ (t)} = s {y (s)} – y (0).
L {y (t)} = y (s)
Since L {y} = y (s)
s2 {y (s)} – 1+4[s y (s)] + 4y (s) =
Put in (i)
2
s
2
2s
+1 =
,
s
s
s2
s2
s2
y (s) =
,


2
2
s ( s  2)
s ( s  4 s  4)
s ( s  2)
[s2 +4s + 4]y (s) =
y (s) =
s2
s ( s  2)
=
A
B
,

s s2
1 = A(s+2) + Bs,

 B =-½ and A =½,
1
1

2 ,
y (s) = 2 
s s2
40
y (t) = L-1{ y(s} = 1/2L-1{

y (t) = ½ - ½e-2t .
1
1
} - 1/2L-1{
},
s
s2
Problems
Find the solution of the following (d.e) by (L. T), which satisfies the given initial
conditions:(1) y˝ + 4 y΄ + 3 y=0, at y (0)= 3 and y΄ (0) =1,
(2) y˝ + 4 y΄ + 4 y=2, at y (0)= 0 and y΄ (0) =1,
(3) y˝ - y=0, at y (0)= 0 and y΄ (0) =1,
(4) y˝ -5y΄ + 6 y=0, at y (0)= 0 and y΄ (0) =1,
(5) y˝ - 9y= sint, at y (0)= 1 and y΄ (0) =0,
(6) y˝ -9 y= et, at y (0)= 1 and y΄ (0) =0,
(7) y˝ + 4 y= sint, at y (0)= 0 and y΄ (0) =1,
(8) y˝ + 4 y΄ + 4 y=4 cos2t, at y (0)= 2 and y΄ (0) =5,
41
CHAPTER FOUR
Fourier series
Periodic Function
Definition 3.1
The function f(x) satisfy the condition
f(x+T) = f(x)
For all value of x where T is real number then f(x) is called Periodic
function, and if T least positive number satisfies (1), then T is called
periodic number of function. We can find that:F(x) = f(x+T) = f(x+2T) = (x+3T) = …………………………..= (x+nT).
And
F(x) = f(x-T) = f(x-2T) = (x-3T) = …………………………. .= (x-nT).
This means that
F(x) = (x  nT), where n integer.
Some Properties of Series
1-f(x+T) = f(x) Periodic function
2- n=No of terms positive integer.
1
if n even (2, 4, 6…
3- Cosn  =
-1
if n odd (1, 3, 5………..
4- - Cos 2n  =1,
5- Sin n  = sin 2n  = 0,
6- Cos nx = Cos (-nx).
Some Important Integrals:1-
2

2
sin nx dx =
0
2-

cos nx dx = 0, where n integer.
0
2

0
sin mx sin nx dx = ½
2

[cos(m-n)x – cos(m+n)x]dx = 0.
0
42
34-
2
sin2 nx dx =½

0
2
2

[ 1– cos2nx]dx =  , where n integers.
0

Cos nx sin nx dx = = ½
0
5- =
2

sin 2nxdx = 0.
0
2

cos2 nx dx=
0
2

[cos nx cos nx dx = 0.
0
Fourier series
Suppose that f(x) is periodic function to x, and 2  is
periodic number of it.
And the function f(x) is defined on the interval (0< x< 2  ).
Then we can write f(x) in the form:f(x)= a0 + a1cosx + a2cos2x + ……….+ an cos nx+ b1 sinx + b2
sin2x+……………..+ bn sin nx………………………………………(1)
This means that


f(x)= a0 +
(an cos nx+ bn sin nx)……………….…………………(1)
n 1


=
(an cos nx+ bn sin nx)………..………………………………(1),
n 0
Such that
1
2
a0 =
an =
bn =
1

1

2

f(x) dx

f(x) cos nx dx , n = 1, 2, 3,….

f(x) sin nx dx.
0
2
0
2
0
The series (1) is called Fourier series of the function f(x).
If the function f(x) defined on interval -  < x<  , then
1
a0 =
2
1
an =

bn =
1




f(x) dx


f(x) cos nx dx , n = 1, 2, 3,….

f(x) sin nx dx.



43
Example 1
Find Fourier series of the function
f(x) = x, from x = 0 to x =2  or (0< x< 2  ).
Solution
Use the rule to find a0, an and bn ,
2
1
a0 =
2

0
]0
2
1 2
a0 =
x
4
2
1

an =
=

2
1
f(x) dx =
2

0
1
x dx =
2

f(x) dx
0
=.
1

f(x) cos nx dx =
0
1
[x

2
sin nx
n

2

x cos nx dx,
0
 cos nx 2 
] ]0
n2
sin 2n
cos 2n
cos 0
1
[2 

] [
]
n

n2
n2
2 sin 2n
cos 2n  1
1
=
[

] = 0.
n

n2
=
bn =
1

2

1

f(x) sin nx dx = b n =
0
2

x sin nx dx
0
]
2
 x cos nx sin nx
1
[

] 0
n

n2
2
= .

The equation (1) becomes:
=
f(x)=  -2


n 1
(
sin nx
n
f(x)=  -2 ( sinx +
)
sin 2 x
+
sin 3 x
3
+…….. )
Even and Odd Function
If f(x) = f(-x), is called even function.
If f(-x) = -f(x), is called odd function.
Fourier series of Even and Odd Function
If f(x) is even when { x2, x4, x6… cosx, sin2x,| f(x)|.
44
If f(x) is odd when { x, x3, x5,……, sinx.
(i)
If f(x) is even then
bn = 0
(ii) If f(x) is odd then
a0 = an =0.
Example 1
Find Fourier series of the function
f(x) = x, for (-  < x<  ).
Solution
Since f(-x) = -x = -f(x),  the function is odd.
 a0 = an =0.

1
bn =

1
f(x) sin nx dx = b n =



 x cos nx  sin nx
2
[
=

]
n

n2
2   cos n
= [.
]
n

2
=  cosn 
n
2
n
=  (-1)
n
]



2
x sin nx dx =


0
Then the series becomes:
f(x) =


bn sin nx
n 1


f(x)= -2
(-1) n
(
n 1
f(x)= 2 ( sinx -
sin nx
n
sin 2 x
2
+
)
sin 3 x
3
-…….. )
Example 2
Find Fourier series of the function
1 if
0 < x<  .
f(x) =
2 if  < x< 2  .
Solution
1
a0 =
2
2

0
1
f(x) dx =
2


0
1
f(x)dx +
2
45
2


f(x) dx


0
x sin nx dx
=

1
2

dx +
0
1

x ]0
2
=
a0 = 3/2.
2
1
an =

=
1


0



cos nx dx +
1

2



0
1
f(x) cos nx dx +

2

f(x) cos nx dx

2 cos nx dx ,

sin nx
2
n

]0 + 1
] 2 
x cos nx dx,
1
[x

sin nx
n
an = 0.
1
bn =



0

 cos nx 2 
] ]0 = 0.
n2
1
sin nx dx +

2

2 sin nx dx

 cos nx  1
 cos nx 2
]0 +
2
] ,

n
n
(1) n  1
1 cos n  1
]=
,
= [

n
n
(1) n  1
bn =
,
n
=


0
=
2 dx
1
2
+ x ]  dx

0
2

1
f(x) cos nx dx =

1 sin nx
=
 n
1

2
1
2
1

2
2
, b1 = 0 b3 =
,

3
2
sin 5 x
sin 3 x
 f(x)= 3/2 [ sinx +
+
+…….. ].
3

5
a0 = 3/2 , an = 0. b 0 =
Half-Range Series
If we want find Fourier series on interval (0< x<  ), does not on all
interval (-  < x<  ), then we can find the Fourier series by :1- Fourier Cosine series or f(x) an even function as:46
f(x)= a0 + a1cosx + a2cos2x + ……….+ an cos nx.
2- Fourier Sine series or f(x) an odd function as:f(x)= b1 sinx + b2 sin2x+……………..+ bn sin nx
Such that
1 
a0 =
 f(x) dx
 0
2 
an =
 f(x) cos nx dx , n = 1, 2, 3,….
 0
2 
bn =
 f(x) sin nx dx.
 0
Example 3
Find cosine Half-range series for the function defined as
f(x) = x, for 0< x<  .
Solution
Use the rule to find a0 and an
1 
1 
1 
f(x)
dx
=
x
dx
=


 f(x) dx
 0
 0
 0

1 2 
a0 =
x ]0 =
.
2
2
2 
2 
an =
 f(x) cos nx dx =
 x cos nx dx,
 0
 0
sin nx
 cos nx 
2
=
[x

] ]0
n

n2
2(cos n  1)
=
n 2
a0 =
0
an =
4
n 2
if n even.
if n odd
47
 4
cos 3 x
[ cosx +
2 
3
 f(x)=
+
cos 5 x
5
+…….. ].
Example 4
Find sine Half-range series for the function defined as
f(x) = x, for 0< x<  .
Solution
Use the rule to find bn
bn =
2 
2 
f(x)
sin
nx
dx
=
b
=
n

 x sin nx dx =
 0
 0
 x cos nx  sin nx
2
[

]
=
n

n2
2   cos n
= [.
]

n
2
=  cosn 
n
2
n
=  (-1)
n
]

0
Then the series becomes:
f(x) =


n 1

f(x)= -2

bn sin nx
(-1) n
(
n 1
f(x)= 2 ( sinx -
sin 2 x
2
sin nx
n
+
)
sin 3 x
3
-
48
sin 4 x
4
….. ).
2



0
x sin nx dx
CHAPTER FOUR
Partial Differential Equations
Partial Differential Equations (P. D.E)
Partial Differential Equations are Differential Equations in which the
unknown function of more than one independent variable.
Types of (P. D.E)
The following some type of (P. D.E):1-Order of (P. D.E)
The order of (P. D.E) is the highest derivative of equation for example:Ux = Uy First-order (p. d. e).
 2u
 2u
4 2
t 2
x
Second -order (p. d. e).
2-The Number of Variables
For example:Ux = Utt (two variables x and t).
Ux = Urr +
1
Ur
r
+
1
U 
r2
(Three variables t, r and ).
3-Linearity
The (P. D.E) is linear or non-linear, is linear (P. D.E) if u and whose
derivative appear in linear form (non- linear if product two dependent
variable or power of this variable greater than one).
For example {the general second L. P. D.E in two variable}
Auxx + Buxy + Cuyy + Dux + Euy + Fu + G =0…………………(*)
Where A, B, C, D, E, F and G are constant or function of x and y for
example
utt+ e-t uxx =sint (Linear)
uxx = yuyy (Linear)
u ux+ uy =0 (Non-Linear)
x ux+ y uy + u2=0 (Non-Linear).
4-Homogeneity
If each term of (P. D.E) contain the unknown function and which
derivative is called (H. P. D.E) otherwise is called (non-H. P. D.E), in
special case in (*) is homogeneous if [ G =0]. Otherwise nonhomogeneous.
Auxx + Buxy + Cuyy + Dux + Euy + Fu =0 (H. P. D.E)
Where A, B, C, D, E and F are constant or function of x and y.
Example1
49
Determine which (L. P. D.E) is, order and dependent or independent
variable in following:-
u
 2u
1
4 2
t
x
Linear second degree u, dependent variable, x and t are independent
variable.
2
 3r
3  r
2 x
y
x 2
y 3
2
Linear 3- degree( r, dependent variable, x and y are independent
variable.
3w
3  w 3  rst
y
Non-Linear 3- degree( w, dependent variable, r, s and t are
independent variable.
 2Q  2Q  2Q
4 2  2  2  0
x
y
z
Linear 2- degree(
Q, dependent variable, x, y and z are
independent variables, homogeneous.
5(
u 2 u 2
) ( )  0
t
x
Non-Linear 1- degree( u, dependent variable, t and x are independent
variables, homogeneous.
Solution of (P. D.E)
A solution of (P. D.E) mean that the value of dependent variable which
satisfied the (P. D.E) at all points in given region R.
For Physical Problem, we must be given other conditions at boundary,
these are called boundary if these condition are given at t=0 we called
them as initial conditions its order.
For a linear homogeneous equation if
u1, u2… un are n solution then the general solution can be written as (n-th
order p. d. e)
u= c1 u1+ c2 u2+ … + cn un.
Note i
We can find the solution of (P. D.E) by sequence of integrals as see in the
following examples:Example2
Find the solution of the following (P. D.E)
2z
0
xy
Solution
50
2 z
 z

( )0
xy x y
By integrate (w. r. to) x gives
z
 c( y)
y
Where c(y) is arbitrary parametric of y. Also by integrate (w. r. to) y
gives
z   c ( y )y  c ( x )
Where c(x) is arbitrary parametric of x.
Example3
Find the solution of the following (P. D.E)
2 z
 x2 y
xy
Solution
By integrate (w. r. to) x gives
z x 3 y

 c( y )
y
3
By integrate (w. r. to) y gives
x3 y 2
z
  c ( y )y  c ( x )
6
x3 y2
z
 F ( y )  c( x)
.
6
Example4
Find the solution of the following (P. D.E)
 2u
 6 x  12 y 2
xy
With boundary condition, u(1,y)= y2 -2y, u(x,2)= 5x -5
Solution
By integrate (w. r. to) x gives
u
 3 x 2  12 y 2 x  c ( y )
y
By integrate (w. r. to) y gives
u  3 x 2 y  4 y 3 x   c ( y )y  g ( x )
 u ( x, y )  3 x 2 y  4 y 3 x  h ( y )  g ( x )
u (1, y )  3 y  4 y 3  h( y )  g (1)  y 2  2 y
h( y )  y 2  4 y 3  5 y  g (1)
 u ( x, y )  3 x 2 y  4 y 3 x  y 2  4 y 3  5 y  g (1)  g ( x)
 u ( x,2)  6 x 2  32 x  4  32  10  g (1)  g ( x )  5 x  5
g ( x )  33  27 x  6 x 2  g (1)
51
 u ( x, y )  3 x 2 y  4 y 3 x  y 2  4 y 3  5 y  33  27 x  6 x 2
Formation of (P. D.E)
A (P. D.E) may formed by a eliminating arbitrary constants or
arbitrary function from a given relation and other relation obtained by
differentiating partially the given relation.
Note ii
Suppose the following relation:z
 zx  p
x
z
2
 zy  q
y
1
2z
 z xx  r
x 2
2 z
4  2  z yy  t
y
3
5
2z
 z yx  s
xy
Example 5
Form a Partial Differential Equations from the following equation:Z= (x -a)2 +(y-b)2…………………………….(1)
Solution
z
 z x  2(x -a)
x
z
 z y  2(y -b)
y
Eq(1) become
1
1
Z  ( zx )2  ( z y )2
2
2
4Z  ( z x ) 2  ( z y )2
4Z  ( p ) 2  (q )2
Example 6
Form a Partial Differential Equations from the following equation:Z= f(x2 +y2)…………………………….(2)
Solution
Zx=2xf ΄(x2 +y2)
Zy=2yf ΄(x2 +y2)
Eq(2) become
zx
x
 ,
zy
y
-x Zy + y Zx =0
yp -xq =0
52
Example 7
Form a Partial Differential Equations from the following equation:Z= ax+by+a2 +b2……………………………. (3).
Solution
Zx=a
Zy=b
Eq(3) become
Z= x Zx +y Zy +( Zx)2 +( Zy)2
Z= x p +y q +( p)2 +( q)2
Example 8
Form a Partial Differential Equations from the following equation:v= f(x -ct) +g(x+ct)
Solution
vx= f΄ (x -ct)+g΄ (x+ct)
vt= -cf΄ (x -ct)+cg΄ (x+ct)
vxx= f΄΄ (x -ct)+g΄΄ (x+ct)
vtt= c2f΄΄ (x -ct)+c2g΄΄ (x+ct)
vtt= c2 [f΄΄ (x -ct)+g΄΄ (x+ct)]
vtt= c2 vxx, or
2
 2v
2  v

c
t 2
x 2
One dimensional Wave equation
Solution of First Order Linear (P. D. E)
Let the Partial Differential Equation as form:Pp+ Qq =R……………………………………..……. (4)
Where P, Q and R are function of x, y and z.
So the solution of this equation is the same as the solution of
simultaneous
dx

P
dy

Q
dz
.......... .................... .................... .......... .............(5)
R
Eq (5) are calle LaGrange Auxiliary Equations or (characteristic
equation).
A soluation of Eq(5), can be written as
U(x, y, z) = c1,
V(x, y, z) = c2
The general solution written as
F (U, V) =0, or F (c1, c2) =0.
Note iii
To solve Eq(5), we note that:53
(i) If P or Q or R equal to zero then dx or dy or dz equal to zero
respectivly, For example
If R=0→ dz =0→ Qdx =Pdy from Eq(5), which can easily to
solve it.
(ii)In case sparable the variable in problem, then we can write
characteristic Eq(5), in the following form
dx

P
dy

Q
dz
dx  dy   dz

R
P  Q  R
We slected the value of λ, µ and β such that gives
λP +µQ + βR =0, → λdx +µdy + βdz =0.
Which helpe to find of Solution of (P. D.E).
Example 9
Solve the following Partial Differential Equation
xzp+yzq =xy
Solution
Suppose the following relation:Where
z
 z x  p , and
x
z
 zy  q
y
P= xz, Q= yz, and R= xy
dy
dy
dx
dx



xz
yz
x
y
Lnx=lny =ln c1
x
 c1 = V………………………………………. (6)
y
dy
dy
dz
dz
→xdy= zdz



yz
xy
z
x
zdz = c1ydy
y2
z2
+c
 c1
2
2
z 2 xy
=c

2
2
z2-xy =2c = c2=V
The general solution
F (c1, c2) =0, or
x 2
F(
, z -xy) =0.
y
Example 10
54
Solve the following Partial Differential Equation
(x+z)p –(x+z)q =x-y………………………………………. (7)
Solution
P= x+z, Q= -(x+z), and R= x-y
dy
dx


yz
 ( x  z)
dx  dy  dz

0
dx  dy   dz
dz

x y
 ( y  z)   ( x  z)   ( x  y)
Where λ =1, µ =1, β =1.
 dx +dy + dz =0.
x +y + z = c1 = U.
For λ =x, µ =y, β =-z
xdx  ydy  zdz
0
xdx +ydy - zdz = 0.
x2+y2- z2 =2c = c2=V
The general solution
F (c1, c2) =0, or
F (x +y + z, x2+y2- z2) =0.
Example 11
Solve the following :xz Zx + yz Zy +(x2 + y2) =0
Solution
xz Zx + yz Zy = -(x2 + y2)
dx dy

xz yz
1-
dx dy

x
y
dx dy

0
x
y
lnx- lny=lnc1
Ln
y

x
lnc1
y
 c1 ………………….1
x
dx
dz
2
2
xz  ( x  y 2 )
From (1) y= x c1
55
dx
dz

2
xz  ( x  c12 x 2 )
dx
dz

2
xz  x (1  c12 )
-x(1 + c12) dx=zdz
x(1 + c12) dx+zdz =0
x2
z2
(1  c12 ) 
 c2
2
2
x2+x2c12+z2 = 2c2,
x2+y2+z2 = c3, where c3= 2c2.
The general solution
F (c1, c3) =0, or
F(
y
x
, x2+y2+z2) =0
Problems
Find the solution of the following Partial Differential Equation:1- 2p+3q =1
2- p-xq =z
3- y2zp- x2zq = x2y
4- (y+z)p +(x+z)q =x+y
5- ap +bq+cz =0
6- (y2 +z2 - x2)p -2x y q +2xz = 0
Theorem1
If u1 u2……..are solution of equation


F(
………..)u=0, Then
,
x
y
U= c1 u1+ c2 u2+ … is solution also, where u= c1, c2 … .are constants.
Method of Variable Sparable
Let the Partial Differential Equation as
f
f
F(
………..)u=0.
,
x
y
Let the general solution of above equation is
Let u (x, t) = XT, or u (x, t) = X(x)T(t) Be solution of (P. D.E) where X
ifs function of x only, and Y function of y only. As see in the following
problems:Examp 12
Solve the following Partial Differential Equation with boundary codition
u
u
3
0
x
y
With boundary condition.
u (0, y) = 4e-2y -3e-6y …………………………………. (8)
Solution
To solve Eq(8) suppose
56
u (x, t) = XT. Be solution of (8) where X ifs function of x only, and Y
function of y only.
u
u
 YX΄,
 XY΄
y
x
dX
dY
X
Y 
dx
dy
Put in eq (8)
YX΄ + 3XY΄=0
X
Y

3X
Y
Now let
X
Y

3X
Y

X
= c
3X
Y
= c

Y
= c
X΄ -3CX =0, Y΄ -CY =0,
X= a1e3cx , Y= a2e-cy
u (x, t) = XT= a1a2e3cx-cy = Bec(3x-y), where B= a1a2, are constant.
Now let
c (3x y )
c (3x y )
, and u2= b2 e
solution of (8) (theorem 1)
u1= b1 e
c (3 x y )
c (3 x y )
+ b2 e
,from boundary condion
u= u1+ u2= b1 e
c y
c y
u (0, y) = b2 e
+ b1 e = 4e-2y -3e-6y
b1=4, b2 =-3, c1=2, c2 =6
2(3x y )
6(3 x y )
u (x, y) = 4e
- 3e
1
2
1
2
2
1
Example 13
Find the solution of following [Heat equation] by using partial
differential equation:-
u
 2u
2 2
t
x
………………….……………..…………. (9)
With boundary condition.
(1) u (0, t) = 0, (2) u (10, t) = 0, for all t,
(3) u(x, 0) = 50 sin
3
x
2
+20sin2  x - 10sin4  x
Solution
Let u (x, t) = XT. Be solution of (9)
57
u
 XT΄
t
 2u
 TX΄΄
x 2
Put in(1)
XT΄ =2 TX΄΄………………….……………..…………. (10)
We can write (10)in the form:-
T  X 

2T X
Let
T  X 

2T X
=c
Where c be constant
T΄ -2cT=0, X΄΄ - cX=0 there three cases OF C ( C=0,C>0 and c<0)
CaseI. If c=0
T΄=0,
→
T= c1
and
X΄΄ =0,X= c2x + c3
U= TX=c1(c2x+c3)
U=Ax+B
Where A=c1c2, B= c1c3
U(0,t)= B=0
U(x, t)=Ax
U(10,t)= 10A=0 →
A=0
 U 0
Which trivial solution c≠ 0
CaseII. If C>0
Te-2cx =c1→T =c1e2ct
cx
 cx
X= c 2 e  c 3 e
u (x, t) = XT,
= c1e2ct (c 2 e
 c3 e  cx )
 B3 e  cx )
cx
u = e2ct ( A e
A= c1, c2, and B= c1, c3
U(0,t)= e2ct ( A + B)=0
e2ct ≠ 0→ A + B=0  A= -B
cx
58
U(x,t)=B e-2ct ) ( e cx  e  cx )
U(10,t)=B e2Ct ( e 10 c  e 10 c ) =0
If B=0  A= 0  U= 0 Which trivial solution B ≠ 0
e10
c
 e 10 c =0  e10
 e10
c
 e 10
c
 e 10
 0  e 20
c
c
c
 0  e10
c
 e 10 c ,
 1 which impossible since e 20
c
1
There is no solution if C >0.
CaseIII. If c<0, let c=- k2  k 2 
k2 0 
T΄ +2k2T=0, X΄΄ + k2X=0  T = c1 e 2 k t , X= c2 coskx + c3sinkx.
U(x,t)= c1 e 2 k t ( c2 coskx + c3sinkx )
U(x,t)= e 2 k t ( A coskx + B sinkx ).
Where A=c1c2, B= c1c3
U(0,t)= e 2 k t ( A )=0
 A  0 , because e 2 k t  0
U(x,t)= B e 2 k t ( sinkx ).
U(10,t)= B e 2 k t ( sin10k.) =0
Since B ≠ 0 , e 2 k t ≠ 0
 sin10k =0
 10k=n  , where n =0  1  2  ...
2
2
2
2
2
2
2
2
k
n
10
U(x,t)= B e
2
U(x,t)= b1 e
U(x,t)= b2 e
U(x,t)= b3 e
U(x,t)= b1 e
n 2 2
t
100
n
( sin
x
10

n12  2
t
50

n2 2  2
t
50

n3 2  2
t
50

n12  2
t
50
+ b3 e
)= B e
( sin
n1 
x
10
)
( sin
n2 
x
10
)
( sin
n3 
10
x
n
( sin 1 x
10

n3 2  2
t
50
( sin2

n2 2
t
50
( sin
n
x
10
)=
)
)+ b2 e
n3 
10
x
59
)

n2 2  2
t
50
( sin
n2 
x
10
)
U(x,0)= b1 sin
50 sin
3
x
2
n1
x
10
+ b2 sin
n2 
x
10
+ b3 sin
n3 
x
10
=
+20sin2  x - 10sin4  x
b1 =50, b2 =20, + b3 = -10 ,
n1  3

10
2
→ n1=15, n2=20, n3=40
U(x,t)= 50 e

9 2
t
2
sin
n3
x
2
2
+ 20 e 8 t sin 2x
2
-10 e 32 t sin 4x
Examp 14
Find the solution of following [Wave equation] by using partial
differential equation:(1)
 2u
 2u

4
t 2
x 2
With boundary condition.
(2) u (0, t) = 0, (3) u (L, t) = 0, for all t,
(5)
L,  0 0 (4) u(x, 0) = f(x).
u
= g(x), at t=0.
t
Solution
Let u (x, t) = XT. Be solution of (1) where X ifs function of x only, and
Y function of y only.
XT΄΄
TX΄΄
 2u

t 2
 2u

x 2
Put in(1)
XT΄΄ =4 TX΄΄
T  X 

4T X
Let
T  X 

 k2
4T X
Where k be constant
T΄΄ -4k2T=0, X΄΄ - k2X=0(there three cases)
CaseI. If
k2  0
T΄΄ =0,
T=at+b

X΄΄ =0,X= cx +d
60
U= TX=(at+b)(cx+d)
U(0,t)= (at+b)( d)=0
at  b  0  b  0
U(x,t)=(at+b) cx
U(L,t)=(at+b) cL=0
cL=0
L0c0
cx +d=0
U(x,t)= 0
CaseII. If
k2  0
T΄΄ -4k2T=0, X΄΄ - k2X=0
T= a e2kt + b e-2kt , X= c ekx + d e-kx
U(x,t)=(a e2kt + b e-2kt )( c ekx + d e-kx)
U(0,t)=(a e2kt + b e-2kt )( c + d)=0
c + d=0  d= -c
U(x,t)=c(a e2kt + b e-2kt )( ekx - e-kx)
U(L,t)=c(a e2kt + b e-2kt )( ekL - e-kL)=0
If c=0  X= 0  U= 0
ekL - e-kL=0  ekL= e-kL  e2kL=1, which impossible since
L, k0
There is no solution if k2 0
2
CaseIII. If
 k 2  k 0 
T΄΄ +4k2T=0, X΄΄ + k2X=0 
T= A cos2kt + Bsin2kt, X= C coskx + Dsinkx.
U(x,t)=( A cos2kt + Bsin2kt)( C coskx + Dsinkx)
U(0,t)=( A cos2kt + Bsin2kt)( C )=0
 c  0 , because A cos2kt + Bsin2kt  0
U(x,t)=( A cos2kt + Bsin2kt) Dsinkx
U(L,t)=DsinkL ( A cos2kt + Bsin2kt)=0
Since A cos2kt + Bsin2kt  0  DsinkL=0
If D= 0  U= 0
 DsinkL=0  kL=n  , where n =0  1  2  ...
k
n
L
U(x,t)=Dsin n x ( A cos2
U(x,t)= (An cos2
n
L
n
L
t + Bsin2
t + Bn sin2
Where An =AD, Bn=BD
61
n
L
n
L
t)
t) sin n x .
U ( x, t ) 

 U n ( x, t )
n 1


n 1
n 1
 U n ( x, t )  
(An cos2
n
L
t + Bn sin2
n
L
t) sin n x .
U(x, 0) = f(x).
f(x) =


An sin n x .
n 1
U t ( x ,0)  g(x),
g(x)= 2


L

Bn (n sin n x ).
n 1
Problems
Find the solution of the following Partial Differential Equation:(1)
u  2 u

0
t x 2
With boundary condition.
u (0, t) = 0, u (10, t) = 0, for all t,
u(x, 0) = 50 sin
( 2)
u u

0
x y
3
x
2
+20sin2  x - 10sin4  x.
With boundary condition.
u (0, y) = e2y,
(3)
2
u  2 u

t x 2
With boundary condition.
u (0, t) = 0, u (п, t) = 0, for all t,
u(x, 0) = 2sin3x - 5sin4x.
(4)
 2u
 2u
4 2
t 2
x
With boundary condition.
(i) u (0, t) = 0, (ii) u (L, t) = 0, for all t, L > 0
(iii) u(x, 0) = f(x). (iv)
(5)
 2u
 2u
4

y 2
x 2
u
= g(x), at t=0.
t
With boundary condition.
(i) u (0, y) = 0, (ii) u (10, y) = 0, for all t,
(iii)
u
(x,0) = 0, at t=0.
y
62
(iv) u(x, 0) = 3sin2  x - 4 sin

x
2
.
CHAPTER FIFE
Numerical Analysis
Solution of Non-Linear Equation
1-Newton-Raphson Method for Approximating
Interpolation
2-Lagrange Approximation
Numerical Differentiation and Integration
Approximate Integration
Integration Equal Space
3-The Trapezoidal Rule
4-Simpson's Rule
5-Simpson's (3/8) Rule
Solutions of Ordinary Differential Equation
Numerical Differentiation
6-Euler Method
The Step by Step Methods
7-Modified Euler Method (Euler Trapezoidal Method)
8-Runge Kutta Method
9-Runge- Kutta-Merson Method
System of Linear Equation
10-Cramer's Rule
11-Solution of Linear Equations by using Inverse Matrices
12-Gauss Elimination Method
63
13-Gauss Siedle Methods
14-Least Squares Approximations
Numerical Analysis
Solution of Non-Linear Equation
1-Newton-Raphson Method for Approximating
We use tangent to approximate the graph of y = f(x), near the point
P (xn, yn), where
yn = f(xn), is small. Let xn+1 be the value of x where that tangent line
crosses the x-axis.
Let tangent = The slope between (x , y) and (xn, yn), is
y  yn
………………………………………….… (1)
f `( xn) =
x  xn
Since the tangent line crosses the x-axis, y = 0, and yn = f(xn), put in Eq
(1) which becomes
 f ( xn )
f `( xn) =
,
x  xn
 f ( xn )
x - xn=
,
f ( x n )
x = xn -
f ( xn )
………………………………………….… (2).
f ( x n )
Put x= xn+1 in Eq (2) gives
f ( xn )
xn+1 = xn ………………………………………….… (3)
f ( x n )
Eq (3) called Newton-Raphson Method, can using this method by the
following
1-Give first approximating to root of equation f(x) = 0. A graph of
y = f(x).
2-Use first approximating to get a second. The second to get a third, and
so on. To go from nth approximation xn to the next approximation xn+1,
by using Eq (3), where f `(x) the derivative of f at xn.
Example 1
64
Solve the following using Newton-Raphson Method
1
+1 = 0, start with x0 = -0.5, error % = 0.5 %
x
xn  1  xn
%
xn  1
Where e % =
Sol
f(x) =
1
+1, x0 = -0.5,
x
1
f `( xn) = f(x0) =
x2
1
+1= -1,
0.5
f `( x0) = -
1
( 0.5 ) 2
x1 = x0 -
f ( x0 )
f ( x 0 )
x1 = -0.5 By use e % =
e%=
= -4, from Eq (3)
1
4
= -0.75.
xn  1  xn
 % as
xn  1
 0.75  ( 0.5)
 0.75
%
e % = 33%
By use same of new of x1 in Eq (3) as
f ( x1 )
,  x2 = -0.937, in same we can find x3 and x4
x2 = x1 f ( x 1 )
which use in the following table
f(x)
f `( xn)
xn+1
e%
n
xn
0
- 0.5
-1
-4
-0.75
33%
1
- 0.75
- 0.333
- 1.77
-0.937
19 %
2
- 0.937
-0.067
- 1.137
-0.997
6%
3
-0.997
-0.003
- 1.006
- 1.000
0.3 %
To check the answer as:1
+1= -1+1= 0.
1
65
Interpolation
2-Lagrange Approximation
Interpolation means to estimate amassing function value by taking a
weighted average of known function value of neighboring point.
Linear Interpolation
Linear Interpolation uses a line segment passes through two distinct
pointes (x0 , y0) and (x1, y1) is the same as approximating a function f for
which f(x0) = y0 ,and f(x1) = y1 by means of first-degree polynomial
interpolation.
The slope between (x0, y0) and (x1, y1) is
Slope =m=
y1  y 0
x1  x 0
(x1, y1)
!!
!!
!!
P(x)
!!
(x0 , y0)
The point- slope formula for the line
y = m( x-x0 ) + y0
66
y =P(x) = m( x-x0 ) + y0 =
y1 
x1 
y0
( x-x0 ) + y0
x0
x  x0
x1  x 0
x  x0
x  x1
+ y1
…………………… (4)
x 0  x1
x1  x 0
= y0 +(y1 - y0)
P1(x) = y0
Each term of the right side of (4) involve a linear factor hence the sum is
a polynomial of degree ≤1.
L1,0(x) =
x  x0
x  x1
, and L1,1(x) =
…………………… (5)
x 0  x1
x1  x 0
When x= x0, L1,0(x0)=1 and L1,1(x0)=0. When x= x1, L1,0(x1)=0 and
L1,1(x1)=1.
In terms L1,0(x) and L1,1(x) in Eq (5) called Lagrange coefficient of
polynomial hazed on the nodes x0 and x1,
P1(x0) = y0 =f(x0) ,and P1(x1) = y1 = f(x1) .
Using this notation in Eq (4), can be write in summation
P1(x) = y0 L1,0(x)+ y1 L1,1(x)
1
P1(x) =  y k L1k ( x ) .
k 0
Suppose that the ordinates
yk = f(xk).
If P1(x) is uses to approximante f(x) over intervalle [x0 x1].
Example 2
Consider the graph y = f(x) =cos(x) on (x0 = 0.0, and x1=1.2 ), to find the
linear interpolation polynomial.
Sol
Now y0 =f(x0) = f(0.0) = cos (0.0)= 1.0000, and
y1 =f(x1) = f(1.2) = cos (1.2)=0.3624,
x  x1
x  1. 2
x  1. 2
=
=
, and
x 0  x1 0.0  1.2
1.2
x  x0
x  0.0
x
=
= .
L1,1(x) =
x 1  x 0 1. 2  0. 0 1. 2
L1,0(x) =
1
P1(x) =  y k L1k ( x ) .
k 0
P1(x) = y0 L1,0(x)+ y1 L1,1(x)
P1(x) = -(1.0000)
x  1. 2
x
+ (0.3624)
1. 2
1. 2
P1(x) = -0.8333( x- 1.2) + 0.3020 x.
Quadratic Lagrange Interpolation
67
Interpolation of given pointes (x0 , y0), (x1, y1) and (x2, y2) by a second
degree polynomial P2(x), which by Lagrange summation as
P2(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x).
2
2
k 0
k 0
P2(x) =  yk L1k ( x ) =  f ( x k ) L1k ( x ) .
( x  x1 )( x  x 2 )
,
( x 0  x1 )( x 0  x 2 )
( x  x 0 )( x  x 2 )
L1,1(x) =
( x1  x 0 )( x1  x 2 )
( x  x 0 )( x  x1 )
L1,2(x)=
( x 2  x 0 )( x 2  x1 )
L1,0(x) =
approximating a function f for which f(x0) = y0 ,and f(x2) = y2 by means
of second -degree polynomial interpolation.
Example 3
Using the nodes (x0 =2, x1=2.5 and x2 =4), to find the second interpolation
1
polynomial for f(x) = .
x
Sol
We must find
( x  2.5)( x  4)
= (x-6.5)x+10,
L1,0(x) =
( 2  2.5)( 2  4)
( 4 x  24) x  32
( x  2)( x  4)
L1,1(x) =
=
( 2.5  2)( 2.5  4)
3
( x  2)( x  2.5) ( x  4.5) x  5
L1,2(x)=
=
.
(4  2)(4  2.5)
3
Now f(x0) = f(2) = 0.5, f(x1) = f(2.5) = 0.4, and f(x2) = f(4) = 0.25, and
2
2
k 0
k 0
P2(x) =  yk L1k ( x ) =  f ( x k ) L1k ( x ) .
P2(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x)
( 4 x  24) x  32
( x  4.5) x  5
] +0.25 [
];
= 0.5[x-6.5)x+10]+ 0.4[
3
3
P2(x) =[0.05 x-0.425]x +1.15
1
f(3)=
3
P2(3) = 0.325.
f(3)= P2(3) = 0.325.
Cubic Lagrange Interpolation
68
Interpolation of given pointes (x0 , y0), (x1, y1), (x2, y2) and (x3, y3) by a
third degree polynomial P3(x), which by Lagrange summation as
P3(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x) + y3 L1,3(x),
3
P3(x) =  y k L1k ( x ) =
k 0
3
 f ( x k ) L1k ( x ) .
k0
( x  x1 )( x  x 2 )( x  x 3 )
,
( x 0  x1 )( x 0  x 2 )( x 0  x 3 )
( x  x0 )( x  x 2 )( x  x 3 )
L1,1(x) =
( x1  x 0 )( x1  x 2 )( x1  x 3 )
( x  x1 )( x  x 2 )( x  x 3 )
L1,2(x)=
,
( x 2  x 0 )( x 2  x1 )( x 2  x 3 )
( x  x1 )( x  x 2 )( x  x 3 )
L1,3(x)=
( x 3  x 0 )( x 3  x1 )( x 3  x 2 )
L1,0(x) =
Approximating a function f for which f(x0) = y0 ,and f(x3) = y3 by means
of third -degree polynomial interpolation.
Example 4
Consider the graph y = f(x) =cos(x) on (x0 = 0.0, x1= 0.4 , x2= 0.8 and x3
= 1.2), to find the cubic interpolation polynomial.
Sol
Now y0 =f(x0) = f(0.0) = cos (0.0)= 1.0000,
y1 =f(x1) = f(0.4) = cos (0.4)=0.9210,
y2 =f(x2) = f(0.8) = cos (0.8)=0.6967, and
y3 =f(x3) = f(1.2) = cos (1.2)=0.3624,
( x  x1 )( x  x 2 )( x  x 3 )
( x  0.4)( x  0.8)( x  1.2)
L1,0(x) =
=
,
( x 0  x1 )( x 0  x 2 )( x 0  x 3 ) (0.0  0.4)(0.0  0.8)(0.0  1.2)
y0 L1,0(x) = -2.6042( x- 0.4)( x- 0.8)( x- 1.2),
y1 L1,1(x)= 7.1958( x- 0.0)( x- 0.8)( x- 1.2),
y2 L1,2(x)= -5.4430( x- 0.0)( x- 0.4)( x- 1.2)
y3L1,3(x)= 0.9436( x- 0.0)( x- 0.4)( x- 0.8).
P3(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x) + y3 L1,3(x),
3
P3(x) =  y k L1k ( x ) =
k 0
3
 f ( x k ) L1k ( x ) .
k0
P3(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x) + y3 L1,3(x),
P3(x) = -2.6042( x- 0.4)( x- 0.8) ( x- 1.2)+ 7.1958( x- 0.0)( x- 0.8)( x1.2)+ -5.4430( x- 0.0)( x- 0.4)( x- 1.2)+ 0.9436( x- 0.0)( x- 0.4)( x- 0.8).
, In general case we construct, for each k= 0, 1…n, we can write
69
= 1 if k = i
Ln,k(xi)
= 0 if k ≠ i
Where
Ln,k(x)=
( x  x0 )( x  x1 )...( x  x k 1 )( x  x k 1 )...( x  x n )
( x k  x0 )( x k  x1 )...( x k  x k 1 )( x k  x k 1 )...( x k  x n )
or
n
( x  xi )
.
(
x

x
)
k
i
i 0
Ln,k(x)= 
ik
Problems
1-If y(1) =12, y(2) =15, y(5) =25, and y(6) =30. Find the four points
Lagrange interpolation polynomial that takes some value of function (y)
at the given points and estimate the value of y (4) at given points.
2-Fit a cubic through the first four points y(3.2) =22.0, y(2.7) =17.8,
y(1.0) =14.2, y(3.2) =22.0and y(5.6) =51.7, to find the interpolated value
for x= 3.0 function (y) at the given points and estimate the value of y (4)
at given points.
3-If f(1.0) =0.7651977, f(1.3) =0.6200860, f(1.6) = 0.4554022, f(1.9) =
0.2818186 and f(2.2) = 0.1103623. Use Lagrange polynomial to
approximation to f(1.5).
Numerical Differentiation and Integration
Approximate Integration
Integration Equal Space
We begin our development of numerical integration by giving wellknown numerical methods. If the function f(x) such a nature that
b
 f ( x ) dx cannot be evaluated by method of integration. In such cases, we
a
use method to approximation to value. A geometric interpolation of
b
 f ( x ) dx is the area of the region bounded by the graph of y = f(x), x = a
a
x = b, and y = 0. We can obtain an estimate of the value of integral by
sketching the boundaries of the region and estimating the area of the
enclosed region.
3-The Trapezoidal Rule
70
b
We shall obtain an approximation to
 f ( x ) dx by finding the sum of areas
a
of trapezoids. We begin by dividing [a, b] into n equal subintervals and
constructed a trapezoid.
Let the lengths of the ordinates drawn at the points of subdivision by
f0 , f1, …, fn-1, and fn and the width of each trapezoid by Δx =
ba
n
find the sum of the area of the trapezoid is:A=
1
2
[ f0 + f1] x +
1
2
[ f1 + f2] x +…+
1
2
[ fn-1 + fn] x
Or
b
 f ( x ) dx =
a
x
2
[ f0 + 2 f1 + 2f2 +…+ 2 fn-1 + fn]………………… (6)
Eq (6) called The Trapezoidal Rule.
Example 5
Find
1
1
 x 2  1 dx, for n = 6 by Trapezoidal rule
0
Sol
f(x)=
1
2
, x0 = 0, x6 =1
x 1
x6  x0
1 0
1
=
=
h=
h
6
6
x0 = 0 , f0 =
1
2
0 1
= 1
x1 = x0+ h
x1 =
x2 =
x3 =
x4 =
1
= 0.9729
1 2
( ) 1
6
1
2
, f2 =
= 0.90
2
6
( )2  1
6
1
3
, f3 =
= 0.8
3 2
6
( ) 1
6
1
4
, f4 =
= 0.6923
4 2
6
( ) 1
6
1
, f1 =
6
71
, we
1
5
, f5 =
6
x5 =
= 0.5901
5
( )2  1
6
1
1
= = 0.5
x6 = 1, f6 =
2
(1)  1 2
A=
A=
A=
h
2
[ f0 + 2( f1 + f2 + f3+ f4 + f5)+ f6]
1
12
1
12
[ 1 + 2(0.9729 + 0.90 + 0.8 + 0.6923 + 0.5901 )+ 0.5 ]
[ 1 + 2(0.9729 + 0.90 + 0.8 + 0.6923 + 0.5901 )+ 0.5 ]
A = 0.7842.
4-Simpson's Rule
We obtain another approximation to
b
 f ( x ) dx. We dividing the interval
a
from x = a to x = b into an even number of equal subintervals. We can
drive the formula of Simpson by connected any three non-collinear points
in the plane can be fitting with parabola and Simpson's Rule is based on
approximating curves with parabola as shown in the following:Let the equation of parabola as
f = Ax2+ Bx + C.
The area under it from x = -h to x = h as
b

f ( x ) dx =
2
 ( Ax  Bx  C ) dx = [ A
h
a
= 2A
h
h
x3
x2
B
Cx ]
3
2
h
3
h
h
 2Ch = [2 Ah 2  6C ] .
3
3
Since the curve passes through the three points (-h, f0), (0, f1) and (h, f2)
f0 = Ah2- Bh + C
f1 =
C
2
f2= Ah +Bh + C.
From above equation can see that
C=
f1
2
Ah - Bh = f0 - f1
Ah2+Bh = f2 - f1
Ah2
= f0 +f2 - 2f1.
b
Now the area  f ( x ) dx in terms of ordinates f0, f1 and f2, we have
a
b
h
 f ( x ) dx= 3 [2 Ah
a
2
h
 6C ] .= [ f0 +f2 - 2f1+6 f1], or
3
72
b
h
 f ( x ) dx = 3 [f0 +4f1+ f2] ……………………….… (7)
a
Eq (7) called Simpson's Rule of two intervals [the with 2h]. Now in
general to even number of equal subintervals by pass a parabola through
[f0, f1and f2], another through [f2, f3and f4]…and through [fn-2, fn-1and fn].
We then find the sum of the areas under the parabolas.
b
h
 f ( x ) dx = 3 [fa +4f1+ f2]+
a
b
h
h
[f2 +4f3+ f4] +…+ [fn-2 +4fn-1+ fb]
3
3
h
 f ( x ) dx = 3 [fa +4f1+ 2f2 +4f3+ 2f4 +…+ 2fn-2 +4fn-1+ fb].
a
Where h =
ba
, and n = even.
n
And the truncation error for Simpson's rule is:es =
(b  a ) 5
180n 4
f (4) (c ) =
( b  a ) 4 ( 4)
h f (c )
180
Example6
Use Simpson's rule to evaluate
1
1
 x 2  1 dx, for n = 6.
0
Sol
f(x)=
1
2
, x0 = 0, x6 =1
x 1
x6  x0
1 0
1
=
=
h=
h
6
6
x0 = 0 , f0 =
1
2
0 1
= 1
x1 = x0+ h
x1 =
1
, f1 =
6
1
1
( )2  1
6
= 0.9729
x2 = x1+ h
x2 =
1
1
+
=
6
6
2
,
6
1
= 0.90
2 2
( ) 1
6
1
3
, f3 =
= 0.8
x3 =
3 2
6
( ) 1
6
f2 =
73
1
4
, f4 =
6
x4 =
= 0.6923
4
( )2  1
6
1
5
, f5 =
= 0.5901
x5 =
5
6
2
( ) 1
6
1
1
= = 0.5
x6 = 1, f6 =
2
(1)  1 2
h
A = [f0 +4f1+ 2f2 +4f3+ 2f4 +4f5+ f6 ]
3
A=
1
12
[ 1 +4(0.9729) +2( 0.90 ) +4( 0.8) + 2(0.6923) + 4(0.5901 )+ 0.5 ]
A = 0.78593.
5-Simpson's (3/8) Rule
If f(x) approximated by polynomial of higher degree then an accurate
approximation in computing the area so if the interval divided into n
subinterval that (n is odd number divided by 3) and by calculating the
area of three strips by approximating f(x) by a cubic polynomial as in
Simpson's Rule. And for the n formulas we obtain the three eight rule
b
 f ( x ) dx =
a
Where h =
3h
[fa +3f1+ 3f2 +2f3+ 3f4+3f5+ 2f6 +…+ 3fn-2 +3fn-1+ fb].
8
ba
n
, and n = odd
And the truncation error is:er =
( b  a ) 5 ( 4)
f (c ) .
6480
Example7
Use Simpson's
1
3
rule to evaluate
8
x
0
Sol
f(x)= x4, x0 = 0, x6 =1
h=
ba
n
=
x6  x0
h
=
1 0
1
=
6
6
x0 = 0 , f0 = ( x)4= = ( 0)4= 0
x1 = x0+ h
x1 =
1
1
, f1 = ( )4 =0.00077
6
6
x2 = x1+ h
x2 =
1
1
+
=
6
6
2
,
6
74
4
dx, for n = 6.
2 4
) =0.01234
6
f2 =
(
x3 =
3
3
, f3 = ( )4 =0.06251
6
6
x4 =
4
4
, f4 = ( )4 =0.1975
6
6
x5 =
5
5
, f5 = ( )4 =0.482253
6
6
x6 = 1, f6 = (
b
 f ( x ) dx =
a
6 4
) =1.0
6
3h
[fa +3f1+ 3f2 +2f3+ 3f4+3f5+ f6 ].
8
3h
[fa +3(f1+ f2 +f4+ f5)+ 2f3+ f6 ].
8
A=
A = 0.2002243.
Problems
1
1- Approximate  4x 3 dx, by the trapezoidal rule and by the Simpson's
0
rule, with n = 6.
2- Approximate each of the integrals in the following problems with n =
4, by
(i) The trapezoidal rule and (ii) The Simpson's rule.
Compare your answers with
(a) The exact value in each case.
(b) Use the error in terms in Trapezoidal rule.
(c) Use the error in terms in Simpson's rule.
2
(1)  x dx
0
2
(2)  x 2 dx
0
2
(3)  x 4 dx
(4)
0
2
1
 x 2 dx
1
4
(5)  x dx
1
75

(6)  sin x dx.
0
Solutions of Ordinary Differential Equation
Numerical Differentiation
Let f(x, y) be a real valued function of two variable defined for (a≤ x ≤b),
and all real value of y.
6-Euler Method
The Step by Step Methods
This starts from
y1 = y(y0), and compute an approximate value y1 of the solution at y for
y`(x)= f(x, y(x)) at
x1= x0 +h, in second step computes the value y2 of solutions at
x2= x1 +h
x2 = x0 +2h,
where h is fixed increment, in each step the computation are done by the
same formula such formula suggested by Taylor series
h2
h3
y``(x) + y```(x) +…..
2
3
f f
y`
y`(y)= f(x, y(x)), y``(x)= f `(x, y(x)) + +
x y
y(x + h )= y(x) +hy`(x) +
 y(x + h )= y(x) +hy`(x) +
h2
h3
y``(x) + y```(x) +…..
2
3
For small h and neglected terms of h 2 , h 3 …..
y(x + h )= y(x) +h f(x, y)
y1 = y0 +h f(x0, y0),
y2 = y1 +h f(x1, y1),
….
….
yn+1 = yn +h f(xn, yn).
Which called Euler's method for first order.
Example 8
Use Euler's method to solve the D. E
76
dy
y
= x2 +4x - , with, x0 = 0 y0 = 4, for x = 0 to x0 = 0.2, h = 0.05
dx
2
work to (4D).
Sol
f(x, y) =
dy
y
= x2 +4x dx
2
yn+1 = yn +h f(xn, yn).
n = 0, x0 = 0 , y0 = 4
y1 = y0 +h f(x0, y0).
y1 = 4 +.o5 f(0, 4).
4
2
y1 = 4 +.o5[ 02 +4  0- ].
y1 = 4 -0.1
y1 = 3.9
x1 = x0 +h
x1 = 0 +0.05
x1 = 0.05
y2 = y1 +h f(x1, y1).
y2 = 3.9 +.o5 [(0.05)2 +4  (0.05)-
3. 9
].
2
y2 = 3.81
x2 = 0.05+0.05=0.10
x3 = 0.15, y3 = 3.73
x4 = 0.20, y4 = 3.67
x5 = 0.25, y5 = 3.37.
7-Modified Euler Method (Euler Trapezoidal Method)
The Modified Euler Method gives from modified the value of (yn+1) at
point (xn+1) by gives the new value (yn+1) by the following method
x1 = x0 +h
y(0)1 = y0 +h f(x0, y0).
h
[ f(x0, y0). + f(x1, y(0)1)],
2
h
y(2)1 = y0 +
[ f(x0, y0). + f(x1, y(1)1)]
2
y(1)1 = y0 +
.....................
....................
y(r+1)1 = y0 +
h
[ f(x0, y0). + f(x1, y(r)1)], we can go to five iteration.
2
Example 9
Use Euler's Modified method to solve the D. E
dy y
+ = x2 +4x, with, y = 4, for x = 0(0.05) 0.20, work to (3D).
dx 2
77
Sol
Step 1
f(x, y) = x2 +4x -
y
2
y(0)1 = y0 +h f(x0, y0).
n = 0, x0 = 0 , y0 = 4
y1 = y0 +h f(x0, y0).
y1 = 4 +.o5 f(0, 4).
4
2
y(0)1 = 4 +0.05[ 02 +4  0- ].
y(0)1 = 3.9
y(1)1 = y0 +
=4+
0.05
2
h
[ f(x0, y0). + f(x1, y(0)1)],
2
[-
y(1)1 = 3.906.
y(2)1 = y0 +
=4+
0.05
2
4
1
+(-0.05)2 +4(0.05) -  3.9] = 3.906
2
2
h
[ f(x0, y0). + f(x1, y(1)1)]
2
[-
4
1
+(-0.05)2 +4(0.05) -  3.906] = 3.906
2
2
y(2)1 = 3.906
Step 2
x2 = x1 +h = 0.05 +0.05 = 0.05 +0.1
y(0)2 = y1 +h f(x1, y1).
n = 1, x1 = 0.05 , y1 = 3.906
y(0)2 = y1 +h f(x1, y1).
1
2
= 3.906+0.05[(0.05)2 +4(0.05) -  3.906] = 3.912
y(0)2 = 3.912
h
[ f(x1, y1). + f(x2, y(0)2)],
2
0.05
1
1
[(0.05)2 +4(0.05) -  3.906+(0.1)2 +4(0.1) -  3.91] =
= 3.906+
2
2
2
y(1)2 = y1 +
3.868
y(1)2 = 3.868.
h
[ f(x1, y1). + f(x2, y(1)2)]
2
0.05
1
1
[(0.05)2 +4(0.05) -  3.906+(0.1)2 +4(0.1) -  3.868] =
= 3.906+
2
2
2
y(2)2 = y1 +
3.824
y(2)2 = 3.824.
78
h
[ f(x1, y1). + f(x2, y(2)2)]
2
0.05
1
1
[(0.05)2 +4(0.05) -  3.906+(0.1)2 +4(0.1) -  3.824] =
= 3.906+
2
2
2
y(3)2 = y1 +
3.825
y(3)2 = 3.825.
Step 3
x3 = x2 +h = 0.1+0.05 = 0.15
n = 2, x2 = 0.1 , y2 = 3.825
y(0)3 = y2 +h f(x2, y2).
1
2
= 3.825+0.05[(0.1)2 +4(0.1) -  3.825] = 3.750
y(0)3 = 3.750
y(1)3 = y2 +
= 3.825+
h
[ f(x2, y2). + f(x3, y(0)3)],
2
0.05
2
1
2
1
2
[(0.1)2 +4(0.1) -  3.825+(0.15)2 +4(0.15) -  3.750] =
3.756
y(1)3 = 3.756.
In same way we find
y(2)3 = 3.756.
Step 4
x4 = x3 +h = 0.15+0.05 = 0.2
n = 3, x3 = 0.15 , y3 = 3.756
y(0)4 = y3 +h f(x3, y3).
1
2
= 3.756+0.05[(0.15)2 +4(0.15) -  3.756] = 3.693
y(0)4 = 3.693
h
[ f(x3, y3). + f(x4, y(0)4)],
2
0.05
1
1
[(0.15)2 +4(0.15) -  3.756+(0.2)2 +4(0.2) -  3.693] =
= 3.756+
2
2
2
y(1)4 = y3 +
3.699
y(1)4 = 3.699.
y(2)4 = y3 +
h
[ f(x3, y3). + f(x4, y(1)4)],
2
79
= 3.756+
0.05
2
1
2
1
2
[(0.15)2 +4(0.15) -  3.756+(0.2)2 +4(0.2) -  3.699] =
3.699
y(2)4 = 3.699.
The following table gives the above resulted of x and y.
x
y
0
4
0.05
3.906
0.1
3.825
0.15
3.756
0.2
3.699
Problems
Apply Euler's methods to the following initials value problems.
Do 5 steps. Solve the problem exactly. Compute the errors to
see that the method is too inaccurate for Practical purposes
(1) y΄ + o.1 y= 0 with y(0) = 2, h = 0.1.
(2) y΄ =

1  y 2 , with y(0) = 0, h = 0.1.
2
(3) y΄ + 5x4 y2= 0 with y(0) = 1, h = 0.2.
(4) y΄ = (y+ x)2 with y(0) = 1, h = 0.1.
Find the exacted solution and the error
(5) y΄ + 2x y2= 0 with y(0) = 1, h = 0.2.
(6) y΄ = 2(1+ y2), with y(0) = 0, h = 0.5.
(7) Use Euler's methods to find numerical solution of the
following d. e.
1
2
(8) y΄= 4x +x2 - y, with y(0) = 4, h = 0.05, find to 3-decimal.
8-Runge Kutta Method
When
dy
= f(x, y)
dx
 yn+1 = yn +
1
[k1+ 2k2 +2k3 + k4]
6
Where
k1= h f(xn, yn).
k2 = h f(xn +
k
h
, yn+ 1 ).
2
2
K3 = h f(xn +
k
h
, yn+ 2 ).
2
2
K4 = h f(xn +h, yn+ k3).
80
Where h and (xn, yn) are given.
Example 10
Use Runge Kutta Method to solve the D. E
dy
= x +y, with x0 = 0, y0 = 1, with h = 0.1 work to (4D).
dx
Sol
f(x, y) =
dy
= x +y
dx
1
6
y1 = y0 + [k1+ 2k2 +2k3 + k4]
k1= h f(x0, y0).
n = 0, x0 = 0 , y0 = 1
k1 = 0.1 f(0, 1)= 0.1[0 +1]= 0.1
k1 = 0.1
k2 = h f(x0 +
k
h
, y0+ 1 ).
2
2
= 0.1 f(0 +
0.1
0.1
, 1+
) = 0.1[0 .05+1.05]
2
2
K2 = 0.11.
k
h
0.11
, y0+ 2 )= 0.1 f(0 .05, 1+
)
2
2
2
= 0.1[0 .05+1.055]
K3 = h f(x0 +
K3 = 0.1105.
K4 = h f(x0 +h, y0+ k3)
= 0.1[0 .1,1.1105]
K4 = 0.12105.
= 0.1[0 .1,1+0.1105]
1
6
y1 = 1 + [0.1+ 2  0.11 +2  0.1105 + 0.12105],
y1 = 1.11034
1
6
y2 = y1 + [k1+ 2k2 +2k3 + k4]
k1= h f(x1, y1).
n = 1, x1 = x0 +h = 0+0.1 = 0.1, y1 = 1.11034
k1 = 0.1 f(0.1, 1.11034)= 0.1[0.1 +1.11034]= 0.12103
k1 = 0.12103
k
h
, y1+ 1 ).
2
2
0.1
0.1
, 0.12103+
) = 0.13208
= 0.1 f(0.1 +
2
2
k2 = h f(x1 +
K2 = 0.13208.
K3 = 0.132638.
K4 = 0.1442978.
81
y2 = 1.24306.
 (x2, y2) = (0.2, 1.24306).
9-Runge- Kutta-Merson Method
The problem of Runge Kutta Method is not compute an approximate
decimal error[Rounding Error or Truncation Error], we think RungeKutta-Merson Method give the an approximate the error of this problem
at any step as see in the following:1
6
yn+1 = yn + [k1+ 4k4 + k5],
k1= h f(xn, yn),
k2 = h f(xn +
k
h
, yn+ 1 ),
3
3
K3 = h f(xn +
k
k
h
, yn+ 1 + 2 ),
3
6
6
K4 = h f(xn +
3k
k
h
, yn+ 1 + 3 ),
2
8
8
K5 = h f(xn + h, yn+
k1 3k 3
+ 2k4 ).
2
2
We compute the error as
Error =
1
[2k1-9k3 + 8k4 - k5].
30
Example 11
Use Runge- Kutta-Merson Method to solve the D. E
dy
= x +y, with x0 = 0 , y0 = 1, for x = 0 to x0 = 1.0, with h = 0.1 work
dx
to (4D).
Sol
f(x, y) =
dy
= x +y
dx
k1= h f(xn, yn).
n = 0, x0 = 0 , y0 = 1
k1 = h f(0, 1)= 0.1[0 +1]= 0.1
k1 = 0.1
k2 = h f(xn +
= h f(0 +
k
h
, yn+ 1 ),
3
3
0.1
0.1
, 1+
).
3
3
= h f(0 .113, 1.0333) = 0.1[0 .113+1.0333]
K2 = 0.1067
K3 = h f(0 +
0.1
0.1
0.1067
, 1+
+
),
3
6
6
82
= h f(0.0333+ 1.0344),
= 0.1[0.0333+ 1.0344],= 0.1068.
K4 = h f(xn +
= h f(0 +
3k
k
h
, yn+ 1 + 3 ).
2
8
8
0.1
0.1
3(0.1068)
, 1+
+
).
2
8
8
= h f(0.05, 1.0525) = 0.1[0.05+ 1.0525]. = 0.1103.
k1 3k 3
+ 2k4 ).
2
2
0.1 3(0.1068)
= 0.1 f(0 + 0.1, 1+
+ 2(0.1103) ).
2
2
K5 = h f(xn + h, yn+
= 0.1 f(0.1, 1.1103 ),
= 0.1[ 0.1, 1+1.1103 ].= 0.1210.
1
6
yn+1 = yn + [k1+ 4k4 + k5],
1
6
1
y1 = 1 + [0.1+ 4(0.1103)
6
y1 = y0 + [k1+ 4k4 + k5],
+ 0.1210],
y1 = 1.1104.
x1 = x0 +h
x1 = 0 +0.1 = 0.1
 (x1, y1) = (0.1, 1.1104).
1
[2k1-9k3 + 8k4 - k5].
30
1
[2(0.1) -9 (0.1068) + 8 (0.1103) - 0.1210].
=
30
-6
 Error =6.667  10 .
Error =
Problems
1-Apply Range –Kutta methods to the initials value problem,
choosing h = 0.2, and computing(y 1 + y 2 + y 3+ y 4 + y5) of
y΄ = x+ y with y(0) = 0.
2- Use Range –Kutta methods to find numerical solution of the
following d. e.
(a) y΄ = 3x+
y
, with y(0) = 1, h = 0.1. On interval (0≤ x ≤1)
2
(b) y΄ = x+ y with y(0) = 1, in the range (0≤ x ≤1) 1, with h = 0.1.
3- Comparison of Euler and Range –Kutta methods to solve
y΄ = 2x-1 y  ln x + x-1, with y(1) = 0, h = 0.1. On interval (1≤ x ≤1.8).
And compute the error.
83
4- Solve problem (3) by classical Range –Kutta methods, with h =
0.4, determine the error, and compute with (3).
System of Linear Equation
Definition 1
Let the system of linear equation as
a11x1, a12x2… ,a1nxn = b1
a21x1, a22x2… ,a2nxn = b2
……………………..
………………………….. (8)
……………………..
Am1x1, am2x2… ,amnxn = bm
Can put the apove system in matrix form as: a11 a12

 a21 a22
 



 

 am 1 a m1
  
  
a1n  x1   b1 
   
a2n  x2   b2 
  
        ………………………….. (8)
   
  
      
   
   amn  xn   bm 
Or
AX=B, …………………………………….…………………….. (8)
 a11

 a 21
A=  
 

 a m1
a12
a 22


a m1
  
  
a1n 
 b1 
 x1 

 


a 2n 
 b2 
 x2 



  
 , B=  , and X=   

 


  
 
  
  

 


   a mn 
 bm 
 xn 
Where A=mxn, matrix, a11, a12…, amn are constant, X= nx1, B = mx1and,
b1, b2…, bm, are constant x1, x2… xn, variable.
Now we study the following methods {Cramer's Rule, Inverse
Matrices, and Elimination Method}
10-Cramer's Rule
84
To solve the system (8) by Cramer's Rule. Find determinate of A (| A|)
such that | A| ≠ 0.
Let
a11
a 21
| A| =D= 
a11
a 21
D2 = 

a m1
a12
a 22



a m1
a m1
  
  
a1n
a 2n
b1
b2
  
 , D1 = 
  


   a mn
bm
b1
b2
  
  


bm
  
 ,..., Dn = 
  


   a mn
a m1
a1n
a 2n
a11
a 21
  
  
a12
a 22


a m1
a12
a 22


a m1
a1n
a 2n
  
 ,
  

   a mn
  
  
b1
b2
    ,
   
   bm
To solve system (8), we must find unknown x1, x2… xn as
x1 =
D
D1
D
, x2 = 2 , … xn = n .
D
D
D
11-Solution of Linear Equations by using Inverse Matrices
To solve the system (8) by using Inverse Matrices Find determinate of
A (| A|) such that | A| ≠ 0.
Or
AX=B,
Turing to the relation between the solution of linear equation and matrix
inversion multiplying both sides by A-1 thus
A-1 [AX=B]
A-1 AX= A-1 B.
X= A-1 B.
This equation gives the values of the entire unknown X by a simple
multiplication of matrix A by inverse of it matrix. As see in the following
example
Example12
Use the matrix inversion method; find the values of (x1, x2, x3) for the
following set of linear algebraic equations:3x1 -6x2 + 7x3 = 3
4x1
-5x3 = 3……………………………. (9)
5x1 - 8x2 +6x3 = -4
Solution
Put the system (9) in the following matrix form as
AX=B,
85
 3  6 7  x1   3 

   
 4 0  5  x 2    3 
 5  8 6  x    4 

 3   
Where| A|
3 6 7
| A| = 4 0  5  462≠ 0.
5 8 6
We can find the inverse matrix of A (A-1), by any method.
 0.26 0.14  0.2 


 A =  0.52 0.12  0.52  , now we can see the following
 0.48 0.04  0.36 


-1
A-1 [AX=B]
A-1 AX= A-1 B.
X= A-1 B.
 x1   0.26 0.14  0.2  3 
  
 
 X=  x 2    0.52 0.12  0.52  3 
 x   0.48 0.04  0.36   4 
 
 3 
 x1   2 
   
 X=  x 2    4  , which gives the solution of system as x1 = 2,
 x   3
 3  
x2 = 4, x3 = -4.
12-Gauss Elimination Method
We can use Gauss Elimination Method to solve the system of linear
equation in (8), as see in the following example
Example 13
3x1 -x2 + 2x3 = 12
3x1 +2x2 +3x3 = 11……………………………. (10)
2x1 - 2x2 - x3 = 2
Solution
Put the system (10) in the following matrix form
3 -1 2 : 12
3 2 3 : 11
2 -2 -1 : 12
R1
R2 ................................................................. (11)
R3
Where Ri (i= 1, 2, 3) row of system.
Step 1
86
By using
R2 – R1, and 3R3 -2R1
System (11) become
3 -1 2 : 12
0 7 7 : 21
0 -4 -7 : -8
R1
R2 ............................................................ (12)
R3
Step 2
By using
7R3 +4R2
System (11) become
3 -1 2 : 12
0 7 7 : 21
0 0 -21 : -42
R1
R2 ............................................................ (13)
R3
Step 3
From last system (13) we the following equation
3x1 -x2 -2x3 = 12
7x2 +7x3 = 21
-21x3 = -42
Which can easily to solve this system to find:x3 = 2, x2 = 1, x1 = 3.
13- Iterative Methods (Gauss Siedle Methods)
We can use Gauss Siedle Method to solve the system of linear equation in
(8), as see in the following example
a11x1 +a12x2+a13x3 = b1
a21x1+a22x2+a23x3 = b2 ................................................ (14)
a31x1+a32x2+a33x3 = b3
To solve the system (13) by using Gauss Siedle Method can see the
following steps:Step 1
Re write system (13) as form
x1 =[ b1- a12x2-a13x3] ⁄ (a11)
x2 =[ b2- a21x1-a23x3] ⁄ (a22) ................................................ (15)
x3 = [ b3- a31x1- a32x2] ⁄ (a33).
Step 2
Selected initial values of x1 , x2 and x3 put in system (16). For example
(Let x1 = x2 = x3=0 initial values)
Step 3
87
By using the new value of x1, x2 and x3 as Step 2.Repeated Step2 until no
change of values of x1, x2 and x3.As see in following example
Example14
5x1 -2x2 +x3 = 4
x1 +4x2 -2x3 = 3……………………………. (16)
x1 +4x2 +4x3 = 17
Solution
Step 1
Re write system (16) as form
x1 =[ 4+ 2x2-x3] ⁄ (5) .................................................... (17)
x2 =[ 3- x1+2x3] ⁄ (4) ................................................ (18)
x3 = [ 17- x1- 4x2] ⁄ (4). ................................................ (19)
Step 2
Selected initial values of x1, x2 and x3 put in system (15). For example
(Let x1 = x2 = x3=0 initial values).
Then get x1 from Eq (17){by using x2 = x3=0 } → x1 = 4 ⁄5=0.8, x2 from
Eq (18) {by use new of x1 =0.8, x3=0 } gives→ x2 = 0.55.Find x3 from Eq
(19) {by use new of x1 =0.8, x2 = 0.55} gives → x3 = 0.55.
Step 3
By using the new value of x1, x2 and x3 as Step 2.Repeated Step2 until no
change of values of x1, x2 and x3.As see in following values
n
0
1
2
3
4
5
6
7
X1
0
0.8
0.265
1.247
0.956
1.002
1.001
0.999
X2
0
0.55
2.572
1.889
2.008
2.003
1.999
2.000
X3
0
3.775
2.898
3.007
2.998
3.000
3.000
3.000
In general let k (where k integer number) denoted repeated to number of
iteration. Then we can rewrite the system (15) as form:x1k = [b1- a12 x 2k  1 -a13 x 3k  1 ] ⁄ (a11)
x 2k = [b2- a21 x1k -a23 x 3k  1 ] ⁄ (a22)
................................................ (20)
x 3k = [b3- a31 x1k - a32 x 2k ] ⁄ (a33).
88
Suppose that a11 ≠ 0, a22 ≠ 0, a33 ≠ 0.
Problems
(a) Use Gauss Elimination Method to solve the following system of
linear equation
(5)
(1)
2x1 +x2 -3x3 = 1
3x1 -x2 +3x3 = 12
5x1 +2x2 -6x3 = 5
x1 +x2 +3x3 = 11
3x1 -x2 -4x3 = 7
2x1 -2x2 -x3 = 2
(2)
2x1 -x2 +x3 = 1
(6)
3x1 -2x2 + x3 = 0
2x1 -4x2 +6x3 = 5
5x1 +x2 2x3 = 9
x1 +3x2 -7x3 = 2
(3)
7x1 +5x2 +9x3 = 4
x1
+2x3 = 3
(7)
2x2 +3x3 = 5
-x1 +x2 +2x3 = 2
2x3 +x4 = 7
3x1 -x2 + x3 = 6
x1
+4x4 = 5
-x1 +3x2 +4x3 = 4
(4)
x1 +2x2 -4x3 = 4
5x1 -3x2 -7x3 = 6
3x1 -4x2 +3x3 = 1
(b) Use Gauss Siedle Method to solve the following system of linear
equation
(5)
(1)
2x1 +x2 -3x3 = 1
3x1 -x2 +3x3 = 12
5x1 +2x2 -6x3 = 5
x1 +x2 +3x3 = 11
3x1 -x2 -4x3 = 7
2x1 -2x2 -x3 = 2
(2)
2x1 -x2 +x3 = 1
(6)
3x1 -2x2 + x3 = 0
2x1 -4x2 +6x3 = 5
5x1 +x2 2x3 = 9
x1 +3x2 -7x3 = 2
7x1 +5x2 +9x3 = 4
89
(3)
x1
+2x3 = 3
2x2 +3x3 = 5
2x3 +x4 = 7
x1
+4x4 = 5
(7)
-x1 +x2 +2x3 = 2
3x1 -x2 + x3 = 6
-x1 +3x2 +4x3 = 4
(4)
x1 +2x2 -4x3 = 4
5x1 -3x2 -7x3 = 6
3x1 -4x2 +3x3 = 1.
14-Least Squares Approximations
Let y denoted to real value, y denoted to approximation value, and d
denoted to deferent between the real value (y) from tables, and
approximation value ( y ), denoted to it in general as:di = yi- y i , where i= 1, 2…m.
Let there are m value y as (y1 … ym) corresponding to m value of x as(x1
… xm) gives m of different d as (d1 … dm), where
d1 = y1- y1 ,
d2 = y2- y 2 ,
…
…
dm = ym- y m .
The method of Least Squares Approximations using, the summation of
m
difference (  d i ) at minimum. We square the difference because the
i 1
negative sign.
m
m
i 1
i 1
 (d i ) 2 =  ( y i  y i ) 2 .
Let the relation between x and y at linear form as:y1 = a+bx1,
The difference become as
di = yi- a-bxi, let
m
q =  (d i ) 2 , or
i 1
m
m
q =  (d i ) 2 =  ( y i  a  bx i ) 2 or
i 1
m
i 1
q =  ( y i  a  bx i ) 2 ……..……………………..… (21)
i 1
There are only two unknown (a and b) in Eq (21).
90
Now if q at minimum, then first partial derivative of q (w .r .to) a and b
must equal to zero as:m
q
=   2( y i  a  bx i )
a i  1
=0
m
q
=   2 x i ( y i  a  bx i ) = 0.
b i  1
Re-write above equations as
m
m
ma+ (  x i )b =  y i ……..……………………………..… (22)
i 1
i 1
m
(  x i )a
m
m
i 1
i 1
+ (  x 2 i )b =  x i y i ……..……………………..… (23).
i 1
Put Eq (22and 23) in the following matrix form

 m

 m

  xi
 i 1
 a   m

  
yi 

  

i 1
i 1



 …..……………………..… (24)


m
m

2   
 x i  b    x i y i 
i 1

 i 1

m
 xi
We can find two unknown (a and b) in Eq (21). By using crammers rule
as:m
 xi
m
Let D =
i 1
m
m
…..……………….…………..… (25)
 xi  x 2 i
i 1
i 1
Where D the determinant such that D ≠ 0, and
m
D1=
 yi
i 1
m
 xi yi
i 1
m
m
 xi
i 1
m
x
i 1
2
 yi
m
, D2 =
i
m
i 1
m
 xi
,
 xi yi
i 1
i 1
D
D
a= 1,b= 2 .
D
D
Example 15
Find the following points to linear form y = a+ b x, where
91
x y
1 3
2 5
3 8
4 13
5 16
Solution

x y


1 3

2 5


3 8

4 13


5 16

 Sum 15 45

xy 
1
3 

4 10 
9
24 

16 52 
25 80 

55 169 
x2
From Eqs. (21 and 23)
5a+15 b = 45,
15a+55 b = 169,
D=
5
15
15 55
= 50
45
a=
15
169
55  6
D1
,a=
=
D
50
5
17
6
y=
5
+
5
5
b =
D2
D
=
15
45
196 17
=
50
5
x,
5y = -6+ 17 x,
Example 16
Find the following points to linear form y = a ebx. Where
X
Y
0
1.5
1
2.5
2
3.5
3
5
4
7.5
92
Sol
Ln y = Ln(a ebx) → Ln y = Ln(a) + Ln(ebx)
→ Ln y = Ln(a) +bx , compare with standard equation Y = A+ b X
Y = Ln y Ln(a) = A, b = b, X= x .
X
0
1
2
3
4
Sum=10
Y
1.5
2.5
3.5
5
7.5
X=x
0
1
2
3
4
10
m
Xi 2
0
1
4
9
16
30
Y=Lny
0.40547
0.91629
1.25276
1.60944
2.01490
6.19866
Xi Yi
0
0.91629
2.50553
4.82831
8.05961
16.30974
m
Y = A+ b X→ ma+ (  x i )b =  y i
i 1
m
(  x i )a
i 1
i 1
m
m
i 1
i 1
+ (  x 2 i )b =  x i y i
5a+10 b = 6.19866,
10a+30 b = 16.30974,
D=
5
10
10 30
= 50
6.19866
a=
10
5
16.30974 30
D1
D
,a=
=0.45736, b = 2
D
50
D
==
6.19866
10 16.30974
=0.39120.
50
A = Ln(a) → eA= eLna → eA= a→ eA= e0.45736,
→ a = 1.5799, b
Y = 1.5799 e
= 0.39120.
0.39120X
Reference
1- Mathematical Method for Science Students G Stephenson.
2-A Course of Mathematics for Engineers and Scientists B. H Chirgwin.
3- A advanced Engineering Mathematics C. Ray Wylie.
4-Calculus Davis.
93
Download