Differential equation

30
B5001- Engineering Mathematics DIFFERENTIAL EQUATION 4.1 INTRODUCTION TO DIFFERENTIAL EQUATIONS A differential equation is an equation which relates an unknown function of a single variable with one or more of its derivatives. Example: The order of a differential equation is the highest derivative involved in the equation, and the degree is the power of the highest derivative in the equation. Example : a. dy dx = 1 +x 1 +y 2 is a DE of order 1 and degree 1. b. x 2 dy dx +y sin x is a DE of order 1 and degree 1. c. d 2 y dx 2 +4 dy dx 2 y= x 2 is a DE of order 2 and degree 1. d. xy dy dx xy 2 = x is a DE of order 1 and degree 1. Sa`adiah Saad JMSK, POLIMAS Page 1 Independent Derivative of y Dependent

description

 

Transcript of Differential equation

Page 1: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

4.1 INTRODUCTION TO DIFFERENTIAL EQUATIONS

A differential equation is an equation which relates an unknown function of a single variable with one or more of its derivatives.

Example:

The order of a differential equation is the highest derivative involved in the equation, and the degree is the power of the highest derivative in the equation.

Example :

a.

dydx

= 1+ x1+ y2

is a DE of order 1 and degree 1.

b.x2 dydx

+ y sin x is a DE of order 1 and degree 1.

c.

d2 ydx2

+4dydx

−2 y=x2

is a DE of order 2 and degree 1.

d.xydydx

−xy2 = x is a DE of order 1 and degree 1.

e.y2+1 = x( dydx )

2

is a DE of order 1 and degree 2

Sa`adiah Saad JMSK, POLIMASPage 1

Independent variable

Derivative of y wrt x

Dependent variable

Page 2: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

f. is a DE of order 2 and degree 2.

Example 1

State the dependent variable, the independent variable, the order and degree for each differential equation.

i.

dsdt

= st ii.

dmdn

−2mn = 0

iii.( dydx )

2

= 4+xx3

iv.t 2dsdt

+ sin t = 0

v.(t 2−1 ) dy

dt = yt

vi.xdydx

+xy = y2+1

vii.xd2 ydx 2

+4dydx

+2 xy = 0viii.

(u3+1 ) dvdu

−uv2 = u

ix.( d2 ydx2 )

2

+3dydx

+2 y = 0x.

xd2 ydx 2

+4dydx

+2 xy = 0

Answer

Dependent VariableIndependent

variableOrder Degree

i. s t 1 1

ii. m n 1 1

iii. y x 1 2

iv. s t 1 1

v. y t 1 1

vi. y x 1 1

vii. y x 2 1

Sa`adiah Saad JMSK, POLIMASPage 2

Page 3: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

viii. v u 1 1

ix. y x 2 2

x. y x 2 1

4.2 Formation of Differential Equations

If ; Differential Equation is formed when the arbitrary constant A

is eliminated from this equation.

Example 2

i. If

Differentiate with respect to x,

dydx

= 20x

dydx

−20 x = 0

ii. If y = x+Ax2 ------Differentiate with respect to x, gives,

dydx

= 1+2 Ax -----

From , A =

y−xx2

Subtituting A =

y−xx2

into

Then,

dydx

= 1+2( y−xx2 )x

= 1+2( y−xx )

¿ 1+2

yx−2

Sa`adiah Saad JMSK, POLIMASPage 3

Differential equation.

Page 4: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Multiply both sides with x.

So, xdydx

= x+2 y−2x

xdydx

= 2 y−x

iii. If y = Ax2−Bx+x -----

Differentiate with respect to x, gives,

dydx

= 2 Ax−B+1 -----

Differentiate

dydx with respect to x.

d2 ydx2

= 2 A -----

From , A =

12d2 ydx 2 -----

Substituting into to get B.

dydx

= 2(12d2 ydx2 )x−B+1

= x( d2 y

dx 2 )−B+1

B = x ( d2 ydx2 )−dydx +1

-----

Then, substitute and into .

y = ( 1

2d2 ydx2 ) x2−(x d2 y

dx 2−dydx

+1) x+ x

Sa`adiah Saad JMSK, POLIMASPage 4

Page 5: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

= 12x2 d

2 ydx 2

−x2 d2 ydx2

+x dydx

−x+x

= − 12x2 d

2 ydx 2

+x dydx

EXERCISE 1

Form differential equation of the following:

i. y=x3+Ax2 iv. y=4 Bx+A

ii. y=Ax2+7 x v. y=A sin 2 x+B kos x

iii. y=Dx2+Ex vi. y=Ce−x+2De x

Answer

i.x2 dydx

=3x 4−2( y−x3 )iv

xdydx

=2 y−7 x

ii.y=x dy

dx− x

2

2 ( d2 ydx2 )

v.

d2 ydx2

=0

iii.

d2 ydx2

+4 y=0vi

d2 ydx2

− y=0

4.3 SOLUTIONS OF FIRST ORDER DIFFERENTIAL EQUATIONS (DE)

We already know that DE is one that contains differential coefficient.

Sa`adiah Saad JMSK, POLIMASPage 5

Page 6: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Example: i. - 1st order DE

ii. - 2nd order DE

Sa`adiah Saad JMSK, POLIMASPage 6

Page 7: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

4.3.1 - Solve By Direct Integration; i.e.

Example 3: Find the general solution of the DE

Answer

Example 4: Find the particular solution of de , given the boundary

conditions .

Answer

Hence

Substituting the boundary conditions;

The particular solution,

Sa`adiah Saad JMSK, POLIMASPage 7

Page 8: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

4.3.2 Solve By Variable Separable;

4.3.2.1 - rearranged to give and then solve by direct

integration; i.e.

Example 5: Find the general solution of de .

Answer

i.e.

Example 6: Find the particular solution of de given that y = 1 when

Answer

Sa`adiah Saad JMSK, POLIMASPage 8

Page 9: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Substituting y=1 and ;

4.3.2.2 - rearranged to give and then solve

by direct integration

Example 7: Solve

Answer

Separating the variables gives: (3 -2y)dy = (2x3 – 1)dx

Example 8: The current in an electric circuit containing resistance R and inductance L

in series with a constant voltage source E is given by the de .

Solve the equation and find i in terms of time t given that when t = 0 and i

= 0.

Answer

Sa`adiah Saad JMSK, POLIMASPage 9

Page 10: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

When t = 0, i= 0;

Example 9: Solve the Des:

a. d.

b. e.

c.

Sa`adiah Saad JMSK, POLIMASPage 10

Page 11: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

4.3.3 Homogeneneous First Order DEs

An equation of the form , where P and Q are function of both x and y of the

same degree – said to be homogenous in y and x.

Example;

f(x,y) Homogeneous degree

1 x2 + 3xy + y2 yes 2

2 yes 1

3 yes 2

4 noy – 1

x - 2

Procedure to solve DE of the form

i.Rearrange into the form

ii.Make the substitution y =vx, from , by the product rule.

iii. Substitute for both y and in the equation . Simplify, by

cancelling, and on equation result in which the variables are separable.

iv. Separate the variable and solve as direct integrating.

v.Substitute

to solve in terms of the original variables.

Sa`adiah Saad JMSK, POLIMASPage 11

Page 12: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Example 10: Solve the DE , given x = 1 when y = 2.Answer

i.Rearranging;

ii.

iii. Substitute for both y and gives:

Example 11: Find the particular solution of DE; given the boundary

conditions that y = 4 when x = 1.

Answer

i.Rearranging;

ii.

Sa`adiah Saad JMSK, POLIMASPage 12

Page 13: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

iii.

4.3.4 Linear First Order DEs

If P = P(x) and Q = Q(x) are functions of x only, then is called a linear

differential equation order 1. We can solve these linear DEs using an integrating

factor. For linear DEs of order 1, the integrating factor is: e∫Pdx

The solution for the DE is given by multiplying y by the integrating factor (on the left)

and multiplying Q by the integrating factor (on the right) and integrating the right side

with respect to x, as follows:

Example 12: Solve for

Sa`adiah Saad JMSK, POLIMASPage 13

Page 14: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Answer

Now for the integrating factor:

IF=

For the left hand side of the formula

we have ye∫Pdx = yx-3

For the right hand of the formula, Q = 7 and the IF = x-3, so:

Applying the outer integral:

Now, applying the whole formula;

we have ;

Multiplying throughout by x3 gives:

Example 13: Solve

Answer

Sa`adiah Saad JMSK, POLIMASPage 14

Page 15: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Here,

Determine

IF =

Now

Apply the formula:

The integral needs a simple substitution: u = sin x, du = cos x dx

Divide throughout by sin x:

Example 14: Solve

Answer

Dividing throughout by dx to get the equation in the required form, we get:

In this example, P(x) = 3 and Q(x) = e-3x.

Now e∫Pdx = e∫3dx = e3x

and

Sa`adiah Saad JMSK, POLIMASPage 15

Page 16: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Using , we have:

ye3x = x + K

or we could write it as:

Example 15: Solve 2(y - 4x2)dx + x dy = 0

Answer

We need to get the equation in the form of a linear DE of order 1.

Expand the bracket and divide throughout by dx:

Rearrange:

Divide throughout by x:

Here,

IF

Now

Applying the formula:

Sa`adiah Saad JMSK, POLIMASPage 16

Page 17: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

gives:

Divide throughout by x2:

Example 16: Solve

Answer

Divide throughout by x:

Here,

Now

Applying the formula: gives

This requires integration by parts, with

So

Sa`adiah Saad JMSK, POLIMASPage 17

Page 18: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Multiplying throughout by x4 gives:

Example 17: Solve , x ¿0 , subject to the initial condition y = 2

when x = 0

Answer

The differential equation can be expressed in the proper form by adding

2y to both sides:

for x ¿0

We have P(x) = 2 and Q(x) =

An integrating factor is given by IF = e for x ¿0

Next, use the first-order linear differential equation theorem, where IF =

e2 xand Q(x) = , to find y:

y =

= for x ¿0

To find C, insert y = 2 when x = 0, to obtain C = 1

Thus y = , x ¿0

Sa`adiah Saad JMSK, POLIMASPage 18

Page 19: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Example 18: Solve with y = 1 when x = 0

Answer

P(x) = ; Q(x) = sin x

IF = e = e

y =

=

=

=

Since y = 1 when x = 0,

1 = implies C = 0

y =

Example 19:

Sa`adiah Saad JMSK, POLIMASPage 19

Page 20: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

a. Solve the DE , given the boundary conditions y=1 when θ = 0.

[Ans: y = ( + 1) sec ]θ θ

b. Solve the DE . [ ans: ]

c. Consider a simple electric circuit with the resistance of 3 an inductance of 2H. If a

battery gives a constant voltage of 24V and the switch is closed when t = 0, the

current, I(t), after t seconds is given by

i) Obtain I(t) [ans: ]

ii) Determine the difference in the amount of current flowing through the circuit

from the fourth to eight seconds. Give your answer to 3 d.p.

[ans: 0.05 A]

iii) If the current is allowed to flow through the circuit for a very long period of

time, estimate I(t).

[ans: ]

4.4 SECOND ORDER DIFFERENTIAL EQUATION

The general form of the second order differential equation with constant coefficients is

Sa`adiah Saad JMSK, POLIMASPage 20

Page 21: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

where a, b, c are constants with a > 0 and Q(x) is a function of x only.

4.4.1 Homogeneous Equation

In this section, most of our examples are homogeneous 2nd order linear DEs (that is, with

Q(x) = 0):

, where a, b, c are constants.

Method of Solution

The equation am2 + bm + c = 0 is called the Auxiliary Equation (A.E.) (or

Characteristic Equation)

The general solution of the differential equation depends on the solution of the A.E. To

find the general solution, we must determine the roots of the A.E. The roots of the A.E.

are given by the well-known quadratic formula:

Summary:

If Differential Equation: ay'' + by' + c = 0 and Associated auxiliary equation is:

am2 + bm + c = 0

Nature of roots Condition General Solution

4.4.1. Real and distinct roots,

m1, m2

b2 − 4ac > 0 y = Aem1x + Bem

2x

4.4.2. Real and equal roots, m b2 − 4ac = 0 y = emx(A + Bx)

Sa`adiah Saad JMSK, POLIMASPage 21

Page 22: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

4.4.3. Complex roots

m1 = α + jω

m1 = α − jω

b2 − 4ac < 0 y = eαx(A cos ωx + B sin ωx)

Example 20

The current i flowing through a circuit is given by the equation ,

Solve for the current i at time t > 0.

Answer

The auxiliary equation arising from the given differential equations is:

A.E.:

So and

We have 2 distinct real roots, so we need to use the first solution from the table above

(y = Aem1x + Bem

2x), but we use i instead of y, and t instead of x.

So

We could have written this as:

Since we have 2 constants of integration. We would be able to find these constants if

we were given some initial conditions.

Example 21

Sa`adiah Saad JMSK, POLIMASPage 22

Page 23: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Solve the following equation in which s is the displacement of a object at time t.

, given that s = 1,

when t = 0

(That is, the object's position is 1 unit and its velocity is 3 units at the beginning of the

motion.)

Answer

The auxiliary equation for our differential equation is:

A.E.

In this case, we have: (repeated root or real equal roots)

We need to use the second form from the table above (y = emx(A + Bx)), and once again

use the correct variables (t and i, instead of x and y).

So .

Now to find the values of the constants:

So we can write

So

The graph of our solution is as follows:

Sa`adiah Saad JMSK, POLIMASPage 23

Page 24: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Example 22

Solve the equation

Answer

This time the auxiliary equation is:

Solving for m, we find that the solutions are a complex conjugate pair:

The solution for our DE, using the 3rd type from the table above:

y = eαx(A cos ωx + B sin ωx)

we get:

Sa`adiah Saad JMSK, POLIMASPage 24

Page 25: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

Example 23

In a RCL series circuit, R = 10 Ω, C = 0.02 F, L = 1 H and the voltage source is E = 100

V. Solve for the current i(t) in the circuit given that at time t = 0, the current in the circuit

is zero and the charge in the capacitor is 0.1 C.

[Note: Damping and the Natural Response in RLC Circuits

Consider a series RLC circuit (one that has a resistor, an inductor and a capacitor) with

a constant driving electro-motive force (emf) E. The current equation for the circuit is

Differentiating, we have

; This is a second order linear homogeneous equation.]

Answer

AE : ,

Sa`adiah Saad JMSK, POLIMASPage 25

Page 26: Differential equation

B5001- Engineering Mathematics DIFFERENTIAL EQUATION

The factors are:

So, ; ; (This means at t = 0, i = A = 0 in this

case.)

Then , We need to find the value of B.

Differentiating gives:

At t = 0,

Returning to equation

Now, at time t = 0, ; So , so B = 19.

Therefore,

Sa`adiah Saad JMSK, POLIMASPage 26