Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical...

93
Save from: www.uotechnology.edu.iq 2 nd class Advance Mathematics and numerical analysis اﻟﺮﯾﺎﺿﯿﺎت اﻟﻤﺘﻘﺪﻣﺔ واﻟﺘﺤﻠﯿﻞ اﻟﻌﺪدي اﺳﺘﺎذ ا ﻟﻤﺎده: م. د. ﻋﺒﺪاﻟﻤﺤﺴﻦ ﺟﺎﺑﺮﻋﺒﺪاﻟﺤﺴﯿﻦ

Transcript of Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical...

Page 1: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

Save from: www.uotechnology.edu.iq

2ndclass

Advance Mathematics and numerical analysis

الریاضیات المتقدمة والتحلیل العددي

عبدالمحسن جابرعبدالحسین.د.م:لمادها استاذ

Page 2: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

2

CHAPTER ONE Definition

Partial Derivative-1If f is a function of the variables x, and y in the region xy plane

at pointwith respect to (w. r. to) x, of fPartial Derivativethe (x, y) is

∂f/∂x =x

yxfyxxfx

),(),(

0lim

And (w. r. to) y at point (x, y) is

∂f/∂y =y

yxfyyxfy

),(),(

0lim

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 orDX 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 IIt 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.

Page 3: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

3

Example1Let f(x, y) = x2 -y2 +xy +7.Then find fx , fy , fx x ,and fxy

Solution fx= 2x + y fy = -2y +x fxy = 1.Problem1-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 = 224 yx

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 fx , fy .7-Prove that Uxy= Uy x

If a-U = x siny + ycosx b-U = x Lny 2-Chain Rule1- Function of one variablesIf y = f (x), and x = x (t), y = y (t) then

t

y

=

x

y

t

x

2- Function of two or three variables isa- If Z = f(x, y), x = x (t), y = y (t) then

t

Z

=

x

Z

t

x

+

y

Z

t

y

b- If Z = f(x, y, w), x = x (t), y = y (t) , w = w (t) then

t

Z

=

x

Z

t

x

+

y

Z

t

y

+

w

Z

t

w

Example2Let f(x, y) = exy, x = rcosθ, y= r sinθ Find rf and f , in term r and θ. Solution

Page 4: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

4

r

f

=

x

f

r

x

+

y

f

r

y

x

f

= yexy

y

f

= xexy

r

x

= cosθ

r

y

= sinθ

r

f

= yexy cosθ+ xexy sinθ

= coscos2

cossin2 rer

= coscos2

2sin rer .

f =

x

f

x +

y

f

y

x = -r sinθ

y = rcosθ

f = yexy (-r sinθ)+ xexy (rcosθ)

= coscos22 2

sin rer + coscos22 2

cos rer

= )sin(cos 22coscos2 2

rer

= coscos2 2

2cos rer .

Problem Find ft, in the following function1- f(x, y) = x2 - y2, x = et, y= 2 t-62- f = x2 - xy2, x = cos t, y= e-t

3- f = y/x, x = ln t, y= cot t4- f = exyln( x - y), x = t3 , y= 2 t- t3

5- f = yx , x = sin-1t, y= sint

6- f =yx

x

, x = cosh t, y= sinh t

7- f = sin(x+ y - z), x = sin t, y= 2te , z = ln t

8- f = )(tan 1

y

x , x = et cos t, y= et sin t

Page 5: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

5

9- f =y

x , x = et, y= 2 t-6

Find U x , U y and U z, in the following function

10- U = )(tanh 1

s

r , r = x sin yz, s= x cos yz

11-U = ln( r+ s + t)if, r = xy, s= x z, t= y z3- The Total Differential The total differential of function W = f(x, y, z),………………………………..(1)Is defined to be

dw =x

f

dx +

y

f

dy +

z

f

dz

Or dw = fx dx + fy dy + fz dzIn general the total differential of functionW = f(x, y, z, u,………..,v) is defined by dw = fx dx + fy dy + fz dz+ fu du+…….+ fv dvwhere 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 byx = x (t), y = y (t), z = z (t), then we have

dx =t

x

dt , dy =

t

y

dt, dz=

t

z

dt.

Or in the form:-x = x(r, s), y= y(r, s), z = z(r, s).Then we hadx =

r

x

dr+

s

x

ds

dy =r

y

dr+

s

y

ds ……………………..(2)

dz =r

z

dr+

s

z

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 =

x

w

dx +

y

w

dy +

z

w

dz

dw =[r

x

dr+

s

x

ds ]

x

w

+ [

r

y

dr+

s

y

ds ]

y

w

+[

r

z

dr+

s

z

ds]

z

w

Page 6: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

6

=[x

w

r

x

+

y

w

r

y

+

z

w

r

z

] dr+ [

x

w

s

x

+

y

w

s

y

+

z

w

s

z

]ds…….(4)

Example3Find the total differential of function

W = x2 + y2+ z2 ifx = r coss, y= r sins and z = r Solution

dw = wx dx + wy dy + wz dz = 2xdx + 2y dy + 2z dz dx =

r

x

dr+

s

x

ds, or

dx = xr dr + xs ds =cossdr - r sins dsdy = 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 sinscoss ] ds + 2r dr.],dw = 4r dr].

ProblemIf U = f(x, y) Find dU, in the following:-1- U = 2Lnx + Lny2 if, x = e-t, y= et. 2- U = tan-1x + = 21 y 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 = y

x , x = sech t, y= coth t.

6- U = )(tanh 1

s

r , r = x sin yz, s= x cos yz

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) = )(tan 1

y

x . Prove that fx x + fyy. = 0

10- If f(x, y) = e-2y xcos2x. Prove that fx x + fyy. = 0

Page 7: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

7

11- If W= sin(x+ ct). Prove that Wtt = c2 W x x.12- If W= cos(2x+ 2ct). Prove that Wtt = c2 W x x.13- If W= Ln(2x+ 2ct)+ cos(2x+ 2ct). Prove that Wtt = c2 W x x.14- If W= tan(x- ct). Prove that Wtt = c2 W x x.

Page 8: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

8

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) xeydx

dy

dx

yd

dx

yd233

2

2

3

3

(b) ∂2u/∂x2 + ∂2u/∂y2 = 0

(c)dx

df +x = sinx

(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

CHAPTER TWO Differential Equations (d.e)

Page 9: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

9

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+ c3e

x

(2) x y˝+ y ΄ =0 where y = c1lnx+ c2

(3) y˝+9 y = 4cosx where 2y = cosx(4) y˝ -y = e2x where y = e2x

(5) y˝ =2 y sec2x where y = tanx.First Order Differential EquationsThe 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=ydxydx-xdy=0

(ydx-xdy=0) xy

1,

0y

dy

x

dx, by integral of two sides

cy

dy

x

dx ,

Lnx-lny=c,

cy

xln ,

1cey

x c ,

.1c

xy

Problems Solve the following differential equations:-

1- x(2y-3)dx +(x2+1)dy=0

2- x2(y2+1)dx +y 013 dyx

Page 10: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

10

3-dx

dy= ex-y

4- xydx

dy=1

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) Where k is constant.

N (kx, ky) =knN(x, y)

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 =xyM(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

dx

dy= f(y/x)………………………………………………… (3)

Let v= y/x…………………………………………………. (4)

Put (4) in (3) dx

dy= f(v)…………………………………..(5)

From (4) y=xv, and dy = xdv+vdx, divided by dx

Page 11: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

11

vdx

dvx

dx

dy , since

dx

dy= f (v) from (5)

f(v) vdx

dvx f (v)-v

dx

dvx

(f(v)-v)dx =xdv x

dx

vvf

dv

)(

0)(

vfv

dv

x

dx . Or

……………………………………………… (6) 0)(

vvf

dv

x

dx

After solving replace v by y/x. Example Solve (x2 +y2) dx + 2xydy=0Solution

Since this equation (H.d.e). Now 2xydy= - (x2 +y2)dx ,

dx

dy=

xy

yx

2

22 , put y=xv

dx

dy=

)(2

222

xvx

vxx =

v

v

2

1 2

f(v) = v

v

2

1 2 '

0)(

vfv

dv

x

dx ,

0

2

1 2

v

vv

dv

x

dx ,

031

22

v

vdv

x

dx, by integral both sides

lnx + 1/3ln(1+3v2) = c,lnx + 1/3ln(1+3y2/x2) = c

cx

yx 3

2

231ln ,

13 22

1

3 22

3

3

cyx

cx

yxx

, cecwhere 1

Problems Solve the following differential equations:-

(1) 2xydx -(xy+x2)dy=0(2) (x2+2y2+3xy)dx +x(x-2y)dy =0

Page 12: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

12

(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=03-Exact Differential Equation

The differential equation as formM(x,y) dx+N(x,y) dy =0………………………………….……..(7)There is functionf(x,y)=c………………………………………………….……...(8),

Which a solution of (7).df(x,y)=0……………………………………………….………..(9).From total partial differential equationdf(x,y)= ∂f/∂x dx + ∂f/∂y dy…………………………………(10).

From 7,8,9 and 10, ∂f/∂x =M ………………………………………………... (11)

∂f/∂y = NNow

∂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.ExampleSolve the following differential equation

dx

dy=

yx

xy2

2

1

1

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)

Page 13: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

13

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 FactorIf the equation M dx+N dy =0.Is not exact, then there is such thatM dx+N dy =0……………………………………………….(*)Is exact then∂ ( M)/∂y = ∂ ( N)/∂x.To find ( is called integrating factor).Theorem I

(i) If )(xfN

x

N

y

M

(function of x, or constant.

Then = e∫ f(x)dx.

(ii) If )(ygM

y

M

x

N

(function of y, or constant.

Then = e∫ g(y)dx.(iii) If is function of x and y, then there is no general method

to find (integrating factor).ExampleSolve the following differential equationydx +(3+3x -y)dy=0

SolutionM=y, N= 3+3x –y.

My = 1 Nx =3, not exact

Page 14: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

14

yoffunctionisyyM

MN yx ,213

Then = e∫ g(y)dy

= 2ln2

2

yee ydy

y

(ydx +(3+3x -y)dy=0) y2

y3dx +(3 y2+3x y2 -y3)dy=0M= 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

A΄ (y) =3 y2 -y3,A(y) = y3 -y4/4 +c put in (*)f= y3x+ y3 -y4/4 +c.ExampleSolve the following differential equation

dx

dy=x-y

Solutiondy= (x-y)dx(x-y)dx-dy=0M=x-y, N= –1.

My = -1 Nx =0, not exact

xoffunctionisN

NM xy ,11

01

Then = e∫ f(x)dx = xdxee

((x-y) dx-dy=0) ex

ex (x-y)dx- ex dy=0M= 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.

Page 15: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

15

4- First – Order Linear Differential Equation If the equation as form:-

dx

dy+P(x) y = Q(x)……………………………………………… (15)

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 Idy + 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 +cExampleSolve the following differential equation

dx

dy+

x

y=2

SolSince P =1/x, Q = 2

I= e∫ pdx = I= e∫ dx/x = e lnx = x.The solution Iy = ∫IQ dx +cxy = ∫2x dx +c,xy = x2 +c

y =x + c/xProblems

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

dx

dy+P(x) y = Q(x) yn ……… (*), if n 1.

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

Page 16: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

16

[dx

dy+P(x) y = Q(x) yn] y - n

dx

dyy -n +P y1-n = Q …………………. (**).

Let w = y1-n dw = (1-n) y – n dy or

n

dw

1= y – n dy put in (**)

dxn

dw

)1( +P y1-n = Q,

or Which is L-equation

dx

dw+ (1-n)P w = (1-n) Q

ExampleSolve the following differential equation

dx

dy+

x

y=y2

Sol

[dx

dy+

x

y=y2] y -2

dx

dyy -2+

x

y 1

= 1…………. (#),

Let w = y -1 dw =- y -2 dy-dw = y -2 dy, put in (#)

-dx

dw+

x

w= 1

dx

dw-

x

w= -1.

P = -x

1 , Q = - 1,

I= e∫ pdx = I= e-∫ dx/x = e -lnx = x

1.

The solution Iw = ∫IQ dx +c,

x

w= ∫ -

x

1dx +c,

Page 17: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

17

x

w= - lnx + c,. Since w = y -1 =

y

1

xy

1= - lnx + c,

y =)ln(

1

xcx .

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 EquationSpecial Types Certain types of second order differential equation such that

F(x, y,dx

dy,

2

2

dx

yd)…………………………………………………(17)

Can be reduced to first order equations by a suitable of variables:-Type I Equation with dependent variable when equation as form

F(x,dx

dy,

2

2

dx

yd)……………………………………………..……(18)

It can be reduced to first order equation by suppose that:-

p = dx

dy,

2

2

dx

yd=

dx

dp

Then equation (18) takes the form

F(x, p,dx

dp) =0,

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 = ∫ (dx

dy) dx +c=∫ p dx +c =∫ q(x,c1 ) dx +c.

Type II Equation with independent variable when equation (17) does not

contain x explicit but has the form

Page 18: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

18

F(y,dx

dy,

2

2

dx

yd)=0…………………………………………..……(19)

The substitution to use are :-

p = dx

dy,

2

2

dx

yd=

dx

dp=

dy

dp.

dx

dy=

dy

dpp

The equation (19) become

F(y, p, pdx

dp) =0,

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 1Solve the following differential equation

2

2

dx

yd +

dx

dy=0…………………………………..……………. (*)

Let p = dx

dy,

2

2

dx

yd =

dy

dpp, put in (*)

dy

dpp +p =0, ÷ p

dy

dp+1 =0,

dp +dy =o. by integration p+y = c1

dx

dy+y = c1

dx

dy = c1 -y

yc

dy

1= dx -ln(c1 –y) =x+c2

ln(c1 –y) = -x+c2 c1 –y = 1cxe = ce-x

y = c1 - ce-x

Example 2Solve the following differential equation

X2

2

2

dx

yd +x

dx

dy= 1

2

2

dx

yd +

dx

dy

x

1= 1/x2……………………………………………. (**)

Let p = dx

dy and

2

2

dx

yd =

dx

dp, put in (**)

Page 19: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

19

dx

dp +

x

1p = 1/x2 , which linear in p,

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 dx

dy= (lnx)/x + c/x

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)m2emx +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= xmxm ecec 21

21

Page 20: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

20

Case iii If m1 and m2 roots ( m= + i where i= 1 ) in equation (21), the solution of (20) (homogeneous equation ) is

yh= )sincos( 21 xcxce x

Ex iSolve 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 =0Which called characteristic equation? (m+2)2 =0 m1 =m2 = -2, the solution of (*) is yh= (c1 + xc2) e-2x

Ex iiSolve y˝ +y΄ -6y=0…………………………………………..(**)Sol let y= emx , y΄ = memx and y˝ =m2emx, put in (*) m2emx + memx -6emx =0 emx (m2 + m-6) =0, since emx 0, then m2 +m-6 =0This 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 iiiSolve 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 =0This called characteristic equation

m1 =2

44

2

20164

,

m2 = 2 i + i , =2, =1, yh= e2x (c1 cosx + c2 sinx).

Page 21: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

21

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 CoefficientThe 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

itconsnandm

xnxm

xk

xkptconscceke

tsconsarekkk

kxkxkxk

n

kx

yxf

pxpx

n

nn

nn

np

tan

sincos

cos

sintan,

0tan,,......,

.........

),.........2,1(

mod)(

01

011

1

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,

Page 22: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

22

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].Example1By 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

Example2Find 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 =0This 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=0k2 =-2, k1 = 0, k0=-1yp = -2 x2 -1 y (x) =yh + yp

y (x) = c1 e-2x + c2 e-2x -2 x2 -1.

Page 23: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

23

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 )sincos xeorxe xx , 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,andv΄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, andv΄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) isY(x) = v1 u1 + v2 u2

Example1Find the general solution of the following (d.e)

y˝ -y΄-2y= e-x…………………………………………………. (*)

Page 24: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

24

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,From (#)v΄1 e2x = - 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 13 x dy =0

3- Sinxdy

dx +cosh2y = 0

4 - xy2dx

dy= 1

5- Lnxdy

dx = y

x

6- ( xey dy+ y

x 12 dx=0

7- y 21 x dy + 12 y dx = 0

Page 25: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

25

8- x2ydx

dy= (1+x) cscy

9-dx

dy= ex-y

10- ey secx dx + cosx dy = 0 (H. d. e)11- (x2 + y2) dx +xydy = 012 - x2 dx + (y2 –xy)dy = 013 – x ey/x +y)dx –xdy = 014 –(x +y) dy +(x – y) dx = 0

15 -dx

dy=

x

y+ cos (

x

xy )

16- xdy-2ydx= 0 17- 2xydy +( x2 -y2)dx = 0 (Linear d. e)

18-dx

dy+ 2y = e-x

19- x y΄ +3y = 2

sin

x

x

20- 2 y΄- y =ex/2

21- xdy+ ydx = sinx dx22- xdy +ydx = ydy23- (x-1)3 y΄ + 4 (x-1)2 y =x+124- Coshx dy+ (y sinhx+ ex) dx=025- e2y dx +2(x e2y –y)dy = 026 – (x-2y) dy + y dx = 027 – (y2 +1) dx+ (2xy + 1) dy = 0 (Exact d. e)Use the given integrating factor to make (d. e) exact then solve theequation

28 - (x+2y) dx – x dy = 0, (I = 3

1

x)

29 – y dx + x dy = 0 , (I = xy

1) or (I =

2)(

1

xy)

Solve (exact d. e)30 - (x + y) dx + (x+y2) dy = 031 – ( 2xey +ex) dx + (x2 +1) ey dy = 032 – ( 2xy + y2)dx + (x2 + 2xy – y )dy = 0

Page 26: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

26

33- (x+ 12 y )dx – (y-

12 y

xy)dy =0

34- x dy+ y dx+ x3dx =035- x dy- y dx = x2 dx 36- (x2 +x-y) dx +xdy = 0

37- (ex +lny + x

y) dx +(

y

x+ lnx +siny) dy =0

38- (2

2

1 x

y

- 2y) dx + (2y tan-1x – 2x + sinhy)dy =0

39- dy + x

xy sindx = 0

(Second- Order)40- y˝ +2y =0

41- y˝ + 5 y΄ + 6y= 0 42- y˝ + 6y΄ + 5y= 0

43- y˝ - 6 y΄ + 10y= 044- y˝ + y= 045- y˝ + y΄ x46- y˝ + y= sinx47- y˝- 2 y΄ + y= e-x

48- y˝ + 2 y΄ + y= ex

49- y˝- y= sinx50- y˝ + 4 y΄ + 5y= x+2.51- y˝ - y= ex

52- y˝ + y= secx53-y˝ + y= tanx

54-y˝ + y= cotx

Page 27: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

27

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)} =

0

)( dttfe st ............................................................ (1)

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) =1Solution

Since L {f (t)} =

0

)( dttfe st = Istes

0

1=0+

s

1e0 =

s

1

L (1) =s

1 .

2-If f (t) = ateSolution

Since L {f (t)} =

0

)( dttfe st

L {f (t)} =

0

dtee atst = L {f (t)} =

0

)( dte tsa

=

0

)( dte tas = Itaseas

0

)(1

=as

1

}{ atel = as

1.

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).

Page 28: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

28

Solution From Euler formula

iwte = cos (wt) + isin (wt).L{ iwte } = L{ cos (wt)} + i L{sin (wt)}……………………(*).But

}{ iwtel = iws

1, from (2)

iws 1

=iws

1

iws

iws

=22 ws

iws

=22 ws

s

+i

22 ws

w

}{ iwtel =22 ws

s

+i

22 ws

w

, from (*)

L{ cos (wt)} + i L{sin (wt)}= }{ iwtel =22 ws

s

+i

22 ws

w

From this

3- L {cos (wt)} = 22 ws

s

4- L {sin (wt)} = 22 ws

w

5-If f(t) = sinh (wt).6-If f(t) = cosh (wt).Solution

Since sinhx = 2

1[ ex – e-x], coshx =

2

1[ ex + e-x].

Now sinh (wt) = 2

1[ ewt – e-wt],

L {sinh (wt)} = 2

1{L ( ewt) – L( e-wt)},

= 2

1{

ws 1

-ws

1}.

=2

122

2

ws

w

=

22 ws

w

L {sinh (wt)} =22 ws

w

, and

Page 29: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

29

L {cosh (wt)} =22 ws

s

.

Example 1 Find L{8-6e3t + e-4t +5sin3t+7cosh3t}Solution

L(8)= 8L(1)= 8 s

1=

s

8 .

L (6 e3t) = 6L ( e3t) = 3

6

s

L ( e-4t) = 4

1

s

L {5sin (3t)} = 5L {sin (3t)} = 59

32 s

=9

152 s

L {7cosh (3t)} = 7L {cosh (3t)} =9

72 s

s

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)} =

0

´f dtte st

Proof

∫udv = uv-∫vdu.Let u= ste du =-s ste dt,dv = f ΄ (t) dt v =f(t),

0

´f dtte st = Ist tfe

0)( +

0

)( dttfes st

=o- e0f(0) +s

0

)( dttfe st

= -f(0) + s L{f(t)}. Where s

0

)( dttfe st = s L {f (t)}.

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 :-

Page 30: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

30

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 generalL { fn (t)} = sn L {f (t)} – sn-1 f(0) ----------- fn-1 (0). ProblemProve that

L {tn} = 1

!ns

n, where n=1, 2, 3, ……….., and n!= n(n-1)(n-2)…..(n-n).

And 0! =1.Properties of L. T

(1) ShiftingIf L {f (t)} = f(s) = L{ ate f(t)} f(s-a)

ExampleFind L{ e-4tcos3t}

Solution

f(t) =cos3t, a=-4, then f(s) = L {f (t)}= L{ cos3t} = 92 s

s

L{ e-4tcos3t} = 9))4((

)4(2

s

s=

9)4(

42

s

s

(2) L. T of Integrals:

L { t

0

f (u) du} = s

sf )(

Example

Find L { t

0

sinh2tdt}

Solution

Page 31: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

31

F (u) = L{sinh2t} = 4

22 s

, L { t

0

sinsh2tdt}= s

s 4

22

=)4(

22 ss

.

(3) Multiplication by tn

If L {f (t)} = f(s), then

L {tn f (t)} = (-1)n

n

n

ds

sfd )(

ExampleEvaluate L {t2 e3t }

Solutionf(t)= e3t

L ( f(t)) = L ( e3t) = 3

1

s=f(s)

f ΄(s)= ∂f/∂s = 2)3(

1

s

f ˝(s) = ∂2f/∂s2 = 3)3(

2

s

L {t2 e3t } = (-1)2

3)3(

2

s=

)3(

2

3s

(4) Division by t

If L {f (t)} = f(s) , and t

tft

)(0lim exist

L { t

tf )( }=

s

f(u)du

ExampleEvaluate

L { t

tsin }

Solution

t

tt

sin0lim = 1, exists.

f(t) = sint L{sint} = 1

12 s

=f(s)

Page 32: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

32

f(u)= 1

12 u

L { t

tf )( }= L { t

tsin } =

s 1

12 u

du = tan-1u Is

= tan-1 - tan-1s

= Π/2 - tan-1s.ExampleLet 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 ,

L {f (t)}= L{ cos3t} = 92 s

s,

L {f (t)}= L{2 cos3t} = 2L{ cos3t} = 9

22 s

s=f(s).

L {f ˝ (t)} = s2 [9

22 s

s] – s [2] - 0

=9

32 s

s -2s

L {f ˝ (t)} =9

182

s

s .

Unit Step Function ua (t)Definition 2.2 The unit step function is defined by:-

0 when t < aua (t) = 1 when t > a

If a=0, then

0 when t < 0u0 (t) =

1 When t > 0.

If a=2, then 0 when t < 2U2 (t) = 1 when t > 2Definition 2.3.1

Page 33: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

33

To find Laplace Transformation of unit step function (L { ua

(t)}) is defined as :-

Since 0 when t < a ua (t) = 1 when t > a

L { ua (t)} =

0

)( dttfe st =

0

)( dttue ast

=

a

sta

st dtedte )1()0(0

= Ia

stes

1= -

s

1[0 – e-sa ] =

L { ua (t)} =s

e sa

.

Definition 2.3.2 To find the terms of the unit step function is defined by:-

1 when 0<t < 1f(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).

SolutionSince f(t) = u0 + u1 – 3u2 +u3

L{f(t)} = L{u0(t)} + L{u1(t)} – 3 L{u2(t)} +L{u3(t)}

=s

e s )0(

+ s

e s

- 3s

e s2

+ s

e s3

Page 34: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

34

= s

1 + s

e s

- 3s

e s2

+s

e s3

.

L. T of Periodic Functions If f (t) is Periodic function of period T>0 satisfy such that f(x+T) = f(x), then

L {f (t)} = sT

stT

e

dttfe

1

)(0

Gamma Function

Definition 2.4 If (n >0), then the gamma (n) becomes:-

(n)=

0

1 dtet tn………………………………………………………….( )

Important Properties of gamma function(i) (n+1) = n (n)ii) (n+1) = n!

(iii) (2

1) = (Π)

Table ISome elementary function f (t) their Laplace Transforms L {f (t)} = f(s).

Page 35: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

35

1

0

22

22

22

22

22

1

32

2

)1()(14

)()1()(13

)(

)(12

)0()0()()0()0()}({)(11

)0()()0()}({)(10

sinh9

cosh8

sin7

cos6

15

!

,...3,2,1,4

!2

3

1

2

111

)()}({)(

nn

n

nn

n

t

at

nn

s

nnpositivet

s

sftft

s

sf

duuf

ysysfsysytyLsty

yssfytysLty

as

aat

as

s

at

ws

w

wt

ws

s

wt

ase

s

n

nt

st

st

s

sftfLtf

Page 36: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

36

Problems

Find Laplace transform (f(s)) of the following functions :-1- f(t) = sin2 t2- f(t) = t4 e3t

3- f(t) = e-t cosh 3t

4- f(t) = t

tsinh

5- f(t) = t2 e3t

6- f(t) = 3t+47- f(t) = t2 +at +b 8- f(t) = ( a+bt)2

9- f(t) = t e-t

10- f(t) = (e2t -4)2

11- f(t) = t eatsinat12- f(t) = cosh at cos at

0 when 0<t < 2 13-f (t) = 4 when 2<t.

14 -Prove that 50

3sin

0

3

dttet t

15- Prove that

(a) = L {a+bt} = 2s

bas

(b) = L {t cos at} = 222

22

)( as

as

,

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) = 3

1

s=f(s).

L-1{f(s)} = L-1{3

1

s} = e3t.

Some Properties of Inverse L. T

Page 37: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

37

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)= s

1 ,

L-1{f(s)} = L-1{s

1 } =1,

Example1

Find f (t), if f(s) =3

5

sSolution

f(t) = L-1{3

5

s} = 5L-1{

3

1

s} = 5 e-3t

Example1

Find f (t), if f(s) =1

12

s

s

Solution

f(s) =12 s

s+

1

12 s

,

f (t) = L-1{12 s

s} + L-1{

1

12 s

},

= cost + sint.Partial Fraction

If we want to find the inverse transform of a rational function as )(

)(

xg

xf, where f and g

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

Find the inverse Laplace transform (f (t)), if f(s) = )1(

122 ss

Solution

f(s) =)1(

122 ss

,

)1(

122 ss

= 2s

B

s

A +

12

s

DCs ,

1= As3 +Bs2 + As + B + Cs3 +Ds2,B =1,B+D =0,A+ C =0,

D = -1 A=0 C=0,

)1(

122 ss

= 21

s -

1

12 s

,

Page 38: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

38

f (t) = L-1{)1(

122 ss

} = L-1{21

s} - L-1{

1

12 s

},

= t2 – sint.

Example2

Find the inverse Laplace transform (f (t)), if f(s) = 6

12

ss

s

Solution

f(s) =6

12

ss

s = )2)(3(

1

ss

s =23

s

B

s

A .

S+1 =As - 2A + Bs + 3B,-2A +3B = 1,A+B =1,

-2A +3B = 12A + 2B = 2 +

5B=3 B =3/5, A = 2/5,

f (t) = L-1{ F(s} = 2/5L-1{3

1

s} - 3/5L-1{

2

1

s},

= 2/5 e-3t +3/5 e2t Problems Find f(t) { the inverse Laplace transform} of the following:-

(1) f(s) =1

12 s

,

(2) f(s) =)1(

122 ss

,

(3) f(s) =sss

s

34

623

2

,

(4) f(s)= )4(

12 ss

,

(5) f(s) = 2

4

s-

16

32 s

s+

4

52 s

,

(6) f(s) = 3

1

s,

Page 39: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

39

(7) f(s) = 9

12 s

,

(8) f(s) = 9

322

s

s ,

(9) f(s) = 6

32

ss

s.

Application of Laplace TransformationLinear (D. E) With Constant CoefficientTo 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.

Example1Find 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.

SolutionL {y ˝ (t)} = s2 {y (s)} – s y (0) - y ΄ (0) L {y ΄ (t)} = s {y (s)} – y (0). Put in (*)L {y (t)} = y (s) Since L {y} = y (s) s2 {y (s)} – s y (0) - y ΄ (0) +3[s {y (s)} – y (0)] + 2 y (s) =0By 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) =23

42

ss

s=

)2)(1(

4

ss

s=

12

s

B

s

A.

S+4 = As+ 2B + As + A,A + B = 1A +2B = 4 -

-B =-3 B =3 A =-2,

Page 40: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

40

y(s) = 1

3

2

2

ss,

y (t) = L-1{ y(s} = 3L-1{1

1

s} - 2L-1{

2

1

s},

y (t) = 3e-t - 2e-2t

Example2Find 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.

SolutionL {y ˝ (t)} = s2 {y (s)} – s y (0) - y ΄ (0) L {y ΄ (t)} = s {y (s)} – y (0). Put in (i)L {y (t)} = y (s) Since L {y} = y (s)

s2 {y (s)} – 1+4[s y (s)] + 4y (s) = s

2

[s2 +4s + 4]y (s) = s

2+1 =

s

s2,

y (s) =)2(

2

)2(

2

)44(

222

ss

s

ss

s

sss

s,

y (s) = )2(

2

ss

s=

2

s

B

s

A,

1 = A(s+2) + Bs,

B =-½ and A =½,

y (s) =2

2

1

2

1

ss,

Page 41: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

41

y (t) = L-1{ y(s} = 1/2L-1{s

1} - 1/2L-1{

2

1

s},

y (t) = ½ - ½e-2t .

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,

Page 42: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

42

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). AndF(x) = f(x-T) = f(x-2T) = (x-3T) = …………………………. .= (x-nT).This means that F(x) = (x nT), where n integer.

Some Properties of Series1-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

0

sin nx dx = 2

0

cos nx dx = 0, where n integer.

2 - 2

0

sin mx sin nx dx = ½ 2

0

[cos(m-n)x – cos(m+n)x]dx = 0.

Page 43: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

43

3- 2

0

sin2 nx dx =½ 2

0

[ 1– cos2nx]dx = , where n integers.

4- 2

0

Cos nx sin nx dx = = ½ 2

0

sin 2nxdx = 0.

5- = 2

0

cos2 nx dx= 2

0

[cos nx cos nx dx = 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 +

1n

(an cos nx+ bn sin nx)……………….…………………(1)

=

0n

(an cos nx+ bn sin nx)………..………………………………(1),

Such that

a0 = 2

12

0

f(x) dx

an = 12

0

f(x) cos nx dx , n = 1, 2, 3,….

b n = 12

0

f(x) sin nx dx.

The series (1) is called Fourier series of the function f(x).If the function f(x) defined on interval -< x< , then

a0 = 2

1

f(x) dx

an = 1

f(x) cos nx dx , n = 1, 2, 3,….

b n = 1

f(x) sin nx dx.

Page 44: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

44

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 ,

a0 = 2

12

0

f(x) dx =2

12

0

x dx = 2

12

0

f(x) dx

a0 = 4

1 x2 2

0] = .

an = 12

0

f(x) cos nx dx = 12

0

x cos nx dx,

= 1 [x ]

cossin2n

nx

n

nx

2

0]

= 1 [2 ]

0cos[]

2cos2sin22 nn

n

n

n

=1 [ ]

12cos2sin22n

n

n

n

= 0.

b n = 12

0

f(x) sin nx dx = b n = 12

0

x sin nx dx

= 1 [ ]

sincos2n

nx

n

nxx

2

0]

=

2

.

The equation (1) becomes:

f(x)= -2

1n

(n

nxsin )

f(x)= -2 ( sinx + x2sin + 3

3sin x +…….. )

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)|.

Page 45: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

45

If f(x) is odd when { x, x3, x5,……, sinx.(i) If f(x) is even then b n = 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.

b n = 1

f(x) sin nx dx = b n = 1

x sin nx dx = 2

0

x sin nx dx

= 2 [ ]

sincos2n

nx

n

nxx

0]

=2

[. ]cos

n

n

=n

2 cosn

= n

2 (-1) n

Then the series becomes:

f(x) =

1n

bn sin nx

f(x)= -2

1n

(-1) n (n

nxsin )

f(x)= 2 ( sinx -2

2sin x + 3

3sin x -…….. )

Example 2 Find Fourier series of the function

1 if 0 < x< .f(x) = 2 if < x< 2 .Solution

a0 = 2

12

0

f(x) dx =2

1

0

f(x)dx + 2

1

2

f(x) dx

Page 46: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

46

=2

1

0

dx + 2

1

2

2 dx

=2

1 x 0] +

1 x

2] dx

a0 = 3/2.

an = 12

0

f(x) cos nx dx =1

0

f(x) cos nx dx +1

2

f(x) cos nx dx

=1

0

cos nx dx +1

2

2 cos nx dx ,

=1

n

nxsin 0] +

1 2

n

nxsin 2]

12

0

x cos nx dx,

= 1 [x ]

cossin2n

nx

n

nx

2

0] = 0.

an = 0.

b n = 1

0

sin nx dx + 1

2

2 sin nx dx

=1

n

nxcos 0] +

1 2

n

nxcos 2] ,

=1 [

n

n 1cos ] =

n

n 1)1(,

b n =

n

n 1)1(,

a0 = 3/2 , an = 0. b 0 = 2

, b 1 = 0 b 3 = 3

2,

f(x)= 3/2 - 2

[ sinx + 3

3sin x +5

5sin x+…….. ].

Half-Range SeriesIf 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:-

Page 47: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

47

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

a0 = 1

0

f(x) dx

an = 2

0

f(x) cos nx dx , n = 1, 2, 3,….

b n = 2

0

f(x) sin nx dx.

Example 3 Find cosine Half-range series for the function defined as

f(x) = x, for 0< x< .

SolutionUse the rule to find a0 and an

a0 = 1

0

f(x) dx =1

0

x dx = 1

0

f(x) dx

a0 = 2

1 x2 0] =

2

.

an = 2

0

f(x) cos nx dx = 2

0

x cos nx dx,

= 2

[x ]cossin

2n

nx

n

nx

0]

= 2

)1(cos2

n

n

0 if n even.an =

2

4

n

if n odd

Page 48: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

48

f(x)= 2

- 4

[ cosx + 3

3cos x+

5

5cos x+…….. ].

Example 4 Find sine Half-range series for the function defined as

f(x) = x, for 0< x< .

SolutionUse the rule to find bn

b n = 2

0

f(x) sin nx dx = b n = 2

0

x sin nx dx = 2

0

x sin nx dx

= 2 [ ]

sincos2n

nx

n

nxx

0]

=2

[. ]cos

n

n

=n

2 cosn

= n

2 (-1) n

Then the series becomes:

f(x) =

1n

bn sin nx

f(x)= -2

1n

(-1) n (n

nxsin )

f(x)= 2 ( sinx -2

2sin x + 3

3sin x -4

4sin x….. ).

Page 49: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

49

CHAPTER FOUR

Partial Differential Equations

(P. D.E)Partial Differential Equations Partial Differential Equations are Differential Equations in which the unknown function of more than one independent variable.

(P. D.E)Types of The following some type of (P. D.E):-

Order of (P. D.E)-1 The order of (P. D.E) is the highest derivative of equation for example:-Ux = Uy First-order (p. d. e).

2

2

2

2

4x

u

t

u

Second -order (p. d. e).

The Number of Variables-2For example:- Ux = Utt (two variables x and t).

Ux = Urr + rUr

1 + Ur 2

1(Three variables t, r and �).

Linearity-3The (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).

Homogeneity-4If 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 non-homogeneous.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

Page 50: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

50

Determine which (L. P. D.E) is, order and dependent or independent variable in following:-

2

2

41x

u

t

u

Linear second degree u, dependent variable, x and t are independent variable.

2

2

3

3

3

22x

ry

y

rx

Linear 3- degree( r, dependent variable, x and y are independent variable.

rsty

ww

3

3

3

Non-Linear 3- degree( w, dependent variable, r, s and t are independent variable.

042

2

2

2

2

2

z

Q

y

Q

x

Q

Linear 2- degree( Q, dependent variable, x, y and z are independent variables, homogeneous.

0)()(5 22

x

u

t

u

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 iWe 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)

02

yx

z

Solution

Page 51: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

51

0)(2

y

z

xyx

z

By integrate (w. r. to) x gives

)( ycy

z

Where c(y) is arbitrary parametric of y. Also by integrate (w. r. to) y gives

)()( xcyycz Where c(x) is arbitrary parametric of x.

Example3 Find the solution of the following (P. D.E)

yxyx

z 2

2

SolutionBy integrate (w. r. to) x gives

)(3

3

ycyx

y

z

By integrate (w. r. to) y gives

)()(6

23

xcyycyx

z

)()(6

23

xcyFyx

z .

Example4 Find the solution of the following (P. D.E)

22

126 yxyx

u

With boundary condition, u(1,y)= y2 -2y,

u(x,2)= 5x -5Solution

By integrate (w. r. to) x gives

)(123 22 ycxyxy

u

By integrate (w. r. to) y gives)()(43 32 xgyycxyyxu

)()(43),( 32 xgyhxyyxyxu yygyhyyyu 2)1()(43),1( 23

)1(54)( 32 gyyyyh )()1(5443),( 3232 xggyyyxyyxyxu

55)()1(10324326)2,( 2 xxggxxxu

)1(62733)( 2 gxxxg

Page 52: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

52

23232 627335443),( xxyyyxyyxyxu 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 iiSuppose the following relation:-

pzx

zx

1

qzy

zy

2

rzx

zxx

2

2

3

tzy

zyy

2

2

4

szyx

zyx

2

5

Example 5 Form a Partial Differential Equations from the following equation:-Z= (x -a)2 +(y-b)2…………………………….(1)Solution

xz

x

z2(x -a)

yzy

z 2(y -b)

�Eq(1) become22 )

2

1()

2

1( yx zzZ

22 )()(4 yx zzZ 22 )()(4 qpZ

Example 6 Form a Partial Differential Equations from the following equation:-Z= f(x2 +y2)…………………………….(2)SolutionZx=2xf ΄(x2 +y2)Zy=2yf ΄(x2 +y2)Eq(2) become

,y

x

z

z

y

x

-x Zy + y Zx =0yp -xq =0

Page 53: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

53

Example 7 Form a Partial Differential Equations from the following equation:-Z= ax+by+a2 +b2……………………………. (3).SolutionZx=aZy=bEq(3) becomeZ= x Zx +y Zy +( Zx)

2 +( Zy)2

Z= x p +y q +( p)2 +( q)2

8Example Form a Partial Differential Equations from the following equation:-v= f(x -ct) +g(x+ct)Solutionvx= 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

22

2

2

x

vc

t

v

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

)5...(......................................................................R

dz

Q

dy

P

dx

Eq (5) are calle LaGrange Auxiliary Equations or (characteristic equation).A soluation of Eq(5), can be written asU(x, y, z) = c1,V(x, y, z) = c2

The general solution written asF (U, V) =0, or F (c1, c2) =0.

Note iiiTo solve Eq(5), we note that:-

Page 54: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

54

(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

RQP

dzdydx

R

dz

Q

dy

P

dx

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 Equationxzp+yzq =xySolution

Suppose the following relation:-Where

pzx

zx

, and qzy

zy

P= xz, Q= yz, and R= xy

y

dy

x

dx

yz

dy

xz

dx

Lnx=lny =ln c1

y

xc1 = V………………………………………. (6)

x

dz

z

dy

xy

dz

yz

dy →xdy= zdz

zdz = c1ydy

22

2

1

2 yc

z +c

22

2 xyz =c

z2-xy =2c = c2=VThe general solutionF (c1, c2) =0, or

F (y

x, z2-xy) =0.

10 leExamp

Page 55: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

55

Solve the following Partial Differential Equation(x+z)p –(x+z)q =x-y………………………………………. (7)SolutionP= x+z, Q= -(x+z), and R= x-y

)()()()( yxzxzy

dzdydx

yx

dz

zx

dy

zy

dx

0

dzdydx

Where λ =1, µ =1, β =1.dx +dy + dz =0.

x +y + z = c1 = U.For λ =x, µ =y, β =-z

0

zdzydyxdx

xdx +ydy - zdz = 0.x2+y2- z2 =2c = c2=VThe general solutionF (c1, c2) =0, orF (x +y + z, x2+y2- z2) =0.

Example 11 Solve the following :-xz Zx + yz Zy +(x2 + y2) =0Solutionxz Zx + yz Zy = -(x2 + y2)

1-yz

dy

xz

dx

y

dy

x

dx

0y

dy

x

dx

lnx- lny=lnc1

x

yLn lnc1

1cx

y ………………….1

2-)( 22 yx

dz

xz

dx

From (1) y= x c1

Page 56: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

56

)( 221

2 xcx

dz

xz

dx

)1( 21

2 cx

dz

xz

dx

-x(1 + c12) dx=zdz

x(1 + c12) dx+zdz =0

2

221

2

2)1(

2c

zc

x

x2+x2c12+z2 = 2c2,

x2+y2+z2 = c3, where c3= 2c2.The general solutionF (c1, c3) =0, or

F (x

y , x2+y2+z2) =0

ProblemsFind the solution of the following Partial Differential Equation:-

1- 2p+3q =12- p-xq =z3- y2zp- x2zq = x2y4- (y+z)p +(x+z)q =x+y5- ap +bq+cz =06- (y2 +z2 - x2)p -2x y q +2xz = 0

Theorem1 If u1 u2……..are solution of equation

F( ,x

y

………..)u=0, Then

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( ,x

f

y

f

………..)u=0.

Let the general solution of above equation iswhere X of (P. D.E) solutionu (x, t) = XT, or u (x, t) = X(x)T(t) BeLet

ifs function of x only, and Y function of y only. As see in the following problems:-

2Examp 1 Solve the following Partial Differential Equation with boundary codition

03

y

u

x

u With boundary condition.

u (0, y) = 4e-2y -3e-6y …………………………………. (8)SolutionTo solve Eq(8) suppose

Page 57: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

57

u (x, t) = XT. Be solution of (8) where X ifs function of x only, and Yfunction of y only.

x

uYX΄,

y

uXY΄

dx

dXX

dy

dYY

Put in eq (8)

YX΄ + 3XY΄=0

Y

Y

X

X

3Now let

Y

Y

X

X

3

= c

X

X

3

= c

Y

Y = c

X΄ -3CX =0, Y΄ -CY =0,X= a1e

3cx , Y= a2e-cy

u (x, t) = XT= a1a2e3cx-cy = Bec(3x-y), where B= a1a2, are constant.

Now let u1= )3(

11 yxceb , and u2= )3(

22 yxceb solution of (8) (theorem 1)

u= u1+ u2= )3(

11 yxceb + )3(

22 yxceb ,from boundary condion

u (0, y) = yceb 2

2

+ yceb 1

1

= 4e-2y -3e-6y

b1=4, b2 =-3, c1=2, c2 =6u (x, y) = )3(24 yxe - )3(63 yxe

3Example 1 Find the solution of following [Heat equation] by using partial differential equation:-

2

2

2x

u

t

u

………………….……………..…………. (9)

With boundary condition. (1) u (0, t) = 0, (2) u (10, t) = 0, for all t,

(3) u(x, 0) = x2

3sin50

+20sin2x - 10sin4x

SolutionLet u (x, t) = XT. Be solution of (9)

Page 58: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

58

t

uXT΄

2

2

x

uTX΄΄

Put in(1) XT΄ =2 TX΄΄………………….……………..…………. (10)We can write (10)in the form:-

X

X

T

T

2Let

X

X

T

T

2

=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+BWhere A=c1c2, B= c1c3

U(0,t)= B=0U(x, t)=Ax U(10,t)= 10A=0 → A=0

0 U

Which trivial solution c≠ 0 CaseII. If C>0

Te-2cx =c1→T =c1e2ct

X= cxcx ecec 32

u (x, t) = XT, = c1e

2ct )(32

cxcx ecec u = e2ct )(

3

cxcx eBeA A= c1, c2, and B= c1, c3

U(0,t)= e2ct ( A + B)=0e2ct ≠ 0→ A + B=0 A= -B

Page 59: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

59

U(x,t)=B e-2ct ) )( cxcx ee

U(10,t)=B e2Ct)( 1010 cc ee =0

If B=0 A= 0 U= 0 Which trivial solution B ≠ 0

cc ee 1010 =0 01010 cc ee cc ee 1010 ,

01010 cc ee 120 ce which impossible since ce 20 �1There is no solution if C >0.CaseIII. If c<0, let c=- k2

2k

k2 �0

T΄ +2k2T=0, X΄΄ + k2X=0 T = c1tke

22 , X= c2 coskx + c3sinkx.

U(x,t)= c1tke

22 ( c2 coskx + c3sinkx )

U(x,t)= tke22 ( A coskx + B sinkx ).

Where A=c1c2, B= c1c3 U(0,t)= tke

22 ( A )=0

0 A , because tke22 0

U(x,t)= B tke22 ( sinkx ).

U(10,t)= B tke22 ( sin10k.) =0

Since B ≠ 0 , tke22 ≠ 0

sin10k =0 10k=n , where n =0 1 2 ...

10

nk

U(x,t)= Bt

n

e 1002

22

( sin xn

10

)= Bt

n

e 50

22

( sin xn

10

)=

U(x,t)= b1t

n

e 50

221

( sin x

n

101 )

U(x,t)= b2t

n

e 50

222

( sin x

n

102 )

U(x,t)= b3t

n

e 50

223

( sin x

n

103 )

U(x,t)= b1t

n

e 50

221

( sin x

n

101 )+ b2

tn

e 50

222

( sin x

n

102 )

+ b3t

n

e 50

223

( sin2 x

n

103 )

Page 60: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

60

U(x,0)= b1 sin xn

101 + b2 sin x

n

102 + b3 sin x

n

103 =

x2

3sin50

+20sin2x - 10sin4x

b1 =50, b2 =20, + b3 = -10 ,

2

3

101

n

→ n1=15, n2=20, n3=40

U(x,t)= 50t

e 2

9 2

sin xn

2

3 + 20 te28 sin x2 -10 te

232 sin x4

Examp 14 Find the solution of following [Wave equation] by using partial differential equation:-

(1)2

2

2

2

4x

u

t

u

With boundary condition.

(2) u (0, t) = 0, (3) u (L, t) = 0, for all t, 0,L 0 (4) u(x, 0) = f(x).

(5) t

u

= g(x), at t=0.

SolutionLet u (x, t) = XT. Be solution of (1) where X ifs function of x only, and Y function of y only.

XT΄΄

2

2

t

u

TX΄΄

2

2

x

u

Put in(1) XT΄΄ =4 TX΄΄

X

X

T

T

4

Let2

4k

X

X

T

T

Where k be constant T΄΄ -4k2T=0, X΄΄ - k2X=0(there three cases) CaseI. If

02 k T΄΄ =0,

T=at+b

X΄΄ =0,X= cx +d

Page 61: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

61

U= TX=(at+b)(cx+d)U(0,t)= (at+b)( d)=0

00 bbat U(x,t)=(at+b) cx U(L,t)=(at+b) cL=0 cL=0

00 cL

cx +d=0U(x,t)= 0

CaseII. If 02 k

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 sinceL, k�0There is no solution if k2 �0CaseIII. If

2k k2 �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

0 c , because A cos2kt + Bsin2kt 0U(x,t)=( A cos2kt + Bsin2kt) DsinkxU(L,t)=DsinkL ( A cos2kt + Bsin2kt)=0 Since A cos2kt + Bsin2kt 0 DsinkL=0If D= 0 U= 0 DsinkL=0 kL=n , where n =0 1 2 ...

L

nk

U(x,t)=Dsin n x ( A cos2L

n t + Bsin2L

n t)

U(x,t)= (An cos2L

n t + Bn sin2L

n t) sin n x .

Where An =AD, Bn=BD

Page 62: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

62

),(),(1

txUtxUn

n

),(

1

txUn

n

1n

(An cos2L

n t + Bn sin2L

n t) sin n x .

U(x, 0) = f(x).

f(x) =

1n

An sin n x .

)0,( xUt g(x),

g(x)=L

2

1n

Bn (n sin n x ).

ProblemsFind the solution of the following Partial Differential Equation:-

0)1(2

2

x

u

t

u

With boundary condition. u (0, t) = 0, u (10, t) = 0, for all t,

u(x, 0) = x2

3sin50

+20sin2x - 10sin4x.

0)2(

y

u

x

u With boundary condition.

u (0, y) = e2y,

2

2

2)3(x

u

t

u

With boundary condition. u (0, t) = 0, u (п, t) = 0, for all t, u(x, 0) = 2sin3x - 5sin4x.

(4)2

2

2

2

4x

u

t

u

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) t

u

= g(x), at t=0.

(5)2

2

2

2

4x

u

y

u

With boundary condition.

(i) u (0, y) = 0, (ii) u (10, y) = 0, for all t,

(iii) )0,(xy

u

= 0, at t=0.

Page 63: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

63

(iv) u(x, 0) = 3sin2x - x2

sin4 .

CHAPTER FIFE

Numerical AnalysisSolution of Non-Linear Equation1-Newton-Raphson Method for ApproximatingInterpolation2-Lagrange ApproximationNumerical Differentiation and IntegrationApproximate IntegrationIntegration Equal Space3-The Trapezoidal Rule4-Simpson's Rule5-Simpson's (3/8) RuleSolutions of Ordinary Differential EquationNumerical Differentiation 6-Euler Method The Step by Step Methods7-Modified Euler Method (Euler Trapezoidal Method)8-Runge Kutta Method 9-Runge- Kutta-Merson Method System of Linear Equation10-Cramer's Rule11-Solution of Linear Equations by using Inverse Matrices12-Gauss Elimination Method

Page 64: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

64

13-Gauss Siedle Methods14-Least Squares Approximations

Numerical AnalysisSolution of Non-Linear Equation1-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

f `( xn) = n

n

xx

yy

………………………………………….… (1)

Since the tangent line crosses the x-axis, y = 0, and yn = f(xn), put in Eq (1) which becomes

f `( xn) = n

n

xx

xf

)(,

x - xn= )(

)(

n

n

xf

xf

,

x = xn -)(

)(

n

n

xf

xf

………………………………………….… (2).

Put x= xn+1 in Eq (2) gives

xn+1 = xn -)(

)(

n

n

xf

xf

………………………………………….… (3)

Eq (3) called Newton-Raphson Method, can using this method by thefollowing1-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

Page 65: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

65

Solve the following using Newton-Raphson Method

x

1 +1 = 0, start with x0 = -0.5, error % = 0.5 %

Where e % = 1

1

n

nn

x

xx%

Sol

f(x) = x

1 +1, x0 = -0.5,

f `( xn) = -2

1

x

f(x0) = 5.0

1

+1= -1,

f `( x0) = -2)5.0(

1

= -4, from Eq (3)

x1 = x0 -)(

)(

0

0

xf

xf

x1 = -0.5 -4

1

= -0.75.

By use e % = 1

1

n

nn

x

xx% as

e % = 75.0

)5.0(75.0

%

e % = 33%By use same of new of x1 in Eq (3) as

x2 = x1 -)(

)(

1

1

xf

xf

, x2 = -0.937, in same we can find x3 and x4

which use in the following tablen xn f(x) f `( xn) xn+1 e %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+1= 0.

Page 66: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

66

Interpolation2-Lagrange ApproximationInterpolation means to estimate amassing function value by taking aweighted average of known function value of neighboring point. Linear InterpolationLinear 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= 01

01

xx

yy

The point- slope formula for the liney = m( x-x0 ) + y0

(x1, y1)

!!

!!

!! P(x)

!!

(x0 , y0)

Page 67: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

67

y =P(x) = m( x-x0 ) + y0 = 01

01

xx

yy

( x-x0 ) + y0

= y0 +(y1 - y0)01

0

xx

xx

P1(x) = y0 10

1

xx

xx

+ y1 01

0

xx

xx

…………………… (4)

Each term of the right side of (4) involve a linear factor hence the sum is a polynomial of degree ≤1.

L1,0(x) =10

1

xx

xx

, and L1,1(x) =01

0

xx

xx

…………………… (5)

When x= x0, L1,0(x0)=1 and L1,1(x0)=0. When x= x1, L1,0(x1)=0 andL1,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)

P1(x) =

1

01 )(

kkk xLy .

Suppose that the ordinates yk = f(xk).If P1(x) is uses to approximante f(x) over intervalle [x0 x1].Example 2Consider the graph y = f(x) =cos(x) on (x0 = 0.0, and x1=1.2 ), to find the linear interpolation polynomial. SolNow y0 =f(x0) = f(0.0) = cos (0.0)= 1.0000, andy1 =f(x1) = f(1.2) = cos (1.2)=0.3624,

L1,0(x) =10

1

xx

xx

=2.10.0

2.1

x =

2.1

2.1

x , and

L1,1(x) =01

0

xx

xx

=0.02.1

0.0

x =

2.1

x .

P1(x) =

1

01 )(

kkk xLy .

P1(x) = y0 L1,0(x)+ y1 L1,1(x)

P1(x) = -(1.0000)2.1

2.1x + (0.3624)2.1

x

P1(x) = -0.8333( x- 1.2) + 0.3020 x.

Quadratic Lagrange Interpolation

Page 68: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

68

Interpolation of given pointes (x0 , y0), (x1, y1) and (x2, y2) by a second degree polynomial P2(x), which by Lagrange summation asP2(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x).

P2(x) =

2

01 )(

kkk xLy =

2

01 )()(

kkk xLxf .

L1,0(x) =))((

))((

2010

21

xxxx

xxxx

,

L1,1(x) =))((

))((

2101

20

xxxx

xxxx

L1,2(x)=))((

))((

1202

10

xxxx

xxxx

approximating a function f for which f(x0) = y0 ,and f(x2) = y2 by means of second -degree polynomial interpolation.Example 3Using the nodes (x0 =2, x1=2.5 and x2 =4), to find the second interpolation

polynomial for f(x) =x

1.

SolWe must find

L1,0(x) =)42)(5.22(

)4)(5.2(

xx

= (x-6.5)x+10,

L1,1(x) =)45.2)(25.2(

)4)(2(

xx

=3

32)244( xx

L1,2(x)= )5.24)(24(

)5.2)(2(

xx

=3

5)5.4( xx.

Now f(x0) = f(2) = 0.5, f(x1) = f(2.5) = 0.4, and f(x2) = f(4) = 0.25, and

P2(x) =

2

01 )(

kkk xLy =

2

01 )()(

kkk xLxf .

P2(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x)

= 0.5[x-6.5)x+10]+ 0.4[3

32)244( xx] +0.25 [

3

5)5.4( xx];

P2(x) =[0.05 x-0.425]x +1.15

f(3)= 3

1

P2(3) = 0.325.f(3)= P2(3) = 0.325.

Cubic Lagrange Interpolation

Page 69: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

69

Interpolation of given pointes (x0 , y0), (x1, y1), (x2, y2) and (x3, y3) by a third degree polynomial P3(x), which by Lagrange summation asP3(x) = y0 L1,0(x)+ y1 L1,1(x) + y2 L1,2(x) + y3 L1,3(x),

P3(x) =

3

01 )(

kkk xLy =

3

01 )()(

kkk xLxf .

L1,0(x) =))()((

))()((

302010

321

xxxxxx

xxxxxx

,

L1,1(x) =))()((

))()((

312101

320

xxxxxx

xxxxxx

L1,2(x)=))()((

))()((

321202

321

xxxxxx

xxxxxx

,

L1,3(x)=))()((

))()((

231303

321

xxxxxx

xxxxxx

Approximating a function f for which f(x0) = y0 ,and f(x3) = y3 by means of third -degree polynomial interpolation.Example 4Consider 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. SolNow 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, andy3 =f(x3) = f(1.2) = cos (1.2)=0.3624,

L1,0(x) =))()((

))()((

302010

321

xxxxxx

xxxxxx

=)2.10.0)(8.00.0)(4.00.0(

)2.1)(8.0)(4.0(

xxx

,

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),

P3(x) =

3

01 )(

kkk xLy =

3

01 )()(

kkk xLxf .

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)( x-1.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

Page 70: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

70

= 1 if k = iLn,k(xi) = 0 if k ≠ iWhere

Ln,k(x)=))...()()...()((

))...()()...()((

1110

1110

nkkkkkkk

nkk

xxxxxxxxxx

xxxxxxxxxx

or

Ln,k(x)=)(

)(

0 ik

in

kii xx

xx

.

Problems1-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 valuefor 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 toapproximation to f(1.5).

Numerical Differentiation and IntegrationApproximate IntegrationIntegration Equal SpaceWe begin our development of numerical integration by giving well-known numerical methods. If the function f(x) such a nature that

b

a

xf )( dx cannot be evaluated by method of integration. In such cases, we

use method to approximation to value. A geometric interpolation of

b

a

xf )( dx is the area of the region bounded by the graph of y = f(x), x = 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

Page 71: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

71

We shall obtain an approximation to b

a

xf )( dx by finding the sum of areas

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 = n

ab , we

find the sum of the area of the trapezoid is:-

A= 21 [ f0 + f1] x +

21 [ f1 + f2] x +…+

21 [ fn-1 + fn] x

Or

b

a

xf )( dx = 2x [ f0 + 2 f1 + 2f2 +…+ 2 fn-1 + fn]………………… (6)

Eq (6) called The Trapezoidal Rule.

Example 5

Find

1

02 1

1

xdx, for n = 6 by Trapezoidal rule

Sol

f(x)= 1

12 x

, x0 = 0, x6 =1

h = h

xx 06 =

6

01 =

6

1

x0 = 0 , f0 = 10

12

= 1

x1 = x0+ h

x1 = 6

1 , f1 = 1)

6

1(

1

2 = 0.9729

x2 = 6

2 , f2 = 1)

6

2(

1

2 = 0.90

x3 = 6

3 , f3 = 1)

6

3(

1

2 = 0.8

x4 = 6

4 , f4 = 1)

6

4(

1

2 = 0.6923

Page 72: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

72

x5 = 6

5 , f5 = 1)

6

5(

1

2 = 0.5901

x6 = 1, f6 = 1)1(

12

=2

1 = 0.5

A = 2h [ f0 + 2( f1 + f2 + f3+ f4 + f5)+ f6]

A = 121 [ 1 + 2(0.9729 + 0.90 + 0.8 + 0.6923 + 0.5901 )+ 0.5 ]

A = 121 [ 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

a

xf )( dx. We dividing the interval

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 asf = Ax2+ Bx + C.The area under it from x = -h to x = h as

b

a

xf )( dx =

h

h

CBxAx )( 2 dx = h

hCx

xB

xA

]

23[

23

= Chh

A 23

23 = ]62[

32 CAh

h .

Since the curve passes through the three points (-h, f0), (0, f1) and (h, f2) f0 = Ah2- Bh + Cf1 = Cf2= Ah2+Bh + C.From above equation can see that C = f1

Ah2- Bh = f0 - f1

Ah2+Bh = f2 - f1

Ah2 = f0 +f2 - 2f1.

Now the area b

a

xf )( dx in terms of ordinates f0, f1 and f2, we have

b

a

xf )( dx= ]62[3

2 CAhh

.=3

h [ f0 +f2 - 2f1+6 f1], or

Page 73: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

73

b

a

xf )( dx =3

h [f0 +4f1+ f2] ……………………….… (7)

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

a

xf )( dx =3

h [fa +4f1+ f2]+ 3

h [f2 +4f3+ f4] +…+3

h [fn-2 +4fn-1+ fb]

b

a

xf )( dx =3

h [fa +4f1+ 2f2 +4f3+ 2f4 +…+ 2fn-2 +4fn-1+ fb].

Where h = n

ab , and n = even.

And the truncation error for Simpson's rule is:-

es = )(180

)( )4(4

5cf

n

ab = )(180

)( )4(4 cfhab

Example6

Use Simpson's rule to evaluate

1

02 1

1

xdx, for n = 6.

Sol

f(x)= 1

12 x

, x0 = 0, x6 =1

h = h

xx 06 =

6

01 =

6

1

x0 = 0 , f0 = 10

12

= 1

x1 = x0+ h

x1 = 6

1 , f1 = 1)

6

1(

1

2 = 0.9729

x2 = x1+ h

x2 = 6

1 +6

1 = 6

2 ,

f2 = 1)

6

2(

1

2 = 0.90

x3 = 6

3 , f3 = 1)

6

3(

1

2 = 0.8

Page 74: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

74

x4 = 6

4 , f4 = 1)

6

4(

1

2 = 0.6923

x5 = 6

5 , f5 = 1)

6

5(

1

2 = 0.5901

x6 = 1, f6 = 1)1(

12

=2

1 = 0.5

A = 3

h [f0 +4f1+ 2f2 +4f3+ 2f4 +4f5+ f6 ]

A = 121 [ 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) RuleIf 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

a

xf )( dx =8

3h [fa +3f1+ 3f2 +2f3+ 3f4+3f5+ 2f6 +…+ 3fn-2 +3fn-1+ fb].

Where h = n

ab , and n = odd

And the truncation error is:-

er = )(6480

)( )4(5

cfab

.

Example7

Use Simpson's8

3 rule to evaluate 1

0

4x dx, for n = 6.

Solf(x)= x4, x0 = 0, x6 =1

h = n

ab =

h

xx 06 =

6

01 =

6

1

x0 = 0 , f0 = ( x)4= = ( 0)4= 0x1 = x0+ h

x1 = 6

1 , f1 = (6

1 )4 =0.00077

x2 = x1+ h

x2 = 6

1 +6

1 = 6

2 ,

Page 75: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

75

f2 = (6

2 )4 =0.01234

x3 = 6

3 , f3 = (6

3 )4 =0.06251

x4 = 6

4 , f4 = (6

4 )4 =0.1975

x5 = 6

5 , f5 = (6

5 )4 =0.482253

x6 = 1, f6 = (6

6 )4 =1.0

b

a

xf )( dx =8

3h [fa +3f1+ 3f2 +2f3+ 3f4+3f5+ f6 ].

A = 8

3h [fa +3(f1+ f2 +f4+ f5)+ 2f3+ f6 ].

A = 0.2002243.Problems

1- Approximate 1

0

34x dx, by the trapezoidal rule and by the Simpson's

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.

(1) 2

0

x dx

(2) 2

0

2x dx

(3) 2

0

4x dx

(4) 2

12

1

xdx

(5) 4

1

x dx

Page 76: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

76

(6)

0

sin x dx.

Solutions of Ordinary Differential EquationNumerical 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 MethodsThis 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 atx2= 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

y(x + h )= y(x) +hy`(x) +2

2hy``(x) +

3

3hy```(x) +…..

y`(y)= f(x, y(x)), y``(x)= f `(x, y(x)) +x

f

+

y

f

y`

y(x + h )= y(x) +hy`(x) +2

2hy``(x) +

3

3hy```(x) +…..

For small h and neglected terms of 2h , 3h ….. 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 8Use Euler's method to solve the D. E

Page 77: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

77

dx

dy = x2 +4x -2

y , with, x0 = 0 y0 = 4, for x = 0 to x0 = 0.2, h = 0.05

work to (4D). Sol

f(x, y) = dx

dy = x2 +4x -2

y

yn+1 = yn +h f(xn, yn).n = 0, x0 = 0 , y0 = 4y1 = y0 +h f(x0, y0).y1 = 4 +.o5 f(0, 4).

y1 = 4 +.o5[ 02 +4 0-2

4 ].

y1 = 4 -0.1y1 = 3.9x1 = x0 +hx1 = 0 +0.05x1 = 0.05y2 = y1 +h f(x1, y1).

y2 = 3.9 +.o5 [(0.05)2 +4 (0.05)-2

9.3 ].

y2 = 3.81x2 = 0.05+0.05=0.10x3 = 0.15, y3 = 3.73x4 = 0.20, y4 = 3.67x5 = 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 +hy(0)

1 = y0 +h f(x0, y0).

y(1)1 = y0 +

2

h [ f(x0, y0). + f(x1, y(0)

1)],

y(2)1 = y0 +

2

h[ f(x0, y0). + f(x1, y

(1)1)]

.....................

....................

y(r+1)1 = y0 +

2

h[ f(x0, y0). + f(x1, y

(r)1)], we can go to five iteration.

Example 9Use Euler's Modified method to solve the D. E

dx

dy +2

y = x2 +4x, with, y = 4, for x = 0(0.05) 0.20, work to (3D).

Page 78: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

78

SolStep 1

f(x, y) = x2 +4x -2

y

y(0)1 = y0 +h f(x0, y0).

n = 0, x0 = 0 , y0 = 4y1 = y0 +h f(x0, y0).y1 = 4 +.o5 f(0, 4).

y(0)1 = 4 +0.05[ 02 +4 0-

2

4 ].

y(0)1 = 3.9

y(1)1 = y0 +

2

h [ f(x0, y0). + f(x1, y(0)

1)],

= 4 +2

05.0[-

2

4 +(-0.05)2 +4(0.05) -2

1 3.9] = 3.906

y(1)1 = 3.906.

y(2)1 = y0 +

2

h[ f(x0, y0). + f(x1, y

(1)1)]

= 4 +2

05.0[-

2

4 +(-0.05)2 +4(0.05) -2

1 3.906] = 3.906

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.906y(0)

2 = y1 +h f(x1, y1).

= 3.906+0.05[(0.05)2 +4(0.05) -2

13.906] = 3.912

y(0)2 = 3.912

y(1)2 = y1 +

2

h[ f(x1, y1). + f(x2, y

(0)2)],

= 3.906+2

05.0[(0.05)2 +4(0.05) -

2

13.906+(0.1)2 +4(0.1) -

2

1 3.91] =

3.868y(1)

2 = 3.868.

y(2)2 = y1 +

2

h[ f(x1, y1). + f(x2, y

(1)2)]

= 3.906+2

05.0[(0.05)2 +4(0.05) -

2

13.906+(0.1)2 +4(0.1) -

2

1 3.868] =

3.824y(2)

2 = 3.824.

Page 79: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

79

y(3)2 = y1 +

2

h[ f(x1, y1). + f(x2, y

(2)2)]

= 3.906+2

05.0[(0.05)2 +4(0.05) -

2

13.906+(0.1)2 +4(0.1) -

2

1 3.824] =

3.825y(3)

2 = 3.825.Step 3 x3 = x2 +h = 0.1+0.05 = 0.15

n = 2, x2 = 0.1 , y2 = 3.825y(0)

3 = y2 +h f(x2, y2).

= 3.825+0.05[(0.1)2 +4(0.1) -2

13.825] = 3.750

y(0)3 = 3.750

y(1)3 = y2 +

2

h[ f(x2, y2). + f(x3, y

(0)3)],

= 3.825+2

05.0[(0.1)2 +4(0.1) -

2

13.825+(0.15)2 +4(0.15) -

2

1 3.750] =

3.756y(1)

3 = 3.756.In same way we findy(2)

3 = 3.756.Step 4 x4 = x3 +h = 0.15+0.05 = 0.2

n = 3, x3 = 0.15 , y3 = 3.756y(0)

4 = y3 +h f(x3, y3).

= 3.756+0.05[(0.15)2 +4(0.15) -2

13.756] = 3.693

y(0)4 = 3.693

y(1)4 = y3 +

2

h[ f(x3, y3). + f(x4, y

(0)4)],

= 3.756+2

05.0[(0.15)2 +4(0.15) -

2

13.756+(0.2)2 +4(0.2) -

2

1 3.693] =

3.699y(1)

4 = 3.699.

y(2)4 = y3 +

2

h [ f(x3, y3). + f(x4, y(1)

4)],

Page 80: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

80

= 3.756+2

05.0[(0.15)2 +4(0.15) -

2

13.756+(0.2)2 +4(0.2) -

2

1 3.699] =

3.699y(2)

4 = 3.699.The following table gives the above resulted of x and y.x y0 40.05 3.9060.1 3.8250.15 3.7560.2 3.699

ProblemsApply 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΄ = 212

y , with y(0) = 0, h = 0.1.

(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.

(8) y΄= 4x +x2 -2

1 y, with y(0) = 4, h = 0.05, find to 3-decimal.

8-Runge Kutta Method When

dx

dy = f(x, y)

yn+1 = yn +6

1 [k1+ 2k2 +2k3 + k4]

Wherek1= h f(xn, yn).

k2 = h f(xn +2

h, yn+

21k

).

K3 = h f(xn +2

h, yn+

22k

).

K4 = h f(xn +h, yn+ k3).

Page 81: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

81

Where h and (xn, yn) are given.Example 10Use Runge Kutta Method to solve the D. E

dx

dy = x +y, with x0 = 0, y0 = 1, with h = 0.1 work to (4D).

Sol

f(x, y) = dx

dy = x +y

y1 = y0 +6

1 [k1+ 2k2 +2k3 + k4]

k1= h f(x0, y0).n = 0, x0 = 0 , y0 = 1k1 = 0.1 f(0, 1)= 0.1[0 +1]= 0.1k1 = 0.1

k2 = h f(x0 +2

h, y0+

21k

).

= 0.1 f(0 +2

1.0, 1+

2

1.0) = 0.1[0 .05+1.05]

K2 = 0.11.

K3 = h f(x0 +2

h, y0+

22k

)= 0.1 f(0 .05, 1+2

11.0)

= 0.1[0 .05+1.055]K3 = 0.1105.K4 = h f(x0 +h, y0+ k3) = 0.1[0 .1,1+0.1105]= 0.1[0 .1,1.1105] K4 = 0.12105.

y1 = 1 +6

1 [0.1+ 20.11 +20.1105 + 0.12105],

y1 = 1.11034

y2 = y1 +6

1 [k1+ 2k2 +2k3 + k4]

k1= h f(x1, y1).n = 1, x1 = x0 +h = 0+0.1 = 0.1, y1 = 1.11034k1 = 0.1 f(0.1, 1.11034)= 0.1[0.1 +1.11034]= 0.12103k1 = 0.12103

k2 = h f(x1 +2

h, y1+

21k

).

= 0.1 f(0.1 +2

1.0, 0.12103+

2

1.0) = 0.13208

K2 = 0.13208.K3 = 0.132638.K4 = 0.1442978.

Page 82: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

82

y2 = 1.24306. (x2, y2) = (0.2, 1.24306).9-Runge- Kutta-Merson Method The problem of Runge Kutta Method is not compute an approximatedecimal error[Rounding Error or Truncation Error], we think Runge-Kutta-Merson Method give the an approximate the error of this problem at any step as see in the following:-

yn+1 = yn +6

1 [k1+ 4k4 + k5],

k1= h f(xn, yn),

k2 = h f(xn +3

h , yn+31k

),

K3 = h f(xn +3

h , yn+61k

+62k

),

K4 = h f(xn +2

h , yn+81k

+8

3 3k),

K5 = h f(xn + h, yn+21k

-2

3 3k+ 2k4 ).

We compute the error as

Error = 30

1 [2k1-9k3 + 8k4 - k5].

Example 11Use Runge- Kutta-Merson Method to solve the D. E

dx

dy = x +y, with x0 = 0 , y0 = 1, for x = 0 to x0 = 1.0, with h = 0.1 work

to (4D).Sol

f(x, y) = dx

dy = x +y

k1= h f(xn, yn).n = 0, x0 = 0 , y0 = 1k1 = h f(0, 1)= 0.1[0 +1]= 0.1k1 = 0.1

k2 = h f(xn +3

h, yn+

31k

),

= h f(0 +3

1.0, 1+

3

1.0).

= h f(0 .113, 1.0333) = 0.1[0 .113+1.0333]K2 = 0.1067

K3 = h f(0 +3

1.0, 1+

6

1.0+

6

1067.0),

Page 83: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

83

= h f(0.0333+ 1.0344),= 0.1[0.0333+ 1.0344],= 0.1068.

K4 = h f(xn +2

h, yn+

81k

+8

3 3k).

= h f(0 +2

1.0 , 1+8

1.0 +8

)1068.0(3 ).

= h f(0.05, 1.0525) = 0.1[0.05+ 1.0525]. = 0.1103.

K5 = h f(xn + h, yn+21k

-2

3 3k+ 2k4 ).

= 0.1 f(0 + 0.1, 1+2

1.0-

2

)1068.0(3+ 2(0.1103) ).

= 0.1 f(0.1, 1.1103 ),= 0.1[ 0.1, 1+1.1103 ].= 0.1210.

yn+1 = yn +6

1 [k1+ 4k4 + k5],

y1 = y0 +6

1 [k1+ 4k4 + k5],

y1 = 1 +6

1 [0.1+ 4(0.1103) + 0.1210],

y1 = 1.1104.x1 = x0 +hx1 = 0 +0.1 = 0.1 (x1, y1) = (0.1, 1.1104).

Error = 30

1 [2k1-9k3 + 8k4 - k5].

= 30

1 [2(0.1) -9 (0.1068) + 8 (0.1103) - 0.1210].

Error =6.66710-6.Problems1-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+2

y , with y(0) = 1, h = 0.1. On interval (0≤ x ≤1)

(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 xy ln + x-1, with y(1) = 0, h = 0.1. On interval (1≤ x ≤1.8).And compute the error.

Page 84: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

84

4- Solve problem (3) by classical Range –Kutta methods, with h = 0.4, determine the error, and compute with (3).

System of Linear EquationDefinition 1 Let the system of linear equation asa11x1, a12x2… ,a1nxn = b1

a21x1, a22x2… ,a2nxn = b2

…………………….. ………………………….. (8)……………………..Am1x1, am2x2… ,amnxn = bm

Can put the apove system in matrix form as:-

mnmnmm

n

n

b

b

b

x

x

x

aaa

aaa

aaa

2

1

2

1

11

22221

11211

………………………….. (8)

OrAX=B, …………………………………….…………………….. (8)

A=

mnmm

n

n

aaa

aaa

aaa

11

22221

11211

, B=

mb

b

b

2

1

, and X=

nx

x

x

2

1

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

Page 85: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

85

To solve the system (8) by Cramer's Rule. Find determinate of A (| A|) such that | A| ≠ 0.Let

| A| =D=

mnmm

n

n

aaa

aaa

aaa

11

22221

11211

, D1 =

mnmm

n

n

aab

aab

aab

1

2222

1121

,

D2 =

mnmm

n

n

aba

aba

aba

1

2221

1111

,..., Dn =

mmm baa

baa

baa

11

22221

11211

,

To solve system (8), we must find unknown x1, x2… xn as

x1 =D

D1 , x2 =D

D2 , … xn =D

Dn .

11-Solution of Linear Equations by using Inverse MatricesTo solve the system (8) by using Inverse Matrices Find determinate of A (| A|) such that | A| ≠ 0.OrAX=B,Turing to the relation between the solution of linear equation and matrix inversion multiplying both sides by A-1 thusA-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 exampleExample12Use the matrix inversion method; find the values of (x1, x2, x3) for thefollowing set of linear algebraic equations:- 3x1 -6x2 + 7x3 = 34x1 -5x3 = 3……………………………. (9)5x1 - 8x2 +6x3 = -4SolutionPut the system (9) in the following matrix form asAX=B,

Page 86: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

86

4

3

3

685

504

763

3

2

1

x

x

x

Where| A|

| A| =

685

504

763

462≠ 0.

We can find the inverse matrix of A (A-1), by any method.

A-1 =

36.004.048.0

52.012.052.0

2.014.026.0

, now we can see the following

A-1 [AX=B]A-1 AX= A-1 B.X= A-1 B.

X=

4

3

3

36.004.048.0

52.012.052.0

2.014.026.0

3

2

1

x

x

x

X=

3

4

2

3

2

1

x

x

x

, which gives the solution of system as x1 = 2,

x2 = 4, x3 = -4.

12-Gauss Elimination MethodWe can use Gauss Elimination Method to solve the system of linear equation in (8), as see in the following exampleExample 133x1 -x2 + 2x3 = 123x1 +2x2 +3x3 = 11……………………………. (10)2x1 - 2x2 - x3 = 2SolutionPut the system (10) in the following matrix form

3 -1 2 : 12 R1

3 2 3 : 11 R2 ................................................................. (11)2 -2 -1 : 12 R3

Where Ri (i= 1, 2, 3) row of system.Step 1

Page 87: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

87

By using R2 – R1, and 3R3 -2R1

System (11) become

3 -1 2 : 12 R1

0 7 7 : 21 R2 ............................................................ (12)0 -4 -7 : -8 R3

Step 2By using 7R3 +4R2

System (11) become

3 -1 2 : 12 R1

0 7 7 : 21 R2 ............................................................ (13)0 0 -21 : -42 R3

Step 3From last system (13) we the following equation 3x1 -x2 -2x3 = 12 7x2 +7x3 = 21 -21x3 = -42Which 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 examplea11x1 +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 1Re write system (13) as form x1 =[ b1- a12x2-a13x3] ⁄ (a11)x2 =[ b2- a21x1-a23x3] ⁄ (a22) ................................................ (15)x3 = [ b3- a31x1- a32x2] ⁄ (a33).Step 2Selected initial values of x1 , x2 and x3 put in system (16). For example (Let x1 = x2 = x3=0 initial values)Step 3

Page 88: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

88

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 Example145x1 -2x2 +x3 = 4x1 +4x2 -2x3 = 3……………………………. (16)x1 +4x2 +4x3 = 17

SolutionStep 1Re write system (16) as form x1 =[ 4+ 2x2-x3] ⁄ (5) .................................................... (17)x2 =[ 3- x1+2x3] ⁄ (4) ................................................ (18)x3 = [ 17- x1- 4x2] ⁄ (4). ................................................ (19)Step 2Selected 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 3By 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 X1 X2 X3

0 0 0 01 0.8 0.55 3.7752 0.265 2.572 2.8983 1.247 1.889 3.0074 0.956 2.008 2.9985 1.002 2.003 3.0006 1.001 1.999 3.0007 0.999 2.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:-

kx1 = [b1- a121

2kx -a13

13kx ] ⁄ (a11)

kx2 = [b2- a21kx1 -a23

13kx ] ⁄ (a22) ................................................ (20)

kx3 = [b3- a31kx1 - a32

kx2 ] ⁄ (a33).

Page 89: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

89

Suppose that a11 ≠ 0, a22 ≠ 0, a33 ≠ 0.

Problems(a) Use Gauss Elimination Method to solve the following system of linear equation (1)3x1 -x2 +3x3 = 12x1 +x2 +3x3 = 112x1 -2x2 -x3 = 2(2)2x1 -x2 +x3 = 13x1 -2x2 + x3 = 05x1 +x2 2x3 = 9(3)x1 +2x3 = 3 2x2 +3x3 = 5 2x3 +x4 = 7x1 +4x4 = 5

(4)x1 +2x2 -4x3 = 45x1 -3x2 -7x3 = 63x1 -4x2 +3x3 = 1(b) Use Gauss Siedle Method to solve the following system of linear equation (1)3x1 -x2 +3x3 = 12x1 +x2 +3x3 = 112x1 -2x2 -x3 = 2(2)2x1 -x2 +x3 = 13x1 -2x2 + x3 = 05x1 +x2 2x3 = 9

(6)2x1 -4x2 +6x3 = 5x1 +3x2 -7x3 = 27x1 +5x2 +9x3 = 4

(5)2x1 +x2 -3x3 = 15x1 +2x2 -6x3 = 53x1 -x2 -4x3 = 7

(7)-x1 +x2 +2x3 = 23x1 -x2 + x3 = 6-x1 +3x2 +4x3 = 4

(6)2x1 -4x2 +6x3 = 5x1 +3x2 -7x3 = 27x1 +5x2 +9x3 = 4

(5)2x1 +x2 -3x3 = 15x1 +2x2 -6x3 = 53x1 -x2 -4x3 = 7

Page 90: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

90

(3)x1 +2x3 = 3 2x2 +3x3 = 5 2x3 +x4 = 7x1 +4x4 = 5

(4)x1 +2x2 -4x3 = 45x1 -3x2 -7x3 = 63x1 -4x2 +3x3 = 1.14-Least Squares ApproximationsLet 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- iy , 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), whered1 = y1- 1y ,d2 = y2- 2y ,……dm = ym- my .The method of Least Squares Approximations using, the summation of

difference (

m

iid

1

) at minimum. We square the difference because the

negative sign.

m

iid

1

2)( =

m

iii yy

1

2)( .

Let the relation between x and y at linear form as:-

1y = a+bx1,The difference become asdi = yi- a-bxi, let

q =

m

iid

1

2)( , or

q =

m

iid

1

2)( =

m

iii bxay

1

2)( or

q =

m

iii bxay

1

2)( ……..……………………..… (21)

There are only two unknown (a and b) in Eq (21).

(7)-x1 +x2 +2x3 = 23x1 -x2 + x3 = 6-x1 +3x2 +4x3 = 4

Page 91: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

91

Now if q at minimum, then first partial derivative of q (w .r .to) a and b must equal to zero as:-

a

q

=

m

iii bxay

1

)(2 = 0

b

q

=

m

iiii bxayx

1

)(2 = 0.

Re-write above equations as

ma+

m

ii bx

1

)( =

m

iiy

1

……..……………………………..… (22)

m

ii ax

1

)( +

m

ii bx

1

2 )( =

m

iii yx

1

……..……………………..… (23).

Put Eq (22and 23) in the following matrix form

m

iii

m

ii

m

ii

m

ii

m

ii

yx

y

b

a

xx

xm

1

1

1

2

1

1 …..……………………..… (24)

We can find two unknown (a and b) in Eq (21). By using crammers rule as:-

Let D =

m

ii

m

ii

m

ii

xx

xm

1

2

1

1 …..……………….…………..… (25)

Where D the determinant such that D ≠ 0, and

D1=

m

ii

m

ii

m

iii

m

ii

x

x

yx

y

1

2

1

1

1 , D2 =

m

iii

m

ii

m

ii

yx

y

x

m

1

1

1

,

a =D

D1 , b =D

D2 .

Example 15Find the following points to linear form y = a+ b x, where

Page 92: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

92

165

134

83

52

31

yx

Solution

169554515

8025165

5216134

24983

10452

3131

2

Sum

xyxyx

From Eqs. (21 and 23)5a+15 b = 45,15a+55 b = 169,

D = 5515

155= 50

a =D

D1 , a =50

55

15

169

45

=5

6b =

D

D2 =50

196

45

15

5

=5

17

y = 5

6+

5

17x,

5y = -6+ 17 x, Example 16Find the following points to linear form y = a ebx. Where

X Y0 1.51 2.52 3.53 54 7.5

Page 93: Advance Mathematics and numerical analysisSave from: 2ndclass Advance Mathematics and numerical analysis يدﺪﻌﻟا ﻞﯿﻠﺤﺘﻟاو ﺔﻣﺪﻘﺘﻤﻟا تﺎﯿﺿﺎﯾﺮﻟا

93

SolLn y = Ln(a ebx) → Ln y = Ln(a) + Ln(ebx) → Ln y = Ln(a) +bx , compare with standard equation Y = A+ b XY = Ln y Ln(a) = A, b = b, X= x .

X Y X=x Y=Lny Xi2 Xi Yi

0 1.5 0 0.40547 0 01 2.5 1 0.91629 1 0.916292 3.5 2 1.25276 4 2.505533 5 3 1.60944 9 4.828314 7.5 4 2.01490 16 8.05961

Sum=10 10 6.19866 30 16.30974

Y = A+ b X→ ma+

m

ii bx

1

)( =

m

iiy

1

m

ii ax

1

)( +

m

ii bx

1

2 )( =

m

iii yx

1

5a+10 b = 6.19866,10a+30 b = 16.30974,

D = 3010

105= 50

a =D

D1 , a =50

3030974.16

1019866.6

=0.45736, b =D

D2 ==50

30974.1610

19866.65

=0.39120.

A = Ln(a) → eA= eLna → eA= a→ eA= e0.45736,

→ a = 1.5799, b = 0.39120.Y = 1.5799 e0.39120X

Reference1- 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.