You are on page 1of 11

Study Advice Service

Mathematics
Worksheet

Differential
Equations 1

This is one of a series of worksheets designed to help you increase your confidence
in handling Mathematics. This worksheet contains both theory and exercises which
cover 1st Order Differential Equations. It deals with 4 types:1. Exact
2. Variables Separable

3. Homogeneous
4. Linear

There are often different ways of doing things in Mathematics and the methods
suggested in the worksheets may not be the ones you were taught. If you are
successful and happy with the methods you use it may not be necessary for you to
change them. If you have problems or need help in any part of the work then there
are a number of ways you can get help.
For students at the University of Hull
Ask your lecturers
Contact the Study Advice Service in the Brynmor Jones Library where you can
access the Mathematics Tutor, or contact us by email.
Come to a Drop-In session organised for your department

Look at one of the many textbooks in the library.

For others
Ask your lecturers

Access your Study Advice or Maths Help Service

Use any other facilities that may be available.

If you do find anything you may think is incorrect (in the text or answers) or want
further help please contact us by email.

Web: www.hull.ac.uk/studyadvice
Email: studyadvice@hull.ac.uk
Tel: 01482 466199
page 0

What Are Differential Equations?


Any equation containing terms of the form

dny
dx n

is a differential equation.

The following are all differential equations of varying order and degree
x

dy
y 2 0,
dx

Sometimes

dy
,
dx

d2y
dx 2

xy

d2y

y 2 sin x 0,

dx 2

d3y

d2y
dx 2

are written as y ' ,

dx3

Order: If the highest derivative appearing is


If the highest is

dy

dx

y'',

d3y
dx 3

y'''

to save space!

dy
then the equation is of order 1.
dx

then it is of order 2 etc. Not all such equations can be solved in

terms of the unknown, some have to be solved by numerical methods giving


approximate results.
Type 1 Exact
If you are asked to solve the Differential Equation

dy
cos x 3x 2 you can integrate
dx

immediately giving y sin x x 3 A . In the same way the following second order
Differential Equation can be solved directly by integration:
d2y
2

integrating

3e 3 x 4 x sin x

dx
dy
e 3 x 2 x 2 cos x A
dx

integrate again

e 3x 2 x 3

sin x Ax B
3
3

Note that integrating twice has introduced the 2 arbitrary constants A and B.
If you have a DE of the form

dny
dx n

f x then you can, in theory, integrate n times to

find the solution. This assumes that you can integrate at each step (remember
that you cannot integrate every function algebraically). Your solution will contain
n arbitrary constants.

Type 2 Variables Separable


Equations of the form f x

dy
g y 0 can be solved by separating the variables
dx

which means all the x -terms along with dx can be put on one side of the equation
and all the y -terms along with dy can be put on the other side.
Examples

dydx xy 0

2
1 : Find the general solution of the equation x 1

page 1

dy

xy

This gives dx 2
x 1

dy
x

dx
2
y
x 1
dy
x

dx
2
y
x 1

Integrating

ln y 1
ln x 2 1 A
2
ln y ln

and simplify, putting ln B A

y B

hence
2 : Solve the equation

4 x2 1
dy
xy
y 1
dx

2 x 2 ln x

When x 1 , y 0

dy
x2 x
4.

dx
y2 y

is the general solution

y3
y2

A
3
2

2 ln1 0 0 A A 2
2 x 2 ln x

Solution

dy
dx

given y(1) 0 (ie y 0 when x 1 )

Simplify and Integrate

1. x y 2

x2 1

x 2 1

4x2 1
dx y y 1 dy
x
1

2
4 x x dx y y dy

This can be written as

Exercise 1
Solve the following

x 2 1 ln B ln B

dy
2. x x 2 1
dx
5. cos 2 x

dy
y 1

y
dx
y 1

dy
cos 2 y
dx

y3 y 2

2
3
2

3.

2 xy
2

dy
dx

x 1
dy
6. e x y
1
dx

dy
, where y(1) 1
dx
dy
dy

9. tan x
cot y where y(0)
10. sin x cos x
cos x sin x
dx
dx
2
dy
y

11. Find the equation of the curve which has gradient function
2
dx x 1
7. x

8. ( x 1) y x

and passes through the point (2, -1).

Type 3 Homogeneous Equations


A homogeneous equation of the first order is one that can be written in the form
dy
y
f . To test whether a function can be written in that form substitute y vx
dx
x

and the function should reduce to one containing only v .


For instance

dy
x3 y x 2 y 2

dx
4 xy 3 x3 y

page 2

becomes

dy
vx 4 v 2 x 4
v v2 x4
v v2

.
dx
4v3 x 4 vx 4
4v 3 v x 4 4v 3 v

The substitution y vx simplifies the function from two variables to one so it seems
logical to try the same substitution for

dy
. This is another technique which may
dx

have come about by trial and error, but helps us in this case, to solve equations.
Differentiating y vx (using product rule) gives
dy d vx dv
dx
dv

xv
x v.
dx
dx
dx
dx
dx
So by substituting y vx the differential equation
dy
dv
y
f becomes x
v f v
dx
x
dx

which can be solved by separating the variables.

dy
4y

dx
x
dv
4vx
dv
x
v
4v x
3v
dx
x
dx
dv 3dx

v
x

Example 1 Solve the differential equation


Putting y = vx this becomes
Separating the variables gives

3
Integrate ln v 3ln x c ln Ax where c ln A
3
giving v Ax

Check y Ax 4

y
Ax3 y Ax 4
x

dy
4 Ax 4 4 y
which is where we started!
4 Ax3

dx
x
x

Example 2 : Solve the equation

dy
y x y

given y(1) 1 (ie y 1 when x 1 ).


dx
x y x

page 3

Substitute y vx

dv
vx x vx
v 1 v x 2
v

dx
x vx x
v 1 x 2

dv
v 1 v

v
dx
v 1
dv
v 1 v v v 1
2v
x

dx
v 1
v 1

v 1

separate variables

integrate

dv

2 dx
x

dv

v ln v

2 ln x c

2 ln x ln v ln A ln Ax 2 v

y
x

put c ln A

2 dx
x

dx
x

ln Ax 2

ln Axy
x ln Axy

But y vx , hence

or
But y(1) 1; substituting in gives 1 ln A A e
The solution can be written as y x ln exy or y x ln exy x ln e ln xy x(1 ln xy )
It is important to realise that there are often many different ways of writing the final
solution. It depends on how it is to be used as to which is the most useful form.

page 4

Example 3 : Solve the equation x

dy
y
dx

x2 y 2

substitute y vx

simplify
separate the variables

Example 4: Solve the equation x

separate the variables


integrate
& put A ln B
put v

y
x

dv
v 1 v2 v
dx
dv
x
1 v2
dx
dv
dx

2
x
1 v
dv
1 v

sin 1

y
put v and c ln A
x

simplify

x 1 v 2 vx
x

dx

sin 1 v ln x c

integrate

putting y vx gives

x 2 v 2 x 2 vx
x

dv
v
dx

Rearrange equation

x2 y 2 y
x

dy

dx

this can be written as

y
ln x c ln Ax
x
y x sin ln Ax

dy
x y
dx

dy x y

dx
x
dv
x vx
x v
1 v
dx
x
dv
x 1
dx
dx
dv
x
1
v dx ln x A
x
v ln x ln B ln Bx
y
ln Bx
x
y x ln Bx

giving answer

Exercise 2
Solve the following

page 5

dy x 2 y

dx
x

1.

4. xy 2

dy
x3 y 3
dx

7. x x 2 y 2

2.

dy x 2 y 2

dx
xy

5. x

dydx y y2 x2

dy
x2 y 2
dx

3. 2 x 2

dy
y x2 y 2
dx

8. x 3 xy 2

6. y

dy
x 2 y
dx

dydx x 2 y y 3

Type 4 - Linear Equations


A linear equation is one of the form

dy
P x y Q x . The method used to solve
dx

such equations depends, again, on noticing a particular pattern.


If

z ye f x

then differentiating (using the product rule and the chain rule
dz dy f x
dy

e
yf ' x e f x e f x
f ' x y

dx

dx

dx

When compared to the linear equation above, this suggests that if we can find an
e f x to multiply both sides of the linear equation by then well be able to integrate
the left hand side immediately.
Multiplying the linear equation

dy
P x y Q x by e f x gives
dx

dy

P x y e f x Q x
dx

e f x

dy

f ' x y (which can be integrated


dx

f x

comparing left hand side with e

immediately) shows that we want to find f ( x ) where


f ' x P x f x

P x dx

i.e. multiply the equation by e f x e P x dx which is called the Integrating Factor.


dy
3 y e2 x
dx
From above the Integrating Factor is e 3dx e 3 x

Example 1 Solve the equation

Multiplying through gives

e 3 x

The left hand side is the differential of


Check, using product rule,

dy
3e 3 x y e 3 x e 2 x
dx
ye 3 x

d ye 3 x
dy 3 x

e
y 3e 3 x
dx
dx
dy
e 3 x
3e 3 x y
dx

page 6

From the original equation

dy
3 y e2 x
dx
e3 x

multiply through by e 3x

dy
3e 3 x y e 3 x e 2 x
dx

d ye 3 x
e x
dx

this can be written as

ye 3 x

integrating

dx

e x A
y e 2 x Ae3 x

or, multiplying through by e3x


dy
4 y sin x sin 2 x find y( x )
dx
y 0
x

Example 2 Given 2 cos x

given that y(0) 3

(ie

when

(ie y as a function of x ),

).

Divide through by 2cos x to write it in the form

dy
P x y Q x
dx

dy 2 sin x
sin 2 x 2 sin x cos x

dx cos x
2 cos x
2 cos x
dy
2 tan x y sin x
dx
The equation is linear, integrating factor e 2 tan x dx
2

2 tan x dx 2 ln sec x ln sec x

hence integrating factor is e 2 tan x dx e ln sec x sec


2

dy

2
2
2
multiply by I. F. sec x dx 2 sec x tan x y sec x sin x

d y sec 2 x
sin x
sec 2 x sin x
dx
cos2 x
y sec 2 x

Integrate

sin x
2

cos x

dx

1
A
cos x

y cos x A cos 2 x

Multiply by cos2 x

2
But y 0 when x 3 hence 0 cos 3 A cos 3

0 1 1 A A 2
2

Solution

y( x ) cos x 2 cos

Example 3
Solve the equation

dy
yx
dx
page 7

The I. F. is e 1dx e x giving

dy
ye x xe x
dx
d ye x
xe x
hence
dx
e x

giving

ye x

xe

xe

Integrating the right side by parts

dx

dx

xe x e x A
y Ae x x 1

giving
Exercise 3
Solve the following
dy
y e x
dx
dy
4. x
y x2
dx
dy
7.
y cot x cos x
dx

1.

dy
xy 0
dx
dy
5.
y x
dx
dy
8. x
2y
dx
2.

dy
y tan x cos 2 x
dx
dy
11. 1 x 2
xy 1
dx
9.

dy y 1

dx x x
dy
6.
2y x
dx

3.

x3

10.

x2 1 dy
2 xy x
dx

12.

dy
3 y e2 x
dx

Exercise 4
Miscellaneous Differential Equations
Solve the following
dx
x
dt
dy
4. 3 x
x2 2
dx

1. tan t

dy
y x 2 ln x
dx
dy
4
5. 2 x
8y
dx
x2
2. x

3. cos sin

d
dr

d2y

12 x 2 2 sin x
dx 2
dy
xy ln x which satisfies
7. Find the solution of the differential equation
dx
6. 3

the conditions x 1 , y 1. Give ln y in terms of x .


dy
x
8. Solve the differential equation x 2 y e x 0 given that
dx
y 1 when x 1 .
9. Find the solution of the differential equation
for which y 1 when x .

dy
y cot x sin x
dx

2x
10. Find the solution of the differential equation ye

dy
x which satisfies the
dx

boundary condition y 2 when x 0 . Give y in terms of x .

page 8

ANSWERS
(note many of the answers can be put in slightly different forms, depending whether
the constant is put as A or ln B or ln C etc.)
Exercise 1
1. 3 x 2 2 y 2 A

2.

4. 2 y 3 3 y 2 2 x 3 3 x 2 A

5. tan y tan x A

6. e y e x A

7. ln x y 2 1 tan 1 y A

10. y ln sin x cos x A

9. sin x cos y 1

Exercise 2
1. x 3 3 x 2 y A
3

1
6

4. ln x ln
5. sin 1
6. ln

x 4 2x 2 4 y A

x 2y
x3

y A x2 1
8.
11.

x ln x 1 ln y
y 2 x 1 3 x 1

3. 2 x y x ln Ax

2. y 2 2 x 2 ln Ax
3

3. ln x 2 1 ln y A or

A or Bx 3 x 3 2 y 3 1

y
y
ln x A or sin 1 ln Ax
x
x

yx
x

ln Ax
x
yx

7. 2 x 2 ln Axy y 2 0

or

ln y x

x
A
yx

8. 2 y 2 ln xy x 2 Cy 2

Exercise 3
1

1. ye x x A or y x A e x

2. y Ae 2

x2

3. xy x A or y 1 Ax 1

4. y x 2 Ax

6. 4 y 2 x 1 Ae 2 x

7. y 1 sin x

8. y x 3 Ax 2

9. 3 y cos x 3 sin x sin3 x A

10. 2 y x 2 1 x 2 A

11.

y 1 x 2 sin 1 x A

5. y x 1 Ae x
A or 4 y sin x cos 2 x A
sin x

12. 5 ye 3 x e 5 x A

Exercise 4
1. x B sin t

2.

4. y 1 x 2 2 ln Ax
6

y x 2 ln x x 2 Ax

5. y

x A
x4

3. r ln sec c

6. y

x 4 2 sin x
Ax B
3

page 9

7. ln y 1 x 2 ln x 1 1 x 2
9. y sin x 1 x 1 sin 2 x
2

8. y

xe x e x 1

x2

10. y 2 1 9 e 2 x 2 xe 2 x
2

We would appreciate your comments on this worksheet, especially if


youve found any errors, so that we can improve it for future use.
Please contact the Maths tutor by email at studyadvice@hull.ac.uk
updated 29th November 2004

The information in this leaflet can be made available in an


alternative format on request. Telephone 01482 466199
2009

page 10

You might also like