Differential equations

Download Report

Transcript Differential equations

Physics for informatics

Lecture 2

Differential equations

Ing. Jaroslav J íra, CSc.

Differential equations

The most simple differential equation: We are looking for the function Solution of such equation is Example:

y

'  2

x y

' 

f

(

x

)  where

y

(

x

)

y

 

f

(

x

)

dx

C y

x

2 

C y

' 

dy dx

Where x 2 +

C

is general solution of the differential equation Sometimes an additional condition is given like

y

( 2 )  3 that means the function y(x) must pass through a point

x

0  [ 2 , 3 ] 3  2 2 

C

C

  1 

y

(

x

) 

x

2  1 We have obtained a particular solution y(x)=x 2 -1

First order homogenous linear differential equation with constant coefficients

The general formula for such equation is

ay

' 

by

 0

y

(

x

)  ?

To solve this equation we assume the solution in the form of exponential function.

y

e

x

If

y

e

x

then

y

'  and the equation will change into 

e

x

a

e

x

b e

x

 0

e

x

(

a

 

b

)  0 after dividing by the e λx we obtain

a

 

b

 0    

b a

a λ+b is the characteristic equation the solution is

y

Ce

b x a

Where

C

is a constant resulting from the initial condition

Example of the first order LDE – RC circuit Find the time dependence of the electric current

i(t)

in the given circuit.

u

u R

u C u

Ri

 1

C

idt

.

Now we take the first derivative of the right equation with respect to time 0 

di R dt

 1

C i

di dt

 1

RC i

 0 characteristic equation is   1

RC

 0     1

RC

general solution is

i

Ke

 1

RC t

Constant K can be calculated from initial conditions. We know that

i

( 0 ) 

u R

u R

 0

Ke

RC

K

u R

particular solution is

i

u R e

 1

RC t

Solution of the RC circuit in the Mathematica Given values are R=1 k Ω; C=100 μF; u=10 V

Second order homogenous linear differential equation with constant coefficients

The general formula for such equation is

ay

' ' 

by

' 

cy

 0

y

(

x

)  ?

To solve this equation we assume the solution in the form of exponential function:

y

e

x

If

y

e

x

then

y

'  

e

x

and the equation will change into and

y

' '   2

e

x

a

 2

e

x

b

e

x

c e

x

 0

e

x

(

a

 2 

b

 

c

)  0 after dividing by the e λx we obtain

a

 2 

b

 

c

 0 We obtained a quadratic characteristic equation .

The roots are  12  

b

b

2  4

ac

2

a

There exist three solutions according to the discriminant D 1) If D>0 , the roots λ 1 , real and different λ 2 are

D

b

2  4

ac y

C

1

e

 1

x

C

2

e

 2

x

2) If D=0 , the roots are real and identical λ 12 = λ

y

C

1

e

x

C

2

xe

x

3) If D<0 , the roots are complex conjugate λ 1 , λ 2 where α and ω are real and imaginary parts of the root  1  2     

i

 

i

y

y

K

1

e

 1

x

e

x

(

K

1

e

i

x K

2

e

  2

x

K

2

e

i

x K

1

e

x

i

x

) 

e

i

x K

2

e

x

i

  cos

x

x

i

sin 

x Eulers formula y

e

x

[(

K

1 

K

2 ) cos 

x

i

(

K

1 

K

2 ) sin 

x

]

If we substitute we obtain

C

1  (

K

1 

K

2 );

C

2 

i

(

K

1 

K

2 )

y

(

x

) 

e

x

[

C

1 cos 

x

C

2 sin 

x

] This is the solution in some cases, but … Further substitution is sometimes used and then

C

1 

A

sin  ;

C

2 

A

cos 

y

(

x

) 

e

x

[

A

sin  cos 

x

A

cos  sin 

x

] sin(    )  sin  cos   cos  sin  considering formula we finally obtain

y

(

x

) 

e

x A

sin( 

x

  ) where amplitude A and phase φ are constants which can be obtained from the initial conditions and ω is angular frequency .

This example leads to an oscillatory motion.

Example of the second order LDE – a simple harmonic oscillator Evaluate the displacement body of mass

m

x(t) of a on a horizontal spring with spring constant There are no passive resistances.

k

.

If the body is displaced from its equilibrium position (x=0), it experiences a restoring force F , proportional to the displacement x : From the second Newtons law of motion we know

F

ma

m d

2

x dt

2 

m

x

m

x

  

kx

 

x

 

k m x

 0 Characteristic equation is  2 

F

 

k x k m

 0 We have two complex conjugate roots with no real part  12  

i k m

The general solution for our symbols is

x

(

t

) 

e

t A

sin( 

t

  ) No real part of λ means α=0 , and omega in our case The final general solution of this example is  

k m x

(

t

) 

A

sin( 

t

  ) Answer: the body performs simple harmonic motion with amplitude A and phase φ . We need two initial conditions for determination of these constants.

These conditions can be for example From the first condition From the second condition The particular solution is 

A

cos( 0   )

A

sin(

x

(

t

)  0   2 ) 2 sin(   

t

0 2     2 ) cos

x

 ( 0 )   0  0 

x

( 0 )    2  2

A

 2

x

(

t

)  2 cos( 

t

)

Example 2 of the second order LDE – a damped harmonic oscillator The basic theory is the same like in case of the simple harmonic oscillator, but this time we take into account also damping.

The damping is represented by the frictional force F f , which is proportional to the velocity v .

F f

 

c v

 

c dx dt

 

c x

 The total force acting on the body is

F

ma

m

x

F

 

kx

F f

 

kx

c m

x

  

kx

c x

 

m

x

 

c

 

kx

 0 

x

 

c m

k m x

 0 The following substitutions are commonly used  

k m

; 2  

c m

x

  2 

x

   2

x

 0 Characteristic equation is  2  2    2  0

Solution of the characteristic equation  12   2   4  2  4  2     2 where δ is damping constant and ω is angular frequency  2   2 There are three basic solutions according to the δ and ω .

1) δ>ω . Overdamped oscillator. The roots are real and different  1      2    

x

(

t

) 

C

1

e

 1

t

C

2

e

 2

t

2) δ=ω . Critical damping. The roots are real and identical.

x

(

t

) 

C

1

e

t

C

2

te

t

 12       2   2  2   2 3) δ<ω . Underdamped oscillator. The roots are complex conjugate.

x

(

t

) 

Ae

 

t

sin(  '

t

  )  1    

i

 2    

i

 2   2    

i

 '  2   2    

i

 '

Damped harmonic oscillator in the Mathematica Damping constant δ=1 [s -1 ], angular frequency ω=10 [s -1 ]

Damped harmonic oscillator in the Mathematica All three basic solutions together for ω=10 s -1 Overdamped oscillator, δ=20 s -1 Critically damped oscillator, δ=10 s -1 Underdamped oscillator, δ=1 s -1