You are on page 1of 17

DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

4.0 ORDINARY DIFFERENTIAL EQUATIONS

4.2 Solutions Of First Order Differential Equations (DE)

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

dy
Example 4 i.  4x ………………… (1st order DE)
dx

d2 y dy
ii. 2  4y  0 ……. ( 2nd order DE)
dx2 dx

4.2.1 (a) Direct Integration


dy
 f(x)
dx

- Solve By Direct Integration;


i.e. y  f(x)dx

Example 5

dy
Find the general solution of the DE  3x2  sin2x
dx

Answer

 dx dx   (3x
dy cos2x
2
 sin2x)dx so y = x 3  c
2

Sa`adiah Saad JMSK, POLIMAS Page 6


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 6

dy
Find the particular solution of de 5  2x  3 , given the boundary conditions
dx
2
y 1 when x = 2 .
5

Answer

dy dy dy 3  2x 3 2x
5  2x  3  5  3  2x    
dx dx dx 5 5 5

3 x2
Hence y  x  c
5 5

Substituting the boundary conditions;


7 3 22 7 6 4 7 6 4 5
 (2)  c    c  c =    1
5 5 5 5 5 5 5 5 5 5

3 x2
The particular solution, y  x  1
5 5

Sa`adiah Saad JMSK, POLIMAS Page 7


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

4.2.1(b) Separating Variables


i) Solve By Variable Separable;

dy dy
 f(y) - rearranged to give  dx
dx f(y)

 f(y)   dx
dy
then solve by direct integration; i.e.

Example 7

dy
Find the general solution of DE 5  sin2 3y .
dx

Answer

  sin
dy dy
5 2
 dx  dx = 5 2
sin 3y 3y


cot3y
x = 5 cosec 2 3y dy = 5[- ] +c
3

5
i.e. x = - cot3y +c
3

Sa`adiah Saad JMSK, POLIMAS Page 8


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 8

dy
Find the particular solution of DE (y2  1)  3y given that y = 1 when x  13
dx 6

Answer

(y 2  1) 1 y2  1
   
1 1
dy  dx  dx = dy  dx = (y  ) dy
3y 3 y 3 y

1 y2
x= ( - ln y) + c
3 2

Substituting y=1 and x  13 ;


6

13 1 1 13 1
= ( - ln 1) + c  c = - =2
6 3 2 6 6

1 2 1
 The particular solution is x = y  ln y  2
6 3

Sa`adiah Saad JMSK, POLIMAS Page 9


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

ii) Solve By Variable Separable;

dy dy
 f(x)g(y) - rearranged to give  f(x)dx
dx g(y)

and then solve by direct integration.

Example 9

dy 2x3  1
Solve 
dx 3  2y

Answer

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

x4
 
(3  2y)dy  (2x  1)dx  3y - y = x c
3 2
2

Example 10: The current in an electric circuit containing resistance R and inductance L
di
in series with a constant voltage source E is given by the de E  L  Ri . Solve the
dt
equation and find i in terms of time t given that when t = 0 and i = 0.

Answer

 
di di 1
L  E  Ri   dt
dt E-Ri L

Let u = E-Ri , du = -Rdi

 
1 du 1 1 1
- = dt  - ln (E - Ri) = t  c
R u L R L

When t = 0, i= 0;

1 1
- ln E = c ;  c = - ln E
R R

Sa`adiah Saad JMSK, POLIMAS Page 10


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

1 1 1
 - ln (E - Ri) = t  ln E
R L R
1 1 t
= ln E - ln (E - Ri) =
R R L
Rt Rt Rt
E Rt E E-Ri  
ln ( )=  eL   e L  E-Ri = Ee L
E-Ri L E-Ri E
Rt
E -
i = ( 1-e L )
R

Example 10

Solve the Differential equations:

dy 2x  xy dy y(2  3x)
 2 d. 
dx y 1 dx x(1  3y)

ds s2  6s  9 dy 6t 2  2t  1
 e. 
dt t2 dt cos y  ey

dy sec h y

dx 2 x

Answer

y2 1 1
 2y  4y  10ln(2  y)  x 2  C b.  C
2 s3 t

c. sinh y  ln(2  x)  C d. d. ln y  3y  2ln x  3x  C

e. sin y  ey  2t 2  t 2  t  C

Sa`adiah Saad JMSK, POLIMAS Page 11


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

4.2.1(c) Homogeneneous Equation ( y=vx)

dy
An equation of the form P = Q , where P and Q are function of both x and y of the
dx
same degree – said to be homogenous in y and x.

Example 11

f(x,y) Homogeneous degree


1 x2 + 3xy + y2 yes 2
x  3y
2 yes 1
2x  y
4 x 2  3y 2
3 yes 2
2 xy
x2  y y–1
4 no
2x  y
2 2 x-2

dy
Procedure to solve DE of the form P =Q
dx

dy dy Q
i. Rearrange P = Q into the form =
dx dx P
dy dv
ii. Make the substitution y =vx, from = v (1) + x , by the product rule.
dx dx
dy dy Q
Substitute for both y and in the equation = . Simplify, by
iii. dx dx P
cancelling, and on equation result in which the variables are separable.
iv. Separate the variable and solve as direct integrating.
y
v. Substitute v = to solve in terms of the original variables.
x

Sa`adiah Saad JMSK, POLIMAS Page 12


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 12

dy
Solve the DE y - x = x , given x = 1 when y = 2.
dx

Answer

dy y - x
i. Rearranging; =
dx x

dy dv
Let y = vx, =v+x
ii. dx dx

dv v x - x
dy v+x =
iii. Substitute for both y and gives: dx x
dx

dv x(v - 1) dv
v+x = x v-1-v
dx x dx

 
dv dx
x  - 1  dv=-  v = - ln x +c
dx x
y
= - ln x +c  Subtitute x =1 and y = 2
x
2
c  c=2 
1
y
 = - ln x + 2 or y = - x ( ln x - 2 )
x

Sa`adiah Saad JMSK, POLIMAS Page 13


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 13

dy x 2  y 2
Find the particular solution of DE; x  given the boundary conditions that y
dx y
= 4 when x = 1.

Answer

dy x 2  y 2 dy x 2  y 2
i. Rearranging; x   
dx y dx yx

dy dv
Let y = vx, =v+x
ii. dx dx

dv x2 + v 2 x2 x 2 (1 + v 2 ) (1 + v 2 )
iii. v+x =  
dx vx2 vx 2 v

dv (1 + v 2 ) 1 + v2  v2 1
x  v  
dx v v v

 vdv  xdx
1
=

v2
= ln x + c
2

y2
2
= ln x + c  y 2  2x 2 (ln x  c)
2x
16
c  c=8   y 2 = 2x 2(lnx + 8)
2

Sa`adiah Saad JMSK, POLIMAS Page 14


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

4.2.1(d) Integrating Factors (Linear Equations)

dy
If P = P(x) and Q = Q(x) are functions of x only, then + Py = Q is called a linear
dx
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:

ye   Qe 
Pdx Pdx
K

Example 14

dy 3
Solve for - y = 7.
dx x

Answer

dy 3 3
- y = 7. then P(x) = - and Q(x) = 7
dx x x

Now for the integrating factor: ye   Qe  K


Pdx Pdx

3
  dx
IF= e  e  e 3 ln x  x 3
Pdx x

For the left hand side of the formula

ye   Qe 
Pdx Pdx

we have ye∫Pdx = yx-3

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

Qe   7 x 3
Pdx

Sa`adiah Saad JMSK, POLIMAS Page 15


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Applying the outer integral:

 7 2
 Qe
 Pdx dx   7 x 3 dx  x k
2

ye   Qe 
Pdx Pdx
Now, applying the whole formula;

- 3 7 -2
we have ; yx =- x +K
2

7 3
Multiplying throughout by x3 gives: y = - x + Kx
2

Example 15

dy
Solve + (cot x)y = cos x
dx

Answer

dy
+ (cot x)y = cos x
dx

Here, then P(x) = cot x and Q(x) = cos x

Determine
ò Pdx = ò cot xdx = lnsin x
ò Pdx = eln sin x = sin x
IF = e

ò Pdx = cos x sin x


Now Qe

Apply the formula:

yeò ò cot xdx dx


Pdx
=
ò Qe
y sin x =
ò cos x sin xdx

Sa`adiah Saad JMSK, POLIMAS Page 16


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

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

2
sin x
y sin x = +K
2

Divide throughout by sin x:

sinx K sinx
y= + = +Kcosecx
2 sinx 2

Example 16

- 3x
Solve dy + 3ydx = e dx

Answer

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

dy - 3x
+ 3y = e
dx

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

Now e∫Pdx = e∫3dx = e3x

and

Qeò
Pdx
ò ò 1dx = x
- 3x 3x
= e e dx =

Using yeò Qeò


Pdx Pdx
=
ò dx + K , we have:

ye3x = x + K

or we could write it as:

x +K
y=
3x
e

Sa`adiah Saad JMSK, POLIMAS Page 17


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 17

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:

2 dy
2y - 8x + x = 0
dx

Rearrange:

dy 2
x + 2y = 8x
dx

Divide throughout by x:

dy 2
+ y = 8x
dx x

2
Here, P(x) = and Q(x) = 8x
x

2
ò Pdx ò x dx 2ln x ln x
2
2
IF = e = e = e = e = x

Now Qeò
Pdx 2 3
= 8xx = 8x

Applying the formula:

yeò Qeò
Pdx Pdx
=
ò dx + K

ò
2 3 4
gives: yx = 8x dx + K = 2x + K

2 K
Divide throughout by x2: y = 2x +
2
x
Sa`adiah Saad JMSK, POLIMAS Page 18
DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

dy 6 x
Example 18 Solve x - 4y = x e
dx

Answer

Divide throughout by x:

dy 4 5 x
- y= x e
dx x

4 5 x
Here, P(x) = - and Q(x) = x e
x

4
ò - dx - 4
IF = eò
P(x)dx ln x - 4
= e x = e = x

ò P(x)dx = x5 ex x- 4 = xex
Now Qe

yeò ò Pdx dx + K
Pdx
Applying the formula: =
ò Qe gives

ò xe dx + K
- 4 x
yx =

This requires integration by parts, with

x
u= x dv=e
x
du = dx v=e

- 4 x x
So yx = xe - e + K

5 x 4 x 4
Multiplying throughout by x4 gives: y = x e - x e +Kx

Sa`adiah Saad JMSK, POLIMAS Page 19


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 19

dy
Solve  e x  2y , x  0 , subject to the initial condition y = 2 when x = 0
dx

Answer

The differential equation can be expressed in the proper form by adding 2y to both
sides:

dy
 2y  e x for x  0
dx

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

An integrating factor is given by IF = e   e


P(x)dx 2dx
 e2x for x  0

Next, use the first-order linear differential equation theorem, where IF = e 2 x and Q(x) =
e x , to find y:


1  2x  x
y= e e dx  C
e 
2x  


1  x
= 2x 
e  C  e x  e2x C for x  0
e  

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

Thus y = e x  e2x , x 0

Sa`adiah Saad JMSK, POLIMAS Page 20


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

dy 2xy
Example 20 Solve   sin x with y = 1 when x = 0
dx 1  x 2

Answer

2x
P(x) = ; Q(x) = sin x
1  x2

 2x 
 dx 
2 1)
1 x2 
IF = e = e ln(x  x2  1


 (x2  1)sin xdx  C
1
y=
1  x  2 


 x2 sin xdx  sin xdx  C 

1
=
1  x  2 

1
2x sin x  (2  x 2 )cos x  cos x  C 
=
1 x  2 

1
2x sin x  (1  x 2 )cos x  C 
=
1 x  2 

Since y = 1 when x = 0,

1
1=
1
 0  1  C implies C = 0

1 2
2xsinx +(1- x )cosx 
y=
1+ x  2 

Sa`adiah Saad JMSK, POLIMAS Page 21


DBM3013 - Engineering Mathematics 3 TOPIC 4: ORDINARY DIFFERENTIAL EQUATION

Example 21

dy
Solve the DE = sec θ + y tan θ , given the boundary conditions y=1 when θ = 0.

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

dy 5 c
Solve the DE: t -5 t = -y . [ ans: y  t ]
dt 2 t

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

dI 4
+ t = 15, I(0) = 0
dt 3

4
45  t
Obtain I(t) [ans: I(t)  (1  e 3 ) ]
4

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]

If the current is allowed to flow through the circuit for a very long period of time, estimate
I(t).

45
[ans: A]
4

Sa`adiah Saad JMSK, POLIMAS Page 22

You might also like