Engineering Mathematics 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Engineering Mathematics 4

H7K3 35

First Order Differential Equations


Contents
Definition of a Differential Equation.................................................................................. 4

First Order D.E.s with constant coefficients ..................................................................... 7

Solving by Direct Integration ............................................................................................ 8

Separation of Variables ................................................................................................. 10

Worksheet 1 Separation of Variables .......................................................................... 13

Solving Using Transformations ...................................................................................... 15

Worksheet 2 Solve by using Transformations ............................................................. 22

Other Transformations ................................................................................................... 24

Worksheet 3 More Transformation .............................................................................. 27

Integrating Factor Method .............................................................................................. 28

Worksheet 4 Integration Factor Method...................................................................... 35

Answers ......................................................................................................................... 37
Worksheet 1 ................................................................................................... 37
Worksheet 2 ................................................................................................... 38
Worksheet 3 ................................................................................................... 40
Worksheet 4 ................................................................................................... 40

www.esp-scotland.ac.uk 3
Definition of a Differential Equation

A differential equation is any equation which contains derivatives, either ordinary


derivatives or partial derivatives.

Examples

dy
.  4 y  3x
dx
is a differential equation in y and has solution y = f(x)

ds 2 2ds
  8s  40Cos2t
dt 2 dt
is a differential equation in s and has solution s = f(t)

Further Examples

d 2i di 1
L 2 R  i0
dt dt C

y ( 4 )  10 y   4 y   2 y  cos t

Differential equations are classified according to the highest derivative which occurs in
them, and this is called their ORDER.

The first example above is a First Order differential equation in y.


The second and third examples above are Second Order differential equations in s and i
respectively.

The last example above is a Fourth Order differential equation in y.

www.esp-scotland.ac.uk 4
Here is another example of a differential equation.

2
d 2s  ds 
m 2     T  F
dt  dt 
ds
when t  0 s  0 and 0
dt

This is a model for a plane taking off. Its basis is Newton’s 2nd Law (F=ma). Note that
s is how far along the runway the plane has travelled, t is the time coordinate and T is
the thrust generated by the planes jet engines.

Note in this model the initial location of the plane and its initial speed are given, i.e. it is
initially at rest. Consequently the above is called an initial value problem.

In addition the differential equation is of 2nd order, as the highest differential term is

d 2s
dt 2

Further the differential equation is a nonlinear differential equation. It is nonlinear as it


includes the term,
2
 ds 
 
 dt 

In linear differential equations all of the derivatives are to the power of 1 and there are no
products of the function and its derivatives. So for example the general linear second
order differential equation looks like,

d2y
at  2  bt   ct  y  f t 
dy
dt dt
Where a(t), b(t) , c(t) and f(t) are functions of t, the independent variable.

www.esp-scotland.ac.uk 5
The final piece of terminology introduced here is homogeneous and nonhomogeneous.

The ‘plane take off model’ given above is an example of a nonhomogeneous differential
equation as the right hand side of the differential equation, T-F is non zero.

Whereas a differential equation with f (t )  0 is homogeneous.

To summarise the plane take off model is a 2nd order nonlinear nonhomogeneous
differential equation.

www.esp-scotland.ac.uk 6
First Order D.E.s with constant coefficients

The simplest type of differential equations are 1st order homogeneous differential
equations with constant coefficients.

Generically they can be represented as

dy
b  cy  0
dt
where b and c are constants.

This equation is homogeneous since the right hand side is equal to zero.

Example

Newton’s 2nd law of motion (F=ma),


dv
F m
dt

The differential equation of how the voltage changes with time is,
dV V
C 
dt R

The method of solving the 1st Order Differential Equation depends on its form. The
methods covered here are direct integration, separation of variable, integration factor
method and substitution.

www.esp-scotland.ac.uk 7
Solving by Direct Integration

dy
Equations of the form  f (t ) can be integrated directly to obtain y (t ) .
dt
y (t )   f (t )dt  C
where C is the Constant of Integration.

A solution in this form is called the General Solution (GS).

This is the standard integration which you have done so far.

Example

dy
Obtain the solution of the differential equation  4 x  3 given that y = 4 when x = 1.
dx

Solution
y   ( 4 x  3 )dx  C

y  2 x 2  3x  C GS

Since y = 4 at x = 1
4  2( 1 )2  3( 1 )  C
C  1

and so y  2 x 2  3x  1

When there is sufficient information given to evaluate the constant of integration the
solution is called the Particular Solution (PS).

www.esp-scotland.ac.uk 8
Example

ds
16  2t  1  sint given that s = 4 at t = 0.
3
Obtain the solution of
dt

Solution
ds
16  2t  1  sint
3

dt
16  2t  1
4

s( t )   cost  C
4( 2 )

s( t )  2  2t  1  cost  C
4
GS

4  2 1  cos0  C
4
SInce s = 4 at t = 0

C 1

s( t )  2  2t  1  cost  1
4
So PS

www.esp-scotland.ac.uk 9
Separation of Variables

dy f ( x)
1st Order Differential Equations of the form 
dx g ( y )

where f (x) is a function of x and g ( y ) is a function of y . These can also be


constants.

To solve this type of equation rearrange the equation in the following way to get all the
x terms on one side with the dx and all the y terms on the other side with dy .

g ( y ) dy  f ( x)dx

Remember to move the denominator dx or equivalent, first to establish the sides for
the variables.

Now integrate both sides.


 g ( y) dy   f ( x)d x

Example

Solve the FODE


dy 4 x 3  1

dx 3  2 y
where f ( x)  4 x 3  1 and g ( y)  3  2 y

Solution

4x3  1
dy  dx
3 2y
3  2 y dy  4 x 3
 1 dx

www.esp-scotland.ac.uk 10
Now integrate both sides

 3  2 y d y   4 x  1 dx
3

3y  y 2  x4  x  C

This is the General Solution (GS). C cannot be calculated as there are no boundary
conditions given.

Example

Solve the FODE


dy
4 xy  y 2 1 given that y = 2 at x = 3
dx

Solution
4 xydy   y 2  1dx
4y 1
dy  dx
y 2 1  x
4y 1
 dy   dx
y 1 
2
x

Use the substitution u  y 2 1 to integrate the left hand side:

2 1
Thus  du   dx
u x
2 ln u  ln x  C
2 ln  y 2  1  ln x  C GS

www.esp-scotland.ac.uk 11
When y = 2 at x = 3 then

2 ln 2 2  1  ln 3  C
2 ln 3  ln 3  C
C  ln 3

Therefore 2 ln  y 2  1  ln x  ln 3

ln  y 2  1  ln 3x
2

y 2
 1  3x
2

y 2  1  3x

y 2  3x 1

y 3x 1 PS

Note, where reasonable rearrange the equation for y or the equivalent variable.

www.esp-scotland.ac.uk 12
Worksheet 1 Separation of Variables

Determine the general solution for each of the following separable differential equations.
Hence find the particular solution for the given initial conditions:

dy y0
1. yx 4 1
dx x 1

y  10
2. ydx  xdy  0
x5

dy y0
3. y 2 x3 2
dx x 1

1
dy y
4.  1  x  y 3 2
dx
x0

dy y0
5.  1  y x 3
dx x 1

dy sin x y0
6. 
dx cos y x  2

dy 4e 2 y y0
7. 
dx e 3 x x0

dy y0
8.  e 2 x y
dx x0

www.esp-scotland.ac.uk 13
dy x 5  x 4  x y0
9. 
dx y 4  y 2  y x0

dy y0
10.  exp(4 x  2 y  4)
dx x  1

11. Obtain the solution of the following initial value problems:

dx sin t
a)  2 x  0  0
dt x

dx 1
b) t2  x  2  0
dt x

12. Obtain the general solution of the following differential equations:

dx
a) t  x
dt

dx
b) x2  et
dt

 ax x  1
dx
c)
dt

dx
d) x  sin t
dt

www.esp-scotland.ac.uk 14
Solving Using Transformations

Some differential equations are not separable. Consider the differential equation,
dy
x2  y 2  xy
dx

As it stands it cannot be solved using separation of variables.

However if it can be organised into the form,

dy  y
 f 
dx x

using a transformation it can be converted into a separable differential equation.

Generally it is possible to transform an equation of the type

dy Q( x, y )
 ,
dx P( x, y )
where P and Q are both functions of x and y of the SAME DEGREE throughout.
i.e. total powers of x and y are the same in each of the terms in P and Q.

Procedure

(i) Consider the transformation y  vx

where v is some function of x .

Using the product rule then


dy d vx  dv
 vx
dx dx dx

www.esp-scotland.ac.uk 15
Q ( x, y ) Q
(ii) Substitute vx for y in so  f (v)
P ( x, y ) P
dy dv
and let v x
dx dx

Hence the 1st Order Differential Equation becomes

 f v 
dv
vx
dx

(iii) The transformed differential equation is now separable.


Rearrange the equation:

 f v   v
dv
x
dx

dv dx

f v   v x

(iv) Integrate both sides


dv dx
 
f v   v x
dv
  ln x  C
f v   v

y
(v) Substitute v  to return the equation to y in terms of x .
x

(vi) Calculate C if boundary conditions are given.

www.esp-scotland.ac.uk 16
Example

dy
Solve x  yx given y = 2 at x = 1
dx

Solution

First divide by x :

dy y  x P
 
dx x Q

Both of P and Q have degree 1 as the highest power of each term so use the
transformation
dy dv
y  vx and v x
dx dx
So
dy y  x

dx x
becomes
dv vx  x
vx 
dx x

dv
vx  v 1
dx
dv
x  1
dx

Now separate the variables:


1
 dv  dx
x
1
  dv   dx
x
 v   ln x  C

www.esp-scotland.ac.uk 17
y
Substitute v
x
y
   ln x  C
x
 y  x  C  ln x  GS

When y = 2 at x = 1  2  1 C  ln1

C 2 PS

Example
dy 2 2
Solve xy x  y given y=2 at x=1.
dx

Solution

First divide by xy :

dy x 2  y 2

dx xy

Both the numerator and denominator are of degree 2 so use the transformation

dy dv
y  vx and v x
dx dx

dy x 2  y 2
So 
dx xy

Becomes

dv x   vx 
2 2

vx 
dx x  vx 

www.esp-scotland.ac.uk 18
dv x 1  v 
2 2

vx 
dx x 2v
dv 1  v 2
vx 
dx v
dv 1
vx  v
dx v
dv 1
x 
dx v

Now separate the variables:


1
vdv  dx
x
1
 vdv   x dx
v2
 ln x  C
2

y
Substitute v
x

 x   ln x  C
2
y

2
y 2  2 x 2  ln x  C 

y   2 x 2 (ln x  C ) GS

When y  2 at x  1 and assuming positive square root

2  2  ln1  C 
C 2

 y  2 x 2  ln x  2 

www.esp-scotland.ac.uk 19
Example
dy x 2  4 xy  5 y 2
Obtain the general solution of  .
dx x 2  xy

Solution

Both the numerator and denominator are of degree 2 so use the transformation

dy dv
y  vx and v x
dx dx

dy x 2  4 xy  5 y 2
So 
dx x 2  xy

becomes

dv x  4 x  vx   5  vx 
2 2

vx 
dx x 2  x  vx 

dv x 1  4v  5v 
2 2

vx 
dx x 2 1  v 

dv 1  4v  5v 
2

vx 
dx 1  v 
dv 1  5v 1  v 
vx 
dx 1  v 
dv
vx 1  5v
dx
dv
x 1  4v
dx

www.esp-scotland.ac.uk 20
Now separate the variables:

1 1
dv  dx
1  4v x
1 1
 1  4v  x dx
dv 

1
ln 1  4v   ln x  C
4
ln 1  4v   4ln x  C Note that 4C is still a constant C

ln 1  4v   ln x 4  ln C Note that lnC is still a constant C

ln 1  4v   ln Cx 4

1  4v  Cx 4

v   Cx 4  1
1
4

y
Substitute v
x

  Cx 4  1
y 1
x 4

y
x
4
 Cx 4  1 GS

www.esp-scotland.ac.uk 21
Worksheet 2 Solve by using Transformations

Obtain the general solution and particular solution (if appropriate) for each of the

following:
dy
1. x  x  6y
dx

dy x 1
2. 2x  x  3y
dx y0

dy x 2  y 2
3. 
dx xy

dy x  y y  1
4. 
dx x x 1

dy
5. x  x  3y
dx

dy x 2  y 2
6. xy 
dx 2

dy
7.  x  y y
dx

2y
dy
8. x  y  3xe x
dx

www.esp-scotland.ac.uk 22
dy
9. xy  y2  x2
dx

dy y 2  xy
10. x 
dx x

dy x 3  y 3
11. y 2

dx x

www.esp-scotland.ac.uk 23
Other Transformations

Use of transformations is a common approach to solving differential equations. Take


a differential equation that seemingly cannot be solved and apply a transformation that
converts the differential equation into one that can be solved.

Here is another example:

Consider a differential equation of the form

 f ax  by  c 
dy
dx

Let v  ax  by  c

Then differentiating both sides with respect to x,

dv dy
 ab
dx dx

Rearranging this then,

dy 1  dv 
   a
dx b  dx 

and the differential equation

 f ax  by  c 
dy
dx
transforms to,
1  dv 
  a   f v 
b  dx 
which is separable.

 b f v   a
dv
dx

www.esp-scotland.ac.uk 24
dv
 bf v   a   dx

dv
 bf v   a  x  C

Example

Solve the differential equation,


dy x  y  2

dx x  y  3

Solution

Use the transformation:


v  x y3

Then
dv dy
1
dx dx

So
dy dv
1
dx dx

The transformed differential equation reads,

dv v  1
1 
dx v

www.esp-scotland.ac.uk 25
dv v 1
 1
dx v
dv v  v  1

dx v
dv 1

dx v

Now separate the variable


vdv  dx

 v dv   dx

v2
 x C
2

At this point we could substitute,


v  x y3

but the work involved in obtaining a solution with y being the subject of the equation is
long and boring.

Better to make v the subject of the equation by taking the square root of both sides …and
then substituting for v.

v2  2x  C

v   2x  C

Now substitute for v:

x  y  3   2x  C
y  x  3  2x  C

www.esp-scotland.ac.uk 26
Worksheet 3 More Transformation

Solve the following using an appropriate transformation:

dy x  2y
1. 2 
dx x  2y 1

dy 1  2 y  x
2. 
dx 4 y  2x

dy y  x  2
3. 
dx y  x  1

dy
4.  2x  y  2
dx

dy
5. 2  2y  x  5
dx

 2 x  y   2
dy 2
6.
dx

www.esp-scotland.ac.uk 27
Integrating Factor Method

In this section consider the solution of differential equations of the form,

 pt  y  qt 
dy
dt

The solution strategy hinges on the fact that if the LHS can be represented as the
derivative of a product
d
r t  y 
dt
then

 dt r t y dt  r t y
d

To obtain r(t):

 pt  y  qt 
dy
Firstly multiply by r(t).
dt
giving

r t   r t  pt  y  r t  qt 
dy
dt

This will lend itself to the solution of the original differential equation if r(t) is chosen such
that,

r t   r t  pt  y  r t  y 
dy d
dt dt

Differentiating the RHS using the product rule,

d
r t  y   r t  dy  dr y
dt dt dt

www.esp-scotland.ac.uk 28
r t   r t  pt  y  r (t ) 
dy dy dr
Hence y
dt dt dt

More specifically

 r t  pt 
dr
dt

This is a separable differential equation.

 pt dt
dr
 r 

ln r   pt dt

Note we have not included the constant of integration as any function r is acceptable.
Apply the exponential function to both sides to make r the subject of the equation,

e ln r  e  p t dt
r  e  p t dt

r(t) is called an integrating factor.

Now returning to the original equation:

r t   r t  pt  y  r t  qt 
dy
dt
then
d
r t  y   r t  qt 
dr

www.esp-scotland.ac.uk 29
Now integrate both sides with respect to t.

So the general solution is

r t  y   r t  qt   C

r t  qt   C
1
r t  
y 

where r  e  p t dt

So

 p t dt   p t dt qt   C 


y t   e   e 
 

The important point to understand the process and remember the integration factor:

r  e  p t dt

and this makes it possible to represent the differential equation as


d
 r t  y   r t  qt 
dt

Example

Use the integration factor method to obtain the solution of the initial value problem,

dy
 4ty  0 y 0  1
dt

Solution

The differential equation is in the correct form so:

p (t )  4t and qt   0

www.esp-scotland.ac.uk 30
Hence the integration factor is,

r t   e 
4t dt

Now

 p(t )dt   4tdt


4t 2
 p(t )dt   2  2t
2

So the integration factor is,

r t   e 2t
2

Multiplying through the differential equation by the integration factor gives,


dy
 4te 2t y  0
2 2
e 2t
dt

By construction the integration factor has the property that,

e 2t
2 dy
dt
 4te 2t y 
2

dt
e y
d 2t 2

so the differential equation has the form,
d 2t 2
dt
 
e y 0

Integrating both sides with respect to t,

e 2t y  C
2

The integration constant can be found by substituting the initial values into the general
solution,

e 01  C  C  1

The solution is then,

y  e 2t
2

www.esp-scotland.ac.uk 31
Example
dy
Solve for y,  5y  3
dx

Solution

The equation is in the correct form so P=5 and the Integrating Factor (IF):

IF  e  5 dx  e 5 x

Multiply throughout the equation by e5 x


dy 5 x
e5x  e 5 y  3e 5 x
dx

Integrate both sides


 5 x dy 
e  e 5 x 5 y dx   3e 5 x dx
 dx 
3
e5x y  e5x  C
5
3
y   Ce 5 x GS
5

www.esp-scotland.ac.uk 32
Example
dy y
Solve ,   x3
dx x

Solution

1
The equation is in the correct form so P and the Integrating Factor (IF):
x
1
 dx
IF  e x
x

Multiply throughout the equation by x


dy y
x  x  xx 3
dx x
dy
x  y  x4
dx

Integrate both sides

 dy 
x  y dx   x 4 dx
 dx 
x5
xy   C
5
x4 C
y  GS
5 x

www.esp-scotland.ac.uk 33
Example
dy 3 y
Obtain the particular solution for this linear differential equation,  4
dx x
when x2 and y  1.

Solution

From the equation, which is in the correct format,

3
 IF  e  x  e3ln x
3 dx
P
x

Remembering the laws of logs means

IF  e3ln x  eln x  x3
3

Multiply throughout the equation by x3


dy 3y
x3  x3  4 x3
dx x

Integrate both sides

 3 dy 3 3y 
  dx    dx
3
 x x dx 4 x
x 
x3 y  x 4  C
x4  C
y
x3

Now substitute x2 and y  1.

 2 C
4

1
23
C  8

x4  8
y 3
x PS

www.esp-scotland.ac.uk 34
Worksheet 4 Integration Factor Method

Obtain the General Solutions for the following.


dy
1.  6y  7
dx

dy
2. x  y  x6
dx

dy 2 y
3.   3x 7
dx x

dy
4.  yt
dt

dy
5.  4ty  t
dt

dy y
6.   cos t
dt t

dy 1
7. t  4y  2
dt t

Obtain the Particular Solutions of the following initial value problems.

𝑑𝑦 2𝑦
8. + = 6𝑥 2 , when x  1 and y  0.
𝑑𝑥 𝑥

dy
9. x  y  x4 , when x4 and y  0.
dx

www.esp-scotland.ac.uk 35
dy
10.  2t  2 y  1  0, y (0)  0
dt

dy
11.  5 y  t  e2t , y (0)  1
dt

dy
12. t2  1  y  0, y (2)  2
dt

www.esp-scotland.ac.uk 36
Answers
Worksheet 1

1 1 
1. y   2  3 
 3 3x 

1
2. ln x  ln y  ln
2
 y  2x

 1
3. y  3 31  2 
 x 

1
4. y
 x2 

2 x   2 
 2 

1
Simplifies to y
2x  x 2  4

x4 1
5. ln(1  y ) 
4
x 4 1

ye 4
1

6. sin y  1  cos x

8 5
7. e  2 y  e 3 x 
3 3

1 1
8. e y  e2x 
2 2

www.esp-scotland.ac.uk 37
y5 y3 y 2 x6 x5 x2
9.     
5 3 2 6 5 2

1 4 x4 1
10. e2y  e 
2 23

xt   3  3 cos t 
1 3
11. a)

xt    1 
2
b)
t

12. a) 
xt   t 1 2  C  2

b) 
xt   3e t  C  1
3

c) 
xt   1  Ce at 
1

xt   C  2 cos t 
1 2
d)

Worksheet 2

x C
1 y ( x)  1  7 
7 x 

2. 
y ( x)  x  x  1 

3. y ( x)   x 2ln Cx 

www.esp-scotland.ac.uk 38
4. y ( x)  x  ln x  1

x 1 
5. y ( x)  1  4 
4  Cx 

6. x 3  3 xy 2  C

x
7. y ( x) 
ln y  C

2 y
C
8. e x
 ln 6 
x 

9. y  x    x 2ln  Cx 

yx   
x
ln Cx 
10.

11.   
y x   x ln Cx 3
1 3

www.esp-scotland.ac.uk 39
Worksheet 3

yx    x  1  x  C 
1 1
1.
2 2

yx    x 
1 1
2. xC
2 2

3. y x   x  1  2 x  C

4. y x   Ce x  2 x  4

yx  
1
5. x  2  Ce x
2

y  x   2 x 
1
6.
xC

Worksheet 4

7 C
1. y  
6 e6 x

x6 C
2. y 
7 x

3 8 C
3. y  x  2
10 x

4. y  t   Cet  t  1

www.esp-scotland.ac.uk 40
1
y  t   Ce 2t 
2

5.
4

1 C
6. y  t   sin t  cos t 
t t

1 C
7. y t   2
 4
2t t

6 3 C
8. y x  2
5 x
6 x3 6
` y  2
5 5x

x4
9. y  Cx
3
x 4 64 x
y 
3 3

1 2 1
10. 𝑦(𝑡) = − 𝑒 2𝑡 +
2 2

1 1 1 53 −5𝑡
11. 𝑦(𝑡) = 𝑒 −2𝑡 + 𝑡 − + 𝑒
3 5 25 75

y t   1  e
1 1
t 2
12.

www.esp-scotland.ac.uk 41

You might also like