engg. mathematics iii

239
Functions of a Complex Variable Dr. M K Singh Associate Professor Jahangirabad Institute of Technology, Barabanki

Upload: manoj302009

Post on 16-Apr-2017

59 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Engg. mathematics iii

Functions of a Complex Variable

Dr. M K SinghAssociate Professor

Jahangirabad Institute of Technology, Barabanki

Page 2: Engg. mathematics iii

Functions of A Complex Variables I

Functions of a complex variable provide us some powerful and widely useful tools in theoretical physics.

• Some important physical quantities are complex variables (the wave-function ) • Evaluating definite integrals.

• Obtaining asymptotic solutions of differentials equations.

• Integral transforms• Many Physical quantities that were originally real become complex

as simple theory is made more general. The energy ( the finite life time).

iEE nn0

/1

Page 3: Engg. mathematics iii

We here go through the complex algebra briefly.A complex number z = (x,y) = x + iy, Where. We will see that the ordering of two real numbers (x,y) is significant, i.e. in general x + iy y + ix

X: the real part, labeled by Re(z); y: the imaginary part, labeled by Im(z)

Three frequently used representations:

(1) Cartesian representation: x+iy

(2) polar representation, we may write z=r(cos + i sin) or

r – the modulus or magnitude of z - the argument or phase of z

1i

ierz

Page 4: Engg. mathematics iii

r – the modulus or magnitude of z - the argument or phase of z

The relation between Cartesian and polar representation:

The choice of polar representation or Cartesian representation is a matter of convenience. Addition and subtraction of complex variables are easier in the Cartesian representation. Multiplication, division, powers, roots are easier to handle in polar form,

1/ 22 2

1tan /

r z x y

y x

212121

ierrzz

212121 // ierrzz innn erz

Page 5: Engg. mathematics iii

From z, complex functions f(z) may be constructed. They can be written

f(z) = u(x,y) + iv(x,y)in which v and u are real functions. For example if , we have

The relationship between z and f(z) is best pictured as a mapping operation, we address it in detail later.

)arg()arg()arg( 2121 zzzz

2121 zzzz

xyiyxzf 222

Using the polar form,

2)( zzf

Page 6: Engg. mathematics iii

Function: Mapping operation

x

y Z-plane

u

v

The function w(x,y)=u(x,y)+iv(x,y) maps points in the xy plane into pointsin the uv plane.

nin

i

ie

ie

)sin(cos

sincos

We get a not so obvious formula

Since

ninin )sin(cossincos

Page 7: Engg. mathematics iii

Complex Conjugation: replacing i by –i, which is denoted by (*),

We then have

Hence

Note:

ln z is a multi-valued function. To avoid ambiguity, we usually set n=0and limit the phase to an interval of length of 2. The value of lnz withn=0 is called the principal value of lnz.

iyxz *

222* ryxzz

21*zzz Special features: single-valued function of a real variable ---- multi-valued function

irez

nire 2

irlnzln

nirz 2lnln

Page 8: Engg. mathematics iii

Another possibility

even and 1|cos||,sin|possibly however, x;real afor 1|cos||,sin|

zzxx

Question:

yx

yx

yxiyxiyxyxiyxiyx

iee iziz

222

222

iziz

sinhcos|cosz |

sinhsin|sinz | (b)

sinhsincoshcos)cos( sinhcoscoshsin)sin( (a) show to

2

esinz ;2

ecosz

:identities theUsing

Page 9: Engg. mathematics iii

Analytic functions

If f(z) is differentiable at and in some small region around ,we say that f(z) is analytic at

Differentiable: Cauthy-Riemann conditions are satisfied the partial derivatives of u and v are continuous

Analytic function:

Property 1:

Property 2: established a relation between u and v

022 vu

Example:

0zz

0zz 0z

Page 10: Engg. mathematics iii

Cauchy-Riemann Equations

0 0 0

0 00 0

0

1 0 0

2 0 0

Let , , be diff. at

then lim exists

with In particular, can be computed along

: , i.e.

: , i.e.

z

f z u x y iv x y z x iy

f z z f zf z

zz x i y

f z

C y y x x z xC x x y y

z i y

Page 11: Engg. mathematics iii

Cauchy-Riemann Equations

0 0 0 0

0

0 0 0 0

( , ) ( , )

( , ) ( , )

u vx y i x yx xf z

u vi x y x yy y

Page 12: Engg. mathematics iii

Cauchy-Riemann Equations

• We have proved the following theorem.

u vx yu vy x

Page 13: Engg. mathematics iii

Theorem

A necessary condition for a fun. f(z)=u(x,y)+iv(x,y)to be diff. at a point z0 is that the C-R eq. hold at z0.Consequently, if f is analytic in an open set G, then the C-R eq. must hold at every point of G.

Page 14: Engg. mathematics iii

Theorem

A necessary condition for a fun. f(z)=u(x,y)+iv(x,y)to be diff. at a point z0 is that the C-R eq. hold at z0.Consequently, if f is analytic in an open set G, then the C-R eq. must hold at every point of G.

Page 15: Engg. mathematics iii

Application of Theorem

To show that a function is NOT analytic, it suffices to show that the C-R eq. are not satisfied

Page 16: Engg. mathematics iii

Cauchy – Riemann conditions

Having established complex functions, we now proceed to differentiate them. The derivative of f(z), like that of a real function, is defined by

provided that the limit is independent of the particular approach to the point z. For real variable, we require that Now, with z (or zo) some point in a plane, our requirement that thelimit be independent of the direction of approach is very restrictive.

Consider

zfdzdf

zzf

zzfzzf

zz

00limlim

oxxxx

xfxfxfoo

limlim

yixz viuf

,

yixviu

zf

Page 17: Engg. mathematics iii

Let us take limit by the two different approaches as in the figure. First, with y = 0, we let x0,

Assuming the partial derivatives exist. For a second approach, we set x = 0 and then let y 0. This leads to

If we have a derivative, the above two results must be identical. So,

xvi

xu

zf

xz

00limlim

xvi

xu

yv

yui

zf

z

0lim

yv

xu

,

xv

yu

Page 18: Engg. mathematics iii

These are the famous Cauchy-Riemann conditions. These Cauchy-Riemann conditions are necessary for the existence of a derivative, that is, if exists, the C-R conditions must hold.

Conversely, if the C-R conditions are satisfied and the partial derivatives of u(x,y) and v(x,y) are continuous, exists.

xf

zf

Page 19: Engg. mathematics iii

Cauchy’s integral Theorem

We now turn to integration. in close analogy to the integral of a real function The contour is divided into n intervals .Let with for j. Then

'00 zz 01 jjj zzz

0

01

limz

z

n

jjj

ndzzfzf

n

The right-hand side of the above equation is called the contour (path) integral of f(z)

. and

bewteen curve on thepoint a is where

, and points thechoosing of details theoft independen

is and existslimit that theprovided

1

j

j

jj

j

zz

z

Page 20: Engg. mathematics iii

As an alternative, the contour may be defined by

with the path C specified. This reduces the complex integral to the complex sum of real integrals. It’s somewhat analogous to the case of the vector integral.

An important example

22

11

2

1

,,yx

yxc

z

zc

idydxyxivyxudzzf

22

11

22

11

yx

yx

yx

yxcc

udyvdxivdyudx

c

ndzz

where C is a circle of radius r>0 around the origin z=0 in the direction of counterclockwise.

Page 21: Engg. mathematics iii

In polar coordinates, we parameterize and , and have

which is independent of r. Cauchy’s integral theorem– If a function f(z) is analytical (therefore single-valued) [and its partial

derivatives are continuous] through some simply connected region R, for every closed path C in R,

irez diredz i

2

0

11exp

221 dnirdzz

i

n

c

n

1- n for 1-1n for 0

{

0 dzzfc

Page 22: Engg. mathematics iii

•Multiply connected regionsThe original statement of our theorem demanded a simply connectedregion. This restriction may easily be relaxed by the creation of a barrier, a contour line. Consider the multiply connected region of Fig.1.6 In which f(z) is not defined for the interior R

Cauchy’s integral theorem is not valid for the contour C, but we canconstruct a C for which the theorem holds. If line segments DE and GA arbitrarily close together, then

E

D

A

G

dzzfdzzf

Page 23: Engg. mathematics iii

'2

'1 CEFGCABD

dzzfdzzfEFGGADEABD

ABDEFGAC

0dzzfEFGABD

21 CC

dzzfdzzf

Page 24: Engg. mathematics iii

Cauchy’s Integral Formula

Cauchy’s integral formula: If f(z) is analytic on and within a closed contour C then

in which z0 is some point in the interior region bounded by C. Note that here z-z0 0 and the integral is well defined.

Although f(z) is assumed analytic, the integrand (f(z)/z-z0) is notanalytic at z=z0 unless f(z0)=0. If the contour is deformed as in Fig.1.8 Cauchy’s integral theorem applies.So we have

00

2 zifzzdzzf

C

C C

dzzzzf

zzdzzf

2

000

Page 25: Engg. mathematics iii

Let , here r is small and will eventually be made to approach zero

(r0)

Here is a remarkable result. The value of an analytic function is given atan interior point at z=z0 once the values on the boundary C are specified.

What happens if z0 is exterior to C?In this case the entire integral is analytic on and within C, so the integral vanishes.

i0 rezz

drie

re

rezfdz

zzdzzf i

C Ci

i

2 2

0

0

00 22

zifdzifC

Page 26: Engg. mathematics iii

DerivativesCauchy’s integral formula may be used to obtain an expression for the derivation of f(z)

Moreover, for the n-th order of derivative

0

0 0

12

f z dzdf zdz i z z

C

zfzzdzzf

i exterior z ,0interiorz ,

21

0

00

0

2

000 211

21

zzdzzf

izzdzddzzf

i

1

00 2

!n

n

zz

dzzfi

nzf

Page 27: Engg. mathematics iii

. find origin, about the circle a

within andon analytic is a)( If 1.

Examples

0n

n

n

n

a

zzf

jn

jnnj

j zaajzf

1

!

jj ajf !0

12

1!

0n

n

nz

dzzfin

fa

Page 28: Engg. mathematics iii

In the above case, on a circle of radius r about the origin,

then (Cauchy’s inequality) Proof:

where

Lowville's theorem: If f(z) is analytic and bounded in the complex plane, it is a constant. Proof: For any z0, construct a circle of radius R around z0,

Mzf

Mra nn

nn

rznn

rM

rrrM

zdzzfa

11 22

21

rfMaxrM rz

22

00

222

1R

RMzzdzzf

izf

R

RM

Page 29: Engg. mathematics iii

Since R is arbitrary, let , we have

Conversely, the slightest deviation of an analytic function from a constant value implies that there must be at least one singularity somewhere in the infinite complex plane. Apart from the trivial constant functions, then, singularities are a fact of life, and we must learn to live with them, and to use them further.

R

.const)z(f,e.i,0zf

Page 30: Engg. mathematics iii

Laurent Expansion

Taylor ExpansionSuppose we are trying to expand f(z) about z=z0, i.e.,and we have z=z1 as the nearest point for which f(z) is not analytic. Weconstruct a circle C centered at z=z0 with radius

From the Cauchy integral formula,

0n

n0n zzazf

010 zzzz

C 00C zzzz

zdzfi2

1zzzdzf

i21zf

C 000 zzzz1zz

zdzfi2

1

Page 31: Engg. mathematics iii

Here z is a point on C and z is any point interior to C. For |t| <1, we note the identity

So we may write

which is our desired Taylor expansion, just as for real variable powerseries, this expansion is unique for a given z0.

0

211

1

n

ntttt

C nn

n

zz

zdzfzzi

zf0

10

0

21

01

002

1

n Cn

n

zz

zdzfzzi

0

00 !n

nn

nzf

zz

Page 32: Engg. mathematics iii

Schwarz reflection principleFrom the binomial expansion of for integer n (as anassignment), it is easy to see, for real x0

Schwarz reflection principle:If a function f(z) is (1) analytic over some region including the real axisand (2) real when z is real, then

We expand f(z) about some point (nonsingular) point x0 on the real axisbecause f(z) is analytic at z=x0.

Since f(z) is real when z is real, the n-th derivate must be real.

n0xzzg

*n0

**n0

* zgxzxzzg

** zfzf

0

00 !n

nn

nxf

xzzf

*

0

00

**

!zf

nxf

xzzfn

nn

Page 33: Engg. mathematics iii

Laurent SeriesWe frequently encounter functions that are analytic in annular

region

Page 34: Engg. mathematics iii

Drawing an imaginary contour line to convert our region into a simply connected region, we apply Cauchy’s integral formula for C2 and C1, with radii r2 and r1, and obtain

We let r2 r and r1 R, so for C1, while for C2, . We expand two denominators as we did before

(Laurent Series)

zzzdzf

izf

CC

2121

00 zzzz 00 zzzz

21000000 112

1

CCzzzzzz

zdzfzzzzzz

zdzfi

zf

zdzfzzzzizz

zdzfzzi

n

n Cn

n Cn

n

001

001

00

21

121

21

n

nn zzazf 0

Page 35: Engg. mathematics iii

where

Here C may be any contour with the annular region r < |z-z0| < R encircling z0 once in a counterclockwise sense. Laurent Series need not to come from evaluation of contour integrals. Other techniques such as ordinary series

expansion may provide the coefficients.Numerous examples of Laurent series appear in the next chapter.

Cnn

zzzdzf

ia

102

1

Page 36: Engg. mathematics iii

0

2221

mmnimn

i

ner

driei

a

021 2

11

121

mn

mnn

zzdz

izzzd

zia

11zzzf

01,22

21

mmni

i

1- n for 0

-1nfor 1a n

1

32111

1

n

nzzzzzzz

The Laurent expansion becomes

Example: (1) Find Taylor expansion ln(1+z) at point z

(2) find Laurent series of the function

If we employ the polar form

1

1)1()1ln(n

nn

nzz

Page 37: Engg. mathematics iii

• Theorem Suppose that a function f is analytic throughout an annular

domain R1< |z − z0| < R2, centered at z0 , and let C denote any positively oriented simple closed contour around z0 and lying in that domain. Then, at each point in the domain, f (z) has the series representation

Laurent Series

0 1 0 20 1 0

( ) ( ) , ( | | )( )

n nn n

n n

bf z a z z R z z R

z z

10

1 ( ) , ( 0,1, 2,...)2 ( )n n

C

f z dza ni z z

10

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

C

f z dzb ni z z

Page 38: Engg. mathematics iii

• Theorem (Cont’)

Laurent Series

0 1 0 2( ) ( ) , ( | | )nn

n

f z c z z R z z R

0 1 0 20 1 0

( ) ( ) , ( | | )( )

n nn n

n n

bf z a z z R z z R

z z

10

1 ( ) , ( 0,1, 2,...)2 ( )n n

C

f z dza ni z z

10

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

C

f z dzb ni z z

10

1 ( ) , ( 0, 1, 2,...)2 ( )n n

C

f z dzc ni z z

1 1

00

( )( )

nnnn

n n

bb z z

z z

, 1, 0n

nn

b nc

a n

Page 39: Engg. mathematics iii

• Laurent’s Theorem If f is analytic throughout the disk |z-z0|<R2,

Laurent Series

00

( ) ( )nn

n

f z a z z

101

0

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

nn n

C C

f z dzb z z f z dz ni z z i

Analytic in the region |z-z0|<R2

0, ( 1,2,...)nb n

( )0

10

( )1 ( ) , ( 0,1, 2,...)2 ( ) !

n

n nC

f zf z dza ni z z n

reduces to Taylor Series about z0

0 1 0 20 1 0

( ) ( ) , ( | | )( )

n nn n

n n

bf z a z z R z z Rz z

Page 40: Engg. mathematics iii

• Example 1 Replacing z by 1/z in the Maclaurin series expansion

We have the Laurent series representation

Examples

2 3

0

1 ...(| | )! 1! 2! 3!

nz

n

z z z ze zn

1/2 3

0

1 1 1 11 ...(0 | | )! 1! 2! 3!

zn

n

e zn z z z z

There is no positive powers of z, and all coefficients of the positive powers are zeros.

1

1 ( ) , ( 1, 2,...)2 ( 0)n n

C

f z dzb ni z

1/

1/1 1 1

1 112 ( 0) 2

zz

C C

e dzb e dzi z i

1/ 2z

C

e dz i

where c is any positively oriented simple closedcontours around the origin

Page 41: Engg. mathematics iii

• Example 2 The function f(z)=1/(z-i)2 is already in the form of a

Laurent series, where z0=i,. That is

where c-2=1 and all of the other coefficients are zero.

Examples

2

1 ( ) , (0 | | )( )

nn

n

c z i z iz i

30

1 , ( 0, 1, 2,...)2 ( )n n

C

dzc ni z z

3

0, 22 , 2( )n

C

ndzi nz i

where c is any positively oriented simple contouraround the point z0=i

Page 42: Engg. mathematics iii

Examples

Consider the following function1 1 1( )

( 1)( 2) 1 2f z

z z z z

which has the two singular points z=1 and z=2, is analytic in the domains

1 :| | 1D z

3 : 2 | |D z

2 :1 | | 2D z

Page 43: Engg. mathematics iii

• Example 3 The representation in D1 is Maclaurin series.

Examples

1 1 1 1 1( )1 2 1 2 1 ( / 2)

f zz z z z

11

0 0 0

( ) (2 1) , (| | 1)2

nn n n

nn n n

zf z z z z

where |z|<1 and |z/2|<1

Page 44: Engg. mathematics iii

• Example 4 Because 1<|z|<2 when z is a point in D2, we know

Examples

1 1 1 1 1 1( )1 2 1 (1/ ) 2 1 ( / 2)

f zz z z z z

where |1/z|<1 and |z/2|<1

1 1 10 0 1 0

1 1( ) , (1 | | 2)2 2

n n

n n n nn n n n

z zf z zz z

Page 45: Engg. mathematics iii

• Theorem 1 If a power series

converges when z = z1 (z1 ≠ z0), then it is absolutely

convergent at each point z in the open disk |z − z0| < R1 where R1 = |z1 − z0|

Some Useful Theorems

00

( )nn

n

a z z

Page 46: Engg. mathematics iii

• Theorem Suppose that a function f is analytic throughout a disk

|z − z0| < R0, centered at z0 and with radius R0. Then f (z) has the power series representation

Taylor Series

0 0 00

( ) ( ) , (| | )nn

n

f z a z z z z R

( )

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

!

n

nf z

a nn

That is, series converges to f (z) when z lies in the stated open disk.

10

1 ( )2 ( )n n

C

f z dzai z z

Refer to pp.167

Page 47: Engg. mathematics iii

Proof the Taylor’s Theorem

( )

0 00

(0)( ) ,(| | )!

nn

n

ff z z z z Rn

Proof:

Let C0 denote and positively oriented circle |z|=r0, where r<r0<R0

Since f is analytic inside and on the circle C0 and since the point z is interior to C0, the Cauchy integral formula holds

0

01 ( )( ) , ,| |

2 C

f s dsf z z z Ri s z

1 1 1 1 1 , ( / ),| | 11 ( / ) 1

w z s ws z s z s s w

Page 48: Engg. mathematics iii

Proof the Taylor’s Theorem1

10

1 1 1( )

Nn N

n Nn

z zs z s s z s

0

1 ( )( )2 C

f s dsf zi s z

0 0

1

10

1 ( ) 1 ( )( )2 2 ( )

Nn N

n Nn C C

f s ds f s dsf z z zi s i s z s

( ) (0)!

nfn

Refer to pp.167

0

( )1

0

(0) ( )( )! 2 ( )

n NNn

Nn C

f z f s dsf z zn i s z s

ρN

Page 49: Engg. mathematics iii

Proof the Taylor’s Theorem

0

( )lim lim 02 ( )

N

N NN NC

z f s dsi s z s

( ) ( ) ( )1

0 0 0

(0) (0) (0)( ) lim ( ) 0! ! !

n n nNn n n

NN n n n

f f ff z z z zn n n

When

0

00 0

( ) | || | | | 22 ( ) 2 ( )

N N

N N NC

z f s ds r M ri s z s r r r

Where M denotes the maximum value of |f(s)| on C0

0

0 0

| | ( )NN

Mr rr r r

lim 0NN

0

( ) 1rr

Page 50: Engg. mathematics iii

Example

expand f(z) into a series involving powers of z. We can not find a Maclaurin series for f(z) since it is not analytic at z=0.

But we do know that expansion

Hence, when 0<|z|<1

Examples

2 2

3 5 3 2 3 2

1 2 1 2(1 ) 1 1 1( ) (2 )1 1

z zf zz z z z z z

2 4 6 82

1 1 ...(| | 1)1

z z z z zz

2 4 6 8 3 53 3

1 1 1( ) (2 1 ...) ...f z z z z z z z zz z z

Negative powers

Page 51: Engg. mathematics iii

Residue theoremCalculus of residues

Functions of a Complex Variable

Suppose an analytic function f (z) has an isolated singularity at z0. Consider a contour integral enclosing z0 .

z0

)( sRe22)(

1 ,2)ln(

1 ,01)(

)(

)()()(

01

1'

'01

'

'

10

0

00

zfiiadzzf

niazza

nn

zzadzzza

dzzzadzzzadzzf

C

z

z

z

z

n

n

C

nn

nC

nnC

n

nnC

The coefficient a-1=Res f (z0) in the Laurent expansion is called the residue of f (z) at z = z0.

If the contour encloses multiple isolated singularities, we have the residue theorem:

n

nCzfidzzf )( sRe2)(

z0 z1

Contour integral =2i ×Sum of the residuesat the enclosed singular points

Page 52: Engg. mathematics iii

Residue formula:To find a residue, we need to do the Laurent expansion and pick up the coefficient a-1. However, in many cases we have a useful residue formula

)()(lim)!1(

1)(sRe

)!1())(2()1)((lim)(lim

)(lim)!1(

1)()(lim)!1(

1

:Proof

.)()(lim)(sRe

,pole simple afor ly,Particular

)()(lim)!1(

1)(sRe

,order of pole aFor

01

1

01

11

1001

1

01

1

01

1

00

01

1

0

0

00

00

0

0

zfzzdzd

mzfa

mazznmnmnazzadzd

zzadzd

mzfzz

dzd

m

zfzzzf

zfzzdzd

mzf

m

mm

m

zz

n

nnzz

mn

mnnm

m

zz

mn

mnnm

m

zz

mm

m

zz

zz

mm

m

zz

Page 53: Engg. mathematics iii

.0 ,)()(lim!

1

:tscoefficien theall find way toa is e that therprovedactually We

.)()(lim)!1(

1 us gives 1 upPick . Also

.)()(lim!

1 ,)()()(

expansionTaylor by analytic, is )()( Because

)()()(

)()(

:#2 Method Proof

0

01

1

1

000

0

0

00

0

0

0

0

kzfzzdzd

ka

a

zfzzdzd

mamkab

zfzzdzd

kbzzbzfzz

zfzz

zzazfzz

zzazf

mk

k

zzmk

mm

m

zzmkk

mk

k

zzkk

kk

m

m

mn

mnn

m

n

mnn

Page 54: Engg. mathematics iii

Cauchy’s integral theorem and Cauchy’s integral formula revisited:(in the view of the residue theorem):

.!

)()()!11(

1lim

is at residue its formula, residue the toAccording

1.order of pole a isIt .)(')()( )'3

!)(22)()()( )3

)(2)()(')()( )2

0)(Res2)( )1

))((')()()( :function Analytic

0)(

10

101)1(

1)1(

0

0

01

0

01

0

0)(

100

101

0

00

00

0

0

0

0000

0

0 nzf

zzzfzz

dzd

n

zz

nzzzf

zzzf

zzzf

nzfiiadz

zzzfzza

zzzf

zifdzzzzfzf

zzzf

zzzf

zfidzzf

zzzfzfzzazf

n

nn

n

n

zz

nnn

n

nC nm

nmmn

C

C

m

mm

Evaluation of definite integrals -1Calculus of residues

Page 55: Engg. mathematics iii

2222

2

22

2

22

2

22

2

0

220

2

2

2

2

2

0

111

2

11121 ,

111

1211

)1(1)(

1111)( Res )0( Res

.)(

1))((

1lim)( Res

.1))((

1lim)0( Res

circle. theofout is circle, in the is |||| ,1||

.1101/2 ,0 poles, simple 3 have We

)1/2(11

2111

2//112//1

1.|| and real is ,sin1

sin Example

aa

a

aa

aiia

Iaa

a

aa

iaaizzz

zzzz

zzz

zff

zzzz

zzzzzzzzzf

zzzzzzzzzf

zzzzzz

aaizaizzz

dzaizzz

zia

dzaizazz

ziiz

dzizza

izzI

aaa

dI

zz

z

CCC

C

r=1

z+

z-

z0

Page 56: Engg. mathematics iii

Evaluation of definite integrals -2Calculus of residues

II. Integrals along the whole real axis:

dxxf )(

Assumption 1: f (z) is analytic in the upper or lower half of the complex plane, except isolated finite number of poles.

R

Condition for closure on a semicircular path:

dzzfdzzfdzzfdzzfdzzfdxxf

RCR

R

RR)(lim)(lim)()()(lim)(

.0 ,1~)(lim0lim) (lim

) (lim ) (lim)(lim

1max0

00

zzfRfRdeRf

deiReRfdeiReRfdzzf

RR

i

R

ii

R

ii

RR

Assumption 2: when |z|, | f (z)| goes to zero faster than 1/|z|.

Then, plane. halfupper on the )( of esiduesR2)(lim)( zfidzzfdxxfCR

Page 57: Engg. mathematics iii

.arctan1

Or

.))((

1lim2)( Res2

plane halfupper on the 1

1 of esiduesR2

1

:1 Example

2

2

2

xx

dxiziz

iziifi

ziI

xdxI

iz

.

2'

)()(1lim2)( Res2

plane halfupper on the 1 of esiduesR2

.0 ,

:2 Example

3222

222

222

aaizaiziaziiafi

aziI

aax

dxI

aiz

Page 58: Engg. mathematics iii

UNIT - III

Page 59: Engg. mathematics iii

MOMENTS, SKEWNESS, AND KURTOSIS

Page 60: Engg. mathematics iii

Moment Ratios

• 23 4

1 23 22 2

,

23 4

1 23 22 2

,m mb bm m

Page 61: Engg. mathematics iii

NON-CENTRAL MOMENTS

Page 62: Engg. mathematics iii

CENTRAL MOMENTS

Page 63: Engg. mathematics iii

THEOREMS

Page 64: Engg. mathematics iii

SKEWNESS

Page 65: Engg. mathematics iii

SkewnessA distribution in which the values equidistant from the mean have equal frequencies and is called Symmetric Distribution.Any departure from symmetry is called skewness.

In a perfectly symmetric distribution, Mean=Median=Mode and the two tails of the distribution are equal in length from the mean. These values are pulled apart when the distribution departs from symmetry and consequently one tail become longer than the other.

If right tail is longer than the left tail then the distribution is said to have positive skewness. In this case, Mean>Median>Mode

If left tail is longer than the right tail then the distribution is said to have negative skewness. In this case, Mean<Median<Mode

Page 66: Engg. mathematics iii

KURTOSIS

Page 67: Engg. mathematics iii

Kurtosis

For a normal distribution, kurtosis is equal to 3.

When is greater than 3, the curve is more sharply peaked and has narrower tails than the normal curve and is said to be leptokurtic.

When it is less than 3, the curve has a flatter top and relatively wider tails than the normal curve and is said to be platykurtic.

44

21 1

4

42

1 1

1 1 ,

1 1 ,

n ni

i i

n ni

i i

xkurt z for population data

n n

x xkurt b z for sample datan n s

Page 68: Engg. mathematics iii

CURVE FITTING

Page 69: Engg. mathematics iii

Curve Fitting and Correlation

This will be concerned primarily with two separate but closely interrelated processes:(1) the fitting of experimental data to

mathematical forms that describe their behavior and

(2) the correlation between different experimental data to assess how closely different variables are interdependent.

Page 70: Engg. mathematics iii

•The fitting of experimental data to a mathematical equation is called regression. Regression may be characterized by different adjectives according to the mathematical form being used for the fit and the number of variables. For example, linear regression involves using a straight-line or linear equation for the fit. As another example, Multiple regression involves a function of more than one independent variable.

Page 71: Engg. mathematics iii

Linear Regression

•Assume n points, with each point having values of both an independent variable x and a dependent variable y.

1 2 3The values of are , , ,...., .nx x x x x

1 2 3The values of are , , ,...., .ny y y y yA best-fitting straight line equation will have the form

1 0y a x a

Page 72: Engg. mathematics iii

Preliminary Computations

0

1sample mean of the valuesn

kk

x x xn

0

1sample mean of the valuesn

kk

y y yn

2 2

1

1sample mean-square of the valuesn

kk

x x xn

1

1sample mean of the product n

k kk

xy xy x yn

Page 73: Engg. mathematics iii

Best-Fitting Straight Line

1 22

xy x ya

x x

2

0 22

x y x xya

x x

0 1Alternately, a y a x

1 0y a x a

Page 74: Engg. mathematics iii

Example-1. Find best fitting straight line equation for the data shown below.

x0123456789y4.006.108.309.9012.4014.3015.7017.4019.8022.30

10

1

1 0 1 2 3 4 5 6 7 8 9 45 4.5010 10 10k

k

x x

10

1

1 4 6.1 8.3 9.9 12.4 14.3 15.7 17.4 19.8 22.310 10130.2 13.02

10

kk

y y

Page 75: Engg. mathematics iii

Multiple Linear Regression

0 1 1 2 2 ..... m my a a x a x a x

Assume independent variablesm

1 2, ,..... mx x xAssume a dependent variable that is to be considered as a linear functionof the independent variables.

y

m

Page 76: Engg. mathematics iii

Multiple Regression (Continuation)

1

Assume that there are values of each of the variables. For , we have

km x

11 12 13 1, , ,....., kx x x xSimilar terms apply for all other variables.For the th variable, we havem

1 2 3, , ,.....,m m m mkx x x x

Page 77: Engg. mathematics iii

Correlation

corr( , ) ( )x y E xy xy Cross-Correlation

cov( , ) ( )( )

corr( , ) ( )( )( )( )

x y E x x y y

x y x yxy x y

Covariance

Page 78: Engg. mathematics iii

Correlation Coefficient

( )( )( , )

cov( , )cov( , ) cov( , )

x y

E x x y yC x y

x yx x y y

Page 79: Engg. mathematics iii

Implications of Correlation Coefficient

• 1. If C(x, y) = 1, the two variables are totally correlated in a positive sense.

• 2. If C(x, y) = -1 , the two variables are totally correlated in a negative sense.

• 3. If C(x, y) = 0, the two variables are said to be uncorrelated.

Page 80: Engg. mathematics iii

Binomial Distribution and Applications

Page 81: Engg. mathematics iii

Binomial Probability DistributionA binomial random variable X is defined to the number

of “successes” in n independent trials where the P(“success”) = p is constant.

Notation: X ~ BIN(n,p)

In the definition above notice the following conditions need to be satisfied for a binomial experiment:

1. There is a fixed number of n trials carried out.2. The outcome of a given trial is either a “success”

or “failure”.3. The probability of success (p) remains constant

from trial to trial. 4. The trials are independent, the outcome of a trial is

not affected by the outcome of any other trial.

Page 82: Engg. mathematics iii

Binomial Distribution• If X ~ BIN(n, p), then

• where

.,...,1,0 )1()!(!

! )1()( nxppxnx

nppxn

xXP xnxxnx

psuccessPnx

nnnn

)"(" trials.in successes""

obtain to waysofnumber the x"choosen " xn

1 1! and 1 0! also ,1...)2()1(!

Page 83: Engg. mathematics iii

Binomial Distribution• If X ~ BIN(n, p), then

• E.g. when n = 3 and p = .50 there are 8 possible equally likely outcomes (e.g. flipping a coin)

SSS SSF SFS FSS SFF FSF FFS FFF X=3 X=2 X=2 X=2 X=1 X=1 X=1 X=0 P(X=3)=1/8, P(X=2)=3/8, P(X=1)=3/8, P(X=0)=1/8• Now let’s use binomial probability formula instead…

.,...,1,0 )1()!(!

! )1()( nxppxnx

nppxn

xXP xnxxnx

Page 84: Engg. mathematics iii

Binomial Distribution• If X ~ BIN(n, p), then

• E.g. when n = 3, p = .50 find P(X = 2)

.,...,1,0 )1()!(!

! )1()( nxppxnx

nppxn

xXP xnxxnx

83or 375.)5)(.5(.3)5(.5.

23

)2(

ways31)12(

123!1 !2

!3)!23(!2

!323

12232

XP

SSFSFSFSS

Page 85: Engg. mathematics iii

The Poisson DistributionThe Poisson distribution is defined by:

!)(

xexf

x

Where f(x) is the probability of x occurrences in an interval is the expected value or mean value of occurrences within an interval

e is the natural logarithm. e = 2.71828

Page 86: Engg. mathematics iii

Properties of the Poisson Distribution

1. The probability of occurrences is the same for any two intervals of equal length.

2. The occurrence or nonoccurrence of an event in one interval is independent of an occurrence on nonoccurrence of an event in any other interval

Page 87: Engg. mathematics iii

Problem

a. Write the appropriate Poisson distribution

b. What is the average number of occurrences in three time periods?

c. Write the appropriate Poisson function to determine the probability of x occurrences in three time periods.

d. Compute the probability of two occurrences in one time period.

e. Compute the probability of six occurrences in three time periods.

f. Compute the probability of five occurrences in two time periods.

Consider a Poisson probability distribution with an average number of occurrences of two per period.

Page 88: Engg. mathematics iii

Problem

!2)(

2

Xexf

x

6

!6)(

6

Xexf

x

27067.2

5413.!2

2)2(22

ef

(a)

(b)

(c)

(d)

Page 89: Engg. mathematics iii

Hypergeometric Distribution

rx

nN

xnrN

xr

xf

0 allfor )(

Where

n = the number of trials.

N = number of elements in the population

r = number of elements in the population labeled a success

Page 90: Engg. mathematics iii

The Chi-Square Test

Page 91: Engg. mathematics iii

Parametric and Nonparametric Tests

It introduces two non-parametric hypothesis tests using the chi-square statistic: the chi-square test for goodness of fit and the chi-square test for independence.

Page 92: Engg. mathematics iii

Parametric and Nonparametric Tests (cont.)

• The term "non-parametric" refers to the fact that the chi square tests do not require assumptions about ‑population parameters nor do they test hypotheses about population parameters.

• Previous examples of hypothesis tests, such as the t tests and analysis of variance, are parametric tests and they do include assumptions about parameters and hypotheses about parameters.

Page 93: Engg. mathematics iii

Parametric and Nonparametric Tests (cont.)

• The most obvious difference between the chi square tests and the other hypothesis ‑tests we have considered (t and ANOVA) is the nature of the data.

• For chi square, the data are frequencies rather ‑than numerical scores.

Page 94: Engg. mathematics iii

The Chi-Square Test for Goodness-of-Fit

• The chi-square test for goodness-of-fit uses frequency data from a sample to test hypotheses about the shape or proportions of a population.

• Each individual in the sample is classified into one category on the scale of measurement.

• The data, called observed frequencies, simply count how many individuals from the sample are in each category.

Page 95: Engg. mathematics iii

The Chi-Square Test for Goodness-of-Fit (cont.)

• The null hypothesis specifies the proportion of the population that should be in each category.

• The proportions from the null hypothesis are used to compute expected frequencies that describe how the sample would appear if it were in perfect agreement with the null hypothesis.

Page 96: Engg. mathematics iii
Page 97: Engg. mathematics iii

The Chi-Square Test for Independence

• The second chi-square test, the chi-square test for independence, can be used and interpreted in two different ways:

1. Testing hypotheses about the relationship between two variables in a population, or

2. Testing hypotheses about differences between proportions for two or more populations.

Page 98: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• Although the two versions of the test for independence appear to be different, they are equivalent and they are interchangeable.

• The first version of the test emphasizes the relationship between chi-square and a correlation, because both procedures examine the relationship between two variables.

Page 99: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• The second version of the test emphasizes the relationship between chi-square and an independent-measures t test (or ANOVA) because both tests use data from two (or more) samples to test hypotheses about the difference between two (or more) populations.

Page 100: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• The first version of the chi-square test for independence views the data as one sample in which each individual is classified on two different variables.

• The data are usually presented in a matrix with the categories for one variable defining the rows and the categories of the second variable defining the columns.

Page 101: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• The data, called observed frequencies, simply show how many individuals from the sample are in each cell of the matrix.

• The null hypothesis for this test states that there is no relationship between the two variables; that is, the two variables are independent.

Page 102: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• The second version of the test for independence views the data as two (or more) separate samples representing the different populations being compared.

• The same variable is measured for each sample by classifying individual subjects into categories of the variable.

• The data are presented in a matrix with the different samples defining the rows and the categories of the variable defining the columns..

Page 103: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• The data, again called observed frequencies, show how many individuals are in each cell of the matrix.

• The null hypothesis for this test states that the proportions (the distribution across categories) are the same for all of the populations

Page 104: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

• Both chi-square tests use the same statistic. The calculation of the chi-square statistic requires two steps:

1. The null hypothesis is used to construct an idealized sample distribution of expected frequencies that describes how the sample would look if the data were in perfect agreement with the null hypothesis.

Page 105: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

For the goodness of fit test, the expected frequency for each category is obtained by

expected frequency = fe = pn(p is the proportion from the null hypothesis and n is the size of the sample)

For the test for independence, the expected frequency for each cell in the matrix is obtained by

(row total)(column total)expected frequency = fe = ─────────────────

n

Page 106: Engg. mathematics iii
Page 107: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

2. A chi-square statistic is computed to measure the amount of discrepancy between the ideal sample (expected frequencies from H0) and the actual sample data (the observed frequencies = fo).

A large discrepancy results in a large value for chi-square and indicates that the data do not fit the null hypothesis and the hypothesis should be rejected.

Page 108: Engg. mathematics iii

The Chi-Square Test for Independence (cont.)

The calculation of chi-square is the same for all chi-square tests:

(fo – fe)2

chi-square = χ2 = Σ ───── fe

The fact that chi square tests do not require scores ‑from an interval or ratio scale makes these tests a valuable alternative to the t tests, ANOVA, or correlation, because they can be used with data measured on a nominal or an ordinal scale.

Page 109: Engg. mathematics iii

Measuring Effect Size for the Chi-Square Test for Independence

• When both variables in the chi-square test for independence consist of exactly two categories (the data form a 2x2 matrix), it is possible to re-code the categories as 0 and 1 for each variable and then compute a correlation known as a phi-coefficient that measures the strength of the relationship.

Page 110: Engg. mathematics iii

Measuring Effect Size for the Chi-Square Test for Independence (cont.)

• The value of the phi-coefficient, or the squared value which is equivalent to an r2, is used to measure the effect size.

• When there are more than two categories for one (or both) of the variables, then you can measure effect size using a modified version of the phi-coefficient known as Cramér=s V.

• The value of V is evaluated much the same as a correlation.

Page 111: Engg. mathematics iii
Page 112: Engg. mathematics iii

The t-test

Inferences about Population Means

Page 113: Engg. mathematics iii

Questions

• What is the main use of the t-test?• How is the distribution of t related to the unit

normal?• When would we use a t-test instead of a z-test? Why

might we prefer one to the other?• What are the chief varieties or forms of the t-test? • What is the standard error of the difference between

means? What are the factors that influence its size?

Page 114: Engg. mathematics iii

Background

• The t-test is used to test hypotheses about means when the population variance is unknown (the usual case). Closely related to z, the unit normal.

• Developed by Gossett for the quality control of beer.

• Comes in 3 varieties:• Single sample, independent samples, and

dependent samples.

Page 115: Engg. mathematics iii

What kind of t is it?

• Single sample t – we have only 1 group; want to test against a hypothetical mean.

• Independent samples t – we have 2 means, 2 groups; no relation between groups, e.g., people randomly assigned to a single group.

• Dependent t – we have two means. Either same people in both groups, or people are related, e.g., husband-wife, left hand-right hand, hospital patient and visitor.

Page 116: Engg. mathematics iii

Single-sample z test

• For large samples (N>100) can use z to test hypotheses about means.

• Suppose

• Then

• If

MM est

Xz

.)(

N

NXX

Nsest X

M1

)(

.

2

200;5;10:;10: 10 NsHH X

35.14.14

52005.

Nsest X

M

05.96.183.2;83.235.

)1011(11

pzX

Page 117: Engg. mathematics iii

The t DistributionWe use t when the population variance is unknown (the usual case) and sample size is small (N<100, the usual case). If you use a stat package for testing hypotheses about means, you will use t.

The t distribution is a short, fat relative of the normal. The shape of t depends on its df. As N becomes infinitely large, t becomes normal.

Page 118: Engg. mathematics iii

Degrees of FreedomFor the t distribution, degrees of freedom are always a simple function of the sample size, e.g., (N-1).

One way of explaining df is that if we know the total or mean, and all but one score, the last (N-1) score is not free to vary. It is fixed by the other scores. 4+3+2+X = 10. X=1.

Page 119: Engg. mathematics iii

Single-sample t-testWith a small sample size, we compute the same numbers as we did for z, but we compare them to the t distribution instead of the z distribution.

25;5;10:;10: 10 NsHH X

1255.

Nsest X

M 11

)1011(11

tX

064.2)24,05(. t 1<2.064, n.s.

Interval = ]064.13,936.8[)1(064.211

ˆ

MtX

Interval is about 9 to 13 and contains 10, so n.s.

(c.f. z=1.96)

Page 120: Engg. mathematics iii

Difference Between Means (1)

• Most studies have at least 2 groups (e.g., M vs. F, Exp vs. Control)

• If we want to know diff in population means, best guess is diff in sample means.

• Unbiased:• Variance of the Difference:• Standard Error:

22

2121 )var( MMyy

212121 )()()( yEyEyyE

22

21 MMdiff

Page 121: Engg. mathematics iii

Difference Between Means (2)

• We can estimate the standard error of the difference between means.

• For large samples, can use z

22

21 ... MMdiff estestest

diffestXX

diffz )()( 2121

3;100;12

2;100;10

0:;0:

222

111

211210

SDNX

SDNX

HH

36.10013

1009

1004. diffest

05.;56.536.2

36.0)1210( pzdiff

Page 122: Engg. mathematics iii

Independent Samples t (1)

• Looks just like z:• df=N1-1+N2-1=N1+N2-2• If SDs are equal, estimate is:

diffestyy

difft )()( 2121

21

2

2

2

1

2 11NNNNdiff

Pooled variance estimate is weighted average:

)]2/(1/[])1()1[( 21222

211

2 NNsNsNPooled Standard Error of the Difference (computed):

21

21

21

222

211

2)1()1(.

NNNN

NNsNsNest diff

Page 123: Engg. mathematics iii

Independent Samples t (2)

21

21

21

222

211

2)1()1(.

NNNN

NNsNsNest diff

diffestyy

difft )()( 2121

7;83.5;20

5;7;18

0:;0:

2222

1211

211210

Nsy

Nsy

HH

47.13512

275)83.5(6)7(4.

diffest

..;36.147.12

47.10)2018( sntdiff

tcrit = t(.05,10)=2.23

Page 124: Engg. mathematics iii

Dependent t (1)Observations come in pairs. Brother, sister, repeated measure.

),cov(2 212

22

12 yyMMdiff

Problem solved by finding diffs between pairs Di=yi1-yi2.

1)( 2

2

N

DDs i

D Nsest D

MD .ND

D i)(

MDestDEDt

.)(

df=N(pairs)-1

Page 125: Engg. mathematics iii

Dependent t (2)Brother Sister5 77 83 3

5y 6y

Diff2 11 00 1

1D

58.3/1. MDest

72.158.1

.)(

MDestDEDt

11

)( 2

N

DDsD

2)( DD

Page 126: Engg. mathematics iii

Assumptions

• The t-test is based on assumptions of normality and homogeneity of variance.

• You can test for both these (make sure you learn the SAS methods).

• As long as the samples in each group are large and nearly equal, the t-test is robust, that is, still good, even tho assumptions are not met.

Page 127: Engg. mathematics iii

UNIT IVThe Bisection Method

Page 128: Engg. mathematics iii

Introduction

• Root of a function:

• Root of a function f(x) = a value a such that:

• f(a) = 0

Page 129: Engg. mathematics iii

Introduction (cont.)

• Example:

Function: f(x) = x2 - 4

Roots: x = -2, x = 2

Because: f(-2) = (-2)2 - 4 = 4 - 4 = 0 f(2) = (2)2 - 4 = 4 - 4 = 0

Page 130: Engg. mathematics iii

A Mathematical Property

• Well-known Mathematical Property:

• If a function f(x) is continuous on the interval [a..b] and sign of f(a) ≠ sign of f(b), then

• There is a value c [∈ a..b] such that: f(c) = 0 I.e., there is a root c in the interval [a..b]

Page 131: Engg. mathematics iii

A Mathematical Property (cont.)

• Example:

Page 132: Engg. mathematics iii

The Bisection Method

• The Bisection Method is a successive approximation method that narrows down an interval that contains a root of the function f(x)

• The Bisection Method is given an initial interval [a..b] that contains a root (We can use the property sign of f(a) ≠ sign of f(b) to find such an initial interval)

• The Bisection Method will cut the interval into 2 halves and check which half interval contains a root of the function

• The Bisection Method will keep cut the interval in halves until the resulting interval is extremely small The root is then approximately equal to any value in the final (very small) interval.

Page 133: Engg. mathematics iii

The Bisection Method (cont.)

• Example:

• Suppose the interval [a..b] is as follows:

Page 134: Engg. mathematics iii

The Bisection Method (cont.)

• We cut the interval [a..b] in the middle: m = (a+b)/2

Page 135: Engg. mathematics iii

The Bisection Method (cont.)

• Because sign of f(m) ≠ sign of f(a) , we proceed with the search in the new interval [a..b]:

Page 136: Engg. mathematics iii

The Bisection Method (cont.)

We can use this statement to change to the new interval:

b = m;

Page 137: Engg. mathematics iii

The Bisection Method

• In the above example, we have changed the end point b to obtain a smaller interval that still contains a root

In other cases, we may need to changed the end point b to obtain a smaller interval that still contains a root

Page 138: Engg. mathematics iii

The Bisection Method (cont.)

• Here is an example where you have to change the end point a:

• Initial interval [a..b]:

Page 139: Engg. mathematics iii

The Bisection Method (cont.)

• After cutting the interval in half, the root is contained in the right-half, so we have to change the end point a:

Page 140: Engg. mathematics iii

The Bisection Method

• Rough description (pseudo code) of the Bisection Method:

Given: interval [a..b] such that: sign of f(a) ≠ sign of f(b)

repeat (until the interval [a..b] is "very small") { a+b m = -----; // m = midpoint of interval [a..b] 2

if ( sign of f(m) ≠ sign of f(b) ) { use interval [m..b] in the next iteration

Page 141: Engg. mathematics iii

The Bisection Method

(i.e.: replace a with m) } else { use interval [a..m] in the next iteration (i.e.: replace b with m) } }

Approximate root = (a+b)/2; (any point between [a..b] will do because the interval [a..b] is very small)

Page 142: Engg. mathematics iii

The Bisection Method

• Structure Diagram of the Bisection Algorithm:

Page 143: Engg. mathematics iii

The Bisection Method

• Example execution:

• We will use a simple function to illustrate the execution of the Bisection Method • Function used:

Roots: √3 = 1.7320508... and −√3 = −1.7320508...

f(x) = x2 - 3

Page 144: Engg. mathematics iii

The Bisection Method (cont.)

• We will use the starting interval [0..4] since:

The interval [0..4] contains a root because: sign of f(0) ≠ sign of f(4)

• f(0) = 02 − 3 = −3 • f(4) = 42 − 3 = 13

Page 145: Engg. mathematics iii

Regula-Falsi Method

Page 146: Engg. mathematics iii

Regula-Falsi Method

Type of Algorithm (Equation Solver)

The Regula-Falsi Method (sometimes called the False Position Method) is a method used to find a numerical estimate of an equation.

This method attempts to solve an equation of the form f(x)=0. (This is very common in most numerical analysis applications.) Any equation can be written in this form.

Algorithm Requirements

This algorithm requires a function f(x) and two points a and b for which f(x) is positive for one of the values and negative for the other. We can write this condition as f(a)f(b)<0.

If the function f(x) is continuous on the interval [a,b] with f(a)f(b)<0, the algorithm will eventually converge to a solution.

This algorithm can not be implemented to find a tangential root. That is a root that is tangent to the x-axis and either positive or negative on both side of the root. For example f(x)=(x-3)2, has a tangential root at x=3.

Page 147: Engg. mathematics iii

Regula-Falsi Algorithm

The idea for the Regula-Falsi method is to connect the points (a,f(a)) and (b,f(b)) with a straight line.

Since linear equations are the simplest equations to solve for find the regula-falsi point (xrfp) which is the solution to the linear equation connecting the endpoints.

Look at the sign of f(xrfp):

If sign(f(xrfp)) = 0 then end algorithm

else If sign(f(xrfp)) = sign(f(a)) then set a = xrfp

else set b = xrfp

x-axisa b

f(b)

f(a) actual root

f(x)xrfp

equation of line:

axab

afbfafy

)()()(

solving for xrfp

)()(

)()()(

)(

)()()(0

afbfabafax

axafbfabaf

axab

afbfaf

rfp

rfp

rfp

Page 148: Engg. mathematics iii

Example

Lets look for a solution to the equation x3-2x-3=0.

We consider the function f(x)=x3-2x-3

On the interval [0,2] the function is negative at 0 and positive at 2. This means that a=0 and b=2 (i.e. f(0)f(2)=(-3)(1)=-3<0, this means we can apply the algorithm).

23

46

31)2(3

)0()2(02)0(0

ff

fxrfp

821

23)(

fxf rfp

This is negative and we will make the a =3/2 and b is the same and apply the same thing to the interval [3/2,2].

2954

5821

23

123

)2(2

23

82121

821

23

23

23

fff

xrfp

267785.02954)(

fxf rfp

This is negative and we will make the a =54/29 and b is the same and apply the same thing to the interval [54/29,2].

Page 149: Engg. mathematics iii

Stopping Conditions

Aside from lucking out and actually hitting the root, the stopping condition is usually fixed to be a certain number of iterations or for the Standard Cauchy Error in computing the Regula-Falsi Point (xrfp) to not change more than a prescribed amount (usually denoted ).

Page 150: Engg. mathematics iii

Unit - IVInterpolation

• Estimation of intermediate values between precise data points. The most common method is:

• Although there is one and only one nth-order polynomial that fits n+1 points, there are a variety of mathematical formats in which this polynomial can be expressed:– The Newton polynomial– The Lagrange polynomial

nn xaxaxaaxf 2

210)(

Page 151: Engg. mathematics iii
Page 152: Engg. mathematics iii

Newton’s Divided-Difference Interpolating Polynomials

Linear Interpolation/• Is the simplest form of interpolation, connecting two data

points with a straight line.

• f1(x) designates that this is a first-order interpolating polynomial.

)()()()()(

)()()()(

00

0101

0

01

0

01

xxxx

xfxfxfxf

xxxfxf

xxxfxf

Linear-interpolation formula

Slope and a finite divided difference approximation to 1st derivative

Page 153: Engg. mathematics iii
Page 154: Engg. mathematics iii

Quadratic Interpolation/• If three data points are available, the estimate is

improved by introducing some curvature into the line connecting the points.

• A simple procedure can be used to determine the values of the coefficients.

))(()()( 1020102 xxxxbxxbbxf

02

01

01

12

12

22

0

0111

000

)()()()(

)()()(

xxxx

xfxfxx

xfxf

bxx

xxxfxfbxx

xfbxx

Page 155: Engg. mathematics iii

General Form of Newton’s Interpolating Polynomials/

0

02111011

011

0122

011

00

01110

012100100

],,,[],,,[],,,,[

],[],[],,[

)()(],[

],,,,[

],,[],[

)(],,,[)())((

],,[))((],[)()()(

xxxxxfxxxfxxxxf

xxxxfxxf

xxxf

xxxfxf

xxf

xxxxfb

xxxfbxxfb

xfbxxxfxxxxxx

xxxfxxxxxxfxxxfxf

n

nnnnnn

ki

kjjikji

ji

jiji

nnn

nnn

n

Bracketed function evaluations are finite divided differences

Page 156: Engg. mathematics iii

Errors of Newton’s Interpolating Polynomials/• Structure of interpolating polynomials is similar to the Taylor

series expansion in the sense that finite divided differences are added sequentially to capture the higher order derivatives.

• For an nth-order interpolating polynomial, an analogous relationship for the error is:

• For non differentiable functions, if an additional point f(xn+1) is available, an alternative formula can be used that does not require prior knowledge of the function:

)())(()!1(

)(10

)1(

n

n

n xxxxxxn

fR

)())(](,,,,[ 10011 nnnnn xxxxxxxxxxfR

Is somewhere containing the unknown and he data

Page 157: Engg. mathematics iii

Lagrange Interpolating Polynomials

• The Lagrange interpolating polynomial is simply a reformulation of the Newton’s polynomial that avoids the computation of divided differences:

n

ijj ji

ji

n

iiin

xxxx

xL

xfxLxf

0

0

)(

)()()(

Page 158: Engg. mathematics iii

)(

)()()(

)()()(

21202

10

12101

200

2010

212

101

00

10

11

xfxxxx

xxxx

xfxxxxxxxxxf

xxxxxxxxxf

xfxxxxxf

xxxxxf

•As with Newton’s method, the Lagrange version has an estimated error of:

n

iinnn xxxxxxfR

001 )(],,,,[

Page 159: Engg. mathematics iii
Page 160: Engg. mathematics iii

Coefficients of an Interpolating Polynomial

• Although both the Newton and Lagrange polynomials are well suited for determining intermediate values between points, they do not provide a polynomial in conventional form:

• Since n+1 data points are required to determine n+1 coefficients, simultaneous linear systems of equations can be used to calculate “a”s.

nx xaxaxaaxf 2

210)(

Page 161: Engg. mathematics iii

nnnnnn

nn

nn

xaxaxaaxf

xaxaxaaxf

xaxaxaaxf

2210

12121101

02020100

)(

)(

)(

Where “x”s are the knowns and “a”s are the unknowns.

Page 162: Engg. mathematics iii
Page 163: Engg. mathematics iii

Spline Interpolation

• There are cases where polynomials can lead to erroneous results because of round off error and overshoot.

• Alternative approach is to apply lower-order polynomials to subsets of data points. Such connecting polynomials are called spline functions.

Page 164: Engg. mathematics iii
Page 165: Engg. mathematics iii
Page 166: Engg. mathematics iii
Page 167: Engg. mathematics iii
Page 168: Engg. mathematics iii

NEWTON FORWARD INTERPOLATION ON EQUISPACED POINTS• Lagrange Interpolation has a number of disadvantages• The amount of computation required is large• Interpolation for additional values of requires the same amount of effort as the first value (i.e. no part of the previous calculation can be used)• When the number of interpolation points are changed (increased/decreased), the results of the previous computations can not be used• Error estimation is difficult (at least may not be convenient)• Use Newton Interpolation which is based on developing difference tables for a given setof data points

Page 169: Engg. mathematics iii
Page 170: Engg. mathematics iii

Newton’s Divided Difference Polynomial MethodTo illustrate this method, linear and quadratic interpolation is presented first. Then, thegeneral form of Newton’s divided difference polynomial method is presented. To illustratethe general form, cubic interpolation is shown in Figure

Page 171: Engg. mathematics iii

UNIT - VMatrix Decomposition

Page 172: Engg. mathematics iii

Introduction

Some of most frequently used decompositions are the LU, QR, Cholesky, Jordan, Spectral decomposition and Singular value decompositions.

This Lecture covers relevant matrix decompositions, basic numerical methods, its computation and some of its applications. Decompositions provide a numerically stable way to solve a system of linear equations, as shown already in [Wampler, 1970], and to invert a matrix. Additionally, they provide an important tool for analyzing the numerical stability of a system.

Page 173: Engg. mathematics iii

Easy to solve systemSome linear system that can be easily solved

The solution:

nnn ab

abab

/

//

222

111

Page 174: Engg. mathematics iii

Easy to solve system (Cont.)Lower triangular matrix:

Solution: This system is solved using forward substitution

Page 175: Engg. mathematics iii

Easy to solve system (Cont.)Upper Triangular Matrix:

Solution: This system is solved using Backward substitution

Page 176: Engg. mathematics iii

LU Decomposition

and

Where,

mm

m

m

u

uuuuu

U

00

0 222

11211

mmmm lll

lll

L

21

2221

11

000

LUA

LU decomposition was originally derived as a decomposition of quadratic and bilinear forms. Lagrange, in the very first paper in his collected works( 1759) derives the algorithm we call Gaussian elimination. Later Turing introduced the LU decomposition of a matrix in 1948 that is used to solve the system of linear equation.

Let A be a m × m with nonsingular square matrix. Then there exists two matrices L and U such that, where L is a lower triangular matrix and U is an upper triangular matrix.

Page 177: Engg. mathematics iii

A … U (upper triangular) U = Ek E1 A A = (E1)1 (Ek)1 U

If each such elementary matrix Ei is a lower triangular matrices,it can be proved that (E1)1, , (Ek)1 are lower triangular, and(E1)1 (Ek)1 is a lower triangular matrix.Let L=(E1)1 (Ek)1 then A=LU.

How to decompose A=LU?

21336812226

102/1012001

130010001

500240226

21336812226

102/1012001

1120240226

Now, 21336812226

A

U E2 E1 A

Page 178: Engg. mathematics iii

Calculation of L and U (cont.)

Now reducing the first column we have

21336812226

A

21336812226

100010001

21336812226

102/1012001

130010001

500240226

21336812226

102/1012001

1120240226

=

Page 179: Engg. mathematics iii

If A is a Non singular matrix then for each L (lower triangular matrix) the upper triangular matrix is unique but an LU decomposition is not unique. There can be more than one such LU decomposition for a matrix. Such as

Calculation of L and U

132/1012001

130010001

102/1012001

130010001

102/1012001 11

21336812226

A

132/1012001

500240226

21336812226

A

1330112006

500240

6/26/21

Now

Therefore,

=

=LU=

=LU

Page 180: Engg. mathematics iii

Calculation of L and U (cont.) Thus LU decomposition is not unique. Since we compute LU

decomposition by elementary transformation so if we change L then U will be changed such that A=LU

To find out the unique LU decomposition, it is necessary to put some restriction on L and U matrices. For example, we can require the lower triangular matrix L to be a unit one (i.e. set all the entries of its main diagonal to ones).

LU Decomposition in R:• library(Matrix)• x<-matrix(c(3,2,1, 9,3,4,4,2,5 ),ncol=3,nrow=3)• expand(lu(x))

Calculation of L and U

Page 181: Engg. mathematics iii

• Note: there are also generalizations of LU to non-square and singular matrices, such as rank revealing LU factorization.

• [Pan, C.T. (2000). On the existence and computation of rank revealing LU factorizations. Linear Algebra and its Applications, 316: 199-222.

• Miranian, L. and Gu, M. (2003). Strong rank revealing LU factorizations. Linear Algebra and its Applications, 367: 1-16.]

• Uses: The LU decomposition is most commonly used in the solution of systems of simultaneous linear equations. We can also find determinant easily by using LU decomposition (Product of the diagonal element of upper and lower triangular matrix).

Calculation of L and U

Page 182: Engg. mathematics iii

Solving system of linear equation using LU decomposition

Suppose we would like to solve a  m×m  system AX = b. Then we can find a LU-decomposition for A, then to solve AX =b, it is enough to solve the systems

Thus the system LY = b can be solved by the method of forward substitution and the system UX = Y can be solved by the method of

backward substitution. To illustrate, we give some examples Consider the given system AX = b, where

and

21336812226

A

17148

b

Page 183: Engg. mathematics iii

We have seen A = LU, where

Thus, to solve AX = b, we first solve LY = b by forward substitution

Then

Solving system of linear equation using LU decomposition

132/1012001

L

500

240226

U

17148

132/1012001

3

2

1

yyy

152

8

3

2

1

yyy

Y

Page 184: Engg. mathematics iii

Now, we solve UX =Y by backward substitution

then

Solving system of linear equation using LU decomposition

152

8

500240226

3

2

1

xxx

321

3

2

1

xxx

Page 185: Engg. mathematics iii

QR Decomposition

If A is a m×n matrix with linearly independent columns, then A can be decomposed as , where Q is a m×n matrix whose columns form an orthonormal basis for the column space of A and R is an nonsingular upper triangular matrix.

QRA

Page 186: Engg. mathematics iii

QR-Decomposition Theorem : If A is a m×n matrix with linearly independent columns, then

A can be decomposed as , where Q is a m×n matrix whose columns form an orthonormal basis for the column space of A and R is an nonsingular upper triangular matrix.

Proof: Suppose A=[u1 | u2| . . . | un] and rank (A) = n. Apply the Gram-Schmidt process to {u1, u2 , . . . ,un} and the orthogonal vectors v1, v2 , . . . ,vn are

Let for i=1,2,. . ., n. Thus q1, q2 , . . . ,qn form a orthonormal

basis for the column space of A.

QRA

121

122

2

212

1

1 ,,,

i

i

iiiiii v

v

vuv

v

vuv

v

vuuv

i

ii v

vq

Page 187: Engg. mathematics iii

QR-Decomposition

Now,

i.e.,

Thus ui is orthogonal to qj for j>i;

121

122

2

212

1

1 ,,,

i

i

iiiiii v

v

vuv

v

vuv

v

vuvu

112211 ,,, iiiiiiii qquqquqquqvu

},,{ },,,{ 221 iiii qqqspanvvvspanu

112211

223113333

112222

111

,,,

,,

,

nnnnnnnn qquqquqquqvu

qquqquqvu

qquqvu

qvu

Page 188: Engg. mathematics iii

Let Q= [q1 q2 . . . qn] , so Q is a m×n matrix whose columns form an orthonormal basis for the column space of A .

Now,

i.e., A=QR. Where,

Thus A can be decomposed as A=QR , where R is an upper triangular and nonsingular matrix.

QR-Decomposition

n

n

n

n

nn

v

quvququvquququv

qqquuuA

0000

,00,,0,,,

33

2232

113121

2121

n

n

n

n

v

quvququvquququv

R

0000

,00,,0,,,

33

2232

113121

Page 189: Engg. mathematics iii

QR Decomposition

Example: Find the QR decomposition of

100011001111

A

Page 190: Engg. mathematics iii

Applying Gram-Schmidt process of computing QR decomposition 1st Step:

2nd Step:

3rd Step:

Calculation of QR Decomposition

0313131

1

3

11

1

111

aa

q

ar

322112 aqr T

06/1

326/1

ˆˆ1

32ˆ

03/1

3/23/1

0313131

)3/2(

01

01

ˆ

22

2

222

121221122

qq

q

qr

rqaaqqaq T

Page 191: Engg. mathematics iii

4th Step:

5th Step:

6th Step:

Calculation of QR Decomposition

313113 aqr T

613223 aqr T

6/26/1

06/1

ˆˆ1

2/6ˆ

12/1

02/1

ˆ

33

3

333

223113332231133

qq

q

qr

qrqraaqqaqqaq TT

Page 192: Engg. mathematics iii

Therefore, A=QR

R code for QR Decomposition:x<-matrix(c(1,2,3, 2,5,4, 3,4,9),ncol=3,nrow=3)qrstr <- qr(x)Q<-qr.Q(qrstr)R<-qr.R(qrstr)

Uses: QR decomposition is widely used in computer codes to find the eigenvalues of a matrix, to solve linear systems, and to find least squares approximations.

Calculation of QR Decomposition

2/6006/16/203/13/23

6/2006/16/13/1

06/23/16/16/13/1

100011001111

Page 193: Engg. mathematics iii

Least square solution using QR Decomposition

The least square solution of b is

Let X=QR. Then

Therefore,

YXbXX tt

ZYQRbYQRRRbRRYQRRbR ttttttttt

11

YQRYX

RbRQRbQRbQRQRbXXttt

ttttt

Page 194: Engg. mathematics iii

Procedure To find out the cholesky decomposition Suppose

We need to solve the equation

nnnn

n

n

aaa

aaaaaa

A

21

22221

11211

TL

nn

n

n

L

nnnnnnnn

n

n

l

lllll

lll

lll

aaa

aaaaaa

A

00

0000

222

12111

21

2221

11

21

22221

11211

Page 195: Engg. mathematics iii

Example of Cholesky Decomposition

Suppose

Then Cholesky Decomposition

Now,

2/11

1

2

k

skskkkk lal

5222102224

A

311031002

L

For k from 1 to n

For j from k+1 to nkk

k

sksjsjkjk lllal

1

1

Page 196: Engg. mathematics iii

R code for Cholesky Decomposition

• x<-matrix(c(4,2,-2, 2,10,2, -2,2,5),ncol=3,nrow=3)• cl<-chol(x)

• If we Decompose A as LDLT then

and

13/12/1012/1001

L

300090004

D

Page 197: Engg. mathematics iii

Application of Cholesky Decomposition

Cholesky Decomposition is used to solve the system of linear equation Ax=b, where A is real symmetric and positive definite.

In regression analysis it could be used to estimate the parameter if XTX is positive definite.

In Kernel principal component analysis, Cholesky decomposition is also used (Weiya Shi;   Yue-Fei Guo; 2010)

Page 198: Engg. mathematics iii

Jordan Decomposition• Let A be any n×n matrix then there exists a nonsingular matrix P and JK(λ)

a k×k matrix form

Such that

000

010001

)(kJ

)(000

0)(000)(

2

1

1 2

1

rk

k

k

rJ

JJ

APP

where k1+k2+ … + kr =n. Also λi , i=1,2,. . ., r are the characteristic roots And ki are the algebraic multiplicity of λi ,

Jordan Decomposition is used in Differential equation and time series analysis.

Page 199: Engg. mathematics iii

Spectral Decomposition

Let A be a m × m real symmetric matrix. Then

there exists an orthogonal matrix P such that or , where Λ is a diagonal

matrix.APPT TPPA

Page 200: Engg. mathematics iii

Basic Idea on Jacobi methodConvert the system: into the equivalent system:

• Generate a sequence of approximation

BAx

dCxx

dCxx kk )1()(,..., )2()1( xx

3333132131

2323122121

1313212111

bxaxaxabxaxaxabxaxaxa

33

32

33

321

33

313

22

23

22

231

22

212

11

13

11

132

11

121

abx

aax

aax

abx

aax

aax

abx

aax

aax

Page 201: Engg. mathematics iii

Jacobi iteration method

nnnnnn

nn

nn

bxaxaxa

bxaxaxabxaxaxa

2211

22222121

11212111

0

02

01

0

nx

xx

x

)(1 01

02121

11

11 nn xaxab

ax

)(1 011

022

011

1 nnnnnn

nnn xaxaxab

ax

)(1 02

0323

01212

22

12 nn xaxaxab

ax

1

1 1

1 1 i

j

n

ij

kjij

kjiji

ii

ki xaxab

ax

Page 202: Engg. mathematics iii

xk+1=Exk+f iteration for Jacobi method

A can be written as A=L+D+U (not decomposition)

00000

0

000000

000000

23

1312

33

22

11

3231

21

333231

232221

131211

aaa

aa

a

aaa

aaaaaaaaa

n

ij

kjij

i

j

kjiji

ii

ki xaxab

ax

1

1

1

1 1 xk+1=-D-1(L+U)xk+D-1bE=-D-1(L+U)f=D-1b

Ax=b (L+D+U)x=b

Dxk+1 =-(L+U)xk+b

kk UxLxDxk+1

Page 203: Engg. mathematics iii

Gauss-Seidel (GS) iteration

nnnnnn

nn

nn

bxaxaxa

bxaxaxabxaxaxa

2211

22222121

11212111

0

02

01

0

nx

xx

x

1

1 1

11 1 i

j

n

ij

kjij

kjiji

ii

ki xaxab

ax)(1 0

102121

11

11 nn xaxab

ax

)(1 111

122

111

1 nnnnnn

nnn xaxaxab

ax

)(1 02

0323

11212

22

12 nn xaxaxab

ax

Use the latestupdate

Page 204: Engg. mathematics iii

Gauss-Seidel MethodAn iterative method.

Basic Procedure:

Algebraically solve each linear equation for xi

Assume an initial guess solution array

Solve for each xi and repeat

Use absolute relative approximate error after each iteration to check if error is within a pre-specified tolerance.

Page 205: Engg. mathematics iii

Gauss-Seidel MethodAlgorithm

A set of n equations and n unknowns:

11313212111 ... bxaxaxaxa nn

2323222121 ... bxaxaxaxa n2n

nnnnnnn bxaxaxaxa ...332211

. . . . . .

If: the diagonal elements are non-zero

Rewrite each equation solving for the corresponding unknown

ex: First equation, solve for x1

Second equation, solve for x2

Page 206: Engg. mathematics iii

Gauss-Seidel MethodAlgorithm

Rewriting each equation

11

131321211 a

xaxaxacx nn

nn

nnnnnnn

nn

nnnnnnnnnn

nn

axaxaxac

x

axaxaxaxac

x

axaxaxacx

11,2211

1,1

,122,122,111,111

22

232312122

From Equation 1

From equation 2

From equation n-1

From equation n

Page 207: Engg. mathematics iii

Gauss-Seidel MethodAlgorithm

General Form of each equation

11

11

11

1 a

xac

x

n

jj

jj

22

21

22

2 a

xac

x

j

n

jj

j

1,1

11

,11

1

nn

n

njj

jjnn

n a

xac

x

nn

n

njj

jnjn

n a

xac

x

1

Page 208: Engg. mathematics iii

Derivation of the Trapezoidal Rule

Page 209: Engg. mathematics iii

Method Derived From Geometry

The area under the curve is a trapezoid. The integral

trapezoidofAreadxxfb

a

)(

)height)(sidesparallelofSum(21

)ab()a(f)b(f 21

2)b(f)a(f)ab(

Figure 2: Geometric Representation

f(x)

a b

b

a

dx)x(f1

y

x

f1(x)

Page 210: Engg. mathematics iii

Multiple Segment Trapezoidal Rule

f(x)

a b

y

x

4aba

42 aba

4

3 aba

Figure 4: Multiple (n=4) Segment Trapezoidal Rule

Divide into equal segments as shown in Figure 4. Then the width of each segment is:

nabh

The integral I is:

b

adx)x(fI

Page 211: Engg. mathematics iii

What is Integration?

Integration

b

adx)x(fI

The process of measuring the area under a curve.

Where:

f(x) is the integrand

a= lower limit of integration

b= upper limit of integration

f(x)

a b

y

x

b

a

dx)x(f

Page 212: Engg. mathematics iii

Basis of Simpson’s 1/3rd RuleTrapezoidal rule was based on approximating the integrand by a firstorder polynomial, and then integrating the polynomial in the interval ofintegration. Simpson’s 1/3rd rule is an extension of Trapezoidal rulewhere the integrand is approximated by a second order polynomial.

Hence

b

a

b

adx)x(fdx)x(fI 2

Where is a second order polynomial. )x(f2

22102 xaxaa)x(f

Page 213: Engg. mathematics iii

Basis of Simpson’s 1/3rd Rule

Choose

)),a(f,a( ,baf,ba

22

))b(f,b(

and

as the three points of the function to evaluate a0, a1 and a2.

22102 aaaaa)a(f)a(f

2

2102 2222

baabaaabafbaf

22102 babaa)b(f)b(f

Page 214: Engg. mathematics iii

Basis of Simpson’s 1/3rd Rule

Solving the previous equations for a0, a1 and a2 give

22

22

0 22

4

baba

)a(fb)a(abfbaabf)b(abf)b(faa

221 22

4332

4

baba

)b(bfbabf)a(bf)b(afbaaf)a(afa

222 22

22

baba

)b(fbaf)a(fa

Page 215: Engg. mathematics iii

Basis of Simpson’s 1/3rd Rule

Then

b

adx)x(fI 2

b

adxxaxaa 2

210

b

a

xaxaxa

32

3

2

2

10

32

33

2

22

10abaaba)ab(a

Page 216: Engg. mathematics iii

Basis of Simpson’s 1/3rd Rule

Substituting values of a0, a1, a 2 give

)b(fbaf)a(fabdx)x(fb

a 24

62

Since for Simpson’s 1/3rd Rule, the interval [a, b] is broken

into 2 segments, the segment width

2abh

Page 217: Engg. mathematics iii

Basis of Simpson’s 1/3rd Rule

0104.203.0 623 xxxxf

)b(fbaf)a(fhdx)x(fb

a 24

32

Hence

Because the above form has 1/3 in its formula, it is called Simpson’s 1/3rd Rule.

Page 218: Engg. mathematics iii

Multiple Segment Simpson’s 1/3rd Rule

Just like in multiple segment Trapezoidal Rule, one can subdivide the interval

[a, b] into n segments and apply Simpson’s 1/3rd Rule repeatedly overevery two segments. Note that n needs to be even. Divide interval[a, b] into equal segments, hence the segment width

nabh

nx

x

b

adx)x(fdx)x(f

0

where

ax 0 bxn

Page 219: Engg. mathematics iii

Multiple Segment Simpson’s 1/3rd Rule

.

.

Apply Simpson’s 1/3rd Rule over each interval,

...)x(f)x(f)x(f)xx(dx)x(fb

a

64 210

02

...)x(f)x(f)x(f)xx(

64 432

24

f(x)

. . .

x0 x2 xn-2 xn

x

.....dx)x(fdx)x(fdx)x(fx

x

x

x

b

a

4

2

2

0

n

n

n

n

x

x

x

xdx)x(fdx)x(f....

2

2

4

Page 220: Engg. mathematics iii

Multiple Segment Simpson’s 1/3rd Rule

...)x(f)x(f)x(f)xx(... nnnnn

64 234

42

64 12

2)x(f)x(f)x(f)xx( nnn

nn

Since

hxx ii 22 n...,,,i 42

Page 221: Engg. mathematics iii

Multiple Segment Simpson’s 1/3rd Rule

Then

...)x(f)x(f)x(fhdx)x(fb

a

6

42 210

...)x(f)x(f)x(fh

642 432

...)x(f)x(f)x(fh nnn

642 234

642 12 )x(f)x(f)x(fh nnn

Page 222: Engg. mathematics iii

Multiple Segment Simpson’s 1/3rd Rule

b

adx)x(f ...)x(f...)x(f)x(f)x(fh

n 1310 43

)}]()(...)()(2... 242 nn xfxfxfxf

)()(2)(4)(3

2

2

1

10 n

n

evenii

i

n

oddii

i xfxfxfxfh

)()(2)(4)(3

2

2

1

10 n

n

evenii

i

n

oddii

i xfxfxfxfnab

Page 223: Engg. mathematics iii

Simpson 3/8 Rule for Integration

The main objective of this chapter is to develop appropriate formulas for approximating the integral of the form

Page 224: Engg. mathematics iii

Euler’s Method

We have previously seen Euler’s Method for estimating the solution of a differential equation. That is to say given the derivative as a function of x and y (i.e. f(x,y)) and an initial value y(x0)=y0 and a terminal value xn we can generate an estimate for the corresponding yn. They are related in the following way:

xyxfyy

xxxyx

kkkk

kkkk ),(

),(1

111

The value x = (xn-x0)/n and the accuracy increases with n.

Taylor Method of Order 1

Euler’s Method is one of a family of methods for solving differential equations developed by Taylor. We would call this a Taylor Method of order 1. The 1 refers to the fact that this method used the first derivative to generate the next estimate. In terms of geometry it says you are moving along a line (i.e. the tangent line) to get from one estimate to the next.

Page 225: Engg. mathematics iii

Find the second derivative if the first derivative is given to the right.

Set f(x,y) = x2y and plug it into the formula below.

yxdxdy 2

dxdy

yf

xf

dxyd

2

2

yxxxy 222

Here we notice that:

22 xyfandxy

xf

yxxy 42

Higher Derivatives

Third, fourth, fifth, … etc derivatives can be computed with the same method. This has a recursive definition given to the right.

dxdy

dxyd

ydxyd

xdxyd

n

n

n

n

n

n

1

1

Page 226: Engg. mathematics iii

Picard IterationThe Picard method is a way of approximating solutions of ordinary differential equations. Originally it was a way of proving the existence of solutions. It is only through the use of advanced symbolic computing that it has become a practical way of approximating solutions.In this chapter we outline some of the numerical methods used to approximate solutions of ordinary differential equations. Here is a reminder of the form of a differential equation.

The first step is to transform the differential equation and its initial condition into an integral

Page 227: Engg. mathematics iii

Runge-Kutta 4th Order Method

where

hkkkkyy ii 43211 2261

ii yxfk ,1

hkyhxfk ii 12 2

1,21

hkyhxfk ii 23 2

1,21

hkyhxfk ii 34 ,

For0)0(),,( yyyxf

dxdy

Runge Kutta 4th order method is given by

Page 228: Engg. mathematics iii

How to write Ordinary Differential Equation

50,3.12 yeydxdy x

is rewritten as

50,23.1 yyedxdy x

In this case

yeyxf x 23.1,

How does one write a first order differential equation in the form of

yxfdxdy ,

Page 229: Engg. mathematics iii

UNIT - II

Page 230: Engg. mathematics iii

Fourier Cosine & Sine Integrals

Integral SineFourier :)sin()()(,0)(

)sin()(1odd is f(x) function theIf

Integral CosineFourier :)cos()()(

0)(

)cos()(2)(1)(1

)cos()(1A(w)even is f(x) function theIf

0

0

00

0

dwwxwBxfwA

dvwvvfB(w)

dwwxwAxf

wB

dvwvvfdvdv

dvwvvf

Page 231: Engg. mathematics iii

Example

dwwxw

wdwwxwAf(x)

dvwvdvwvvfwB

wwdvwvdvwvvfwA

f(x)

)cos()sin(2)cos()(

is f of integralFourier The

0)sin(1)sin()(1)(

)sin(2)cos(1)cos()(1)(

1xfor 01x1-for 1

Let

00

1

1

1

1

1

1

Page 232: Engg. mathematics iii

2 1 0 1 2

0

1

1.5

0.5

f 10 x( )

f 100 x( )

g x( )

22 x

f10 integrate from 0 to 10f100 integrate from 0 to 100g(x) the real function

Page 233: Engg. mathematics iii

Similar to Fourier series approximation, the Fourier integral approximation improves as the integration limit increases. It is expected that the integral will converges to the real function when the integration limit is increased to infinity.

Physical interpretation: The higher the integration limit means more higher frequency sinusoidal components have been included in the approximation. (similar effect has been observed when larger n is used in Fourier series approximation) This suggests that w can be interpreted as the frequency of each of the sinusoidal wave used to approximate the real function.Suggestion: A(w) can be interpreted as the amplitude function of the specific sinusoidal wave. (similar to the Fourier coefficient in Fourier series expansion)

Page 234: Engg. mathematics iii

Fourier Cosine Transform

)(ˆ of transformcosineFourier inverse theis )(

)cos()(ˆ2)cos()()(

f(x) of transformcosineFourier thecalled is )(ˆ

by x replaced been has ,)cos()(2)(2

)(ˆ

)(ˆ2 Define

.)cos()(2)( where,)cos()()(

:f(x) function even anFor

00

0

00

wfxf

dwwxwfdwwxwAxf

wf

vdxwxxfwAwf

wfA(w)

dvwvvfwAdwwxwAxf

c

c

c

c

c

Page 235: Engg. mathematics iii

Fourier Sine Transform

)(ˆ of transformsineFourier inverse theis )(

)sin()(ˆ2)sin()()(

f(x) of transformsineFourier thecalled is )(ˆ

by x replaced been has ,)sin()(2)(2

)(ˆ

)(ˆ2 Define

.)sin()(2)( where,)sin()()(

:f(x) function odd anfor Similarly,

00

0

00

wfxf

dwwxwfdwwxwBxf

wf

vdxwxxfwBwf

wfB(w)

dvwvvfwBdwwxwBxf

S

S

S

S

S

Page 236: Engg. mathematics iii

Improper Integral of Type 1a) If exists for every number t ≥ a, then

provided this limit exists (as a finite number).b) If exists for every number t ≤ b, then

provided this limit exists (as a finite number).The improper integrals and are called

convergent if the corresponding limit exists and divergent if the limit does not exist.

c) If both and are convergent, then we define

t

adxxf )(

b

tdxxf )(

t

aa tdxxfdxxf )()( lim

b

t

b

tdxxfdxxf )()( lim

adxxf )(

adxxf )(

adxxf )(

bdxxf )(

a

adxxfdxxfdxxf )()()(

Page 237: Engg. mathematics iii

Examples1

111111.1 limlimlim

11 21 2

txdx

xdx

x t

t

t

t

t

1.2 0000

limlimlim

t

tt

x

tt

x

t

x eeedxedxe

22tantan

tantan

11

11

11.3

11

0101

0

0 222

limlim

limlim

tt

xx

dxx

dxx

dxx

tt

t

tt

t

All three integrals are convergent.

Page 238: Engg. mathematics iii

1lnlnln11 limlimlim 111txdx

xdx

x t

t

t

t

t

An example of a divergent integral:

The general rule is the following:

1p ifdivergent and 1p if convergent is 11

dxx p

1 2 convergent is 1 that slide previous thefrom Recall dxx

Page 239: Engg. mathematics iii

Definition of an Improper Integral of Type 2a) If f is continuous on [a, b) and is discontinuous at b, then

if this limit exists (as a finite number).b) If f is continuous on (a, b] and is discontinuous at a, then

if this limit exists (as a finite number).The improper integral is called convergent if the

corresponding limit exists and divergent if the limit does not exist.

c) If f has a discontinuity at c, where a < c < b, and both and are convergent, then we define

t

a

b

abt

dxxfdxxf )()( lim

b

t

b

aat

dxxfdxxf )()( lim

b

cdxxf )(

c

adxxf )(

b

adxxf )(

b

c

c

a

b

adxxfdxxfdxxf )()()(