You are on page 1of 34

Differential Equations

EXACT EQUATIONS

Graham S McDonald

A Tutorial Module for learning the technique


of solving exact differential equations

● Table of contents
● Begin Tutorial


c 2004 g.s.mcdonald@salford.ac.uk
Table of contents
1. Theory
2. Exercises
3. Answers
4. Standard integrals
5. Tips on using solutions
Full worked solutions
Section 1: Theory 3

1. Theory
We consider here the following standard form of ordinary differential
equation (o.d.e.):

P (x, y)dx + Q(x, y)dy = 0


∂P ∂Q
If ∂y = ∂x then the o.de. is said to be exact.

This means that a function u(x, y) exists such that:

∂u ∂u
du = dx + dy
∂x ∂y
= P dx + Q dy = 0 .
∂u ∂u
One solves ∂x = P and ∂y = Q to find u(x, y).

Then du = 0 gives u(x, y) = C, where C is a constant.


This last equation gives the general solution of P dx + Q dy = 0.

Toc JJ II J I Back
Section 2: Exercises 4

2. Exercises
Click on Exercise links for full worked solutions (there are 11
exercises in total)
Show that each of the following differential equations is exact and
use that property to find the general solution:

Exercise 1.
1 y
dy − 2 dx = 0
x x

Exercise 2.
dy
2xy + y 2 − 2x = 0
dx

Exercise 3.
2(y + 1)ex dx + 2(ex − 2y)dy = 0

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 2: Exercises 5

Exercise 4.
(2xy + 6x)dx + (x2 + 4y 3 )dy = 0

Exercise 5.
dy
(8y − x2 y) + x − xy 2 = 0
dx

Exercise 6.
(e4x + 2xy 2 )dx + (cos y + 2x2 y)dy = 0

Exercise 7.
(3x2 + y cos x)dx + (sin x − 4y 3 )dy = 0

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 2: Exercises 6

Exercise 8.
x2
x tan−1 y · dx + · dy = 0
2(1 + y 2 )

Exercise 9.
(2x + x2 y 3 )dx + (x3 y 2 + 4y 3 )dy = 0

Exercise 10.
dy
(2x3 − 3x2 y + y 3 ) = 2x3 − 6x2 y + 3xy 2
dx

Exercise 11.
(y 2 cos x − sin x)dx + (2y sin x + 2)dy = 0

● Theory ● Answers ● Integrals ● Tips


Toc JJ II J I Back
Section 3: Answers 7

3. Answers

1. y = Ax ,

2. y 2 x − x2 = A ,

3. (y + 1)ex − y 2 = A ,

4. x2 y + 3x2 + y 4 = A ,
1 2
5. 2 x (1 − y 2 ) + 4y 2 = A ,
1 4x
6. 4e + x2 y 2 + sin y = A ,

7. x3 + y sin x − y 4 = A ,
x2
8. 2 tan−1 y = A ,
x3 y 3
9. x2 + 3 + y4 = A ,

Toc JJ II J I Back
Section 3: Answers 8
4 4
x 3 y
10. 2 − 2x3 y + 2 x2 y 2 − 4 =A,

11. y 2 sin x + cos x + 2y = A.

Toc JJ II J I Back
Section 4: Standard integrals 9

4. Standard integrals
R R
f (x) f (x)dx f (x) f (x)dx
n xn+1 n 0 [g(x)]n+1
x n+1 (n 6= −1) [g (x)] g (x) n+1 (n 6= −1)
1 g 0 (x)
x ln |x| g(x) ln |g (x)|
x ax
e ex a x
ln a (a > 0)
sin x − cos x sinh x cosh x
cos x sin x cosh x sinh x
tan x − ln
|cos x| tanh x ln cosh x
cosec x ln tan x2 cosech x ln tanh x2
sec x ln |sec x + tan x| sech x 2 tan−1 ex
sec2 x tan x sech2 x tanh x
cot x ln |sin x| coth x ln |sinh x|
sin2 x x
2 −
sin 2x
4 sinh2 x sinh 2x
4 − x2
cos2 x x
2 +
sin 2x
4 cosh2 x sinh 2x
4 + x2

Toc JJ II J I Back
Section 4: Standard integrals 10

R R
f (x) f (x) dx f (x) f (x) dx

1 1
tan−1 x 1 1 a+x
a2 +x2 a a a2 −x2 2a ln a−x (0 < |x| < a)

1 1 x−a
(a > 0) x2 −a2 2a ln x+a (|x| > a > 0)


2 2
√ 1 sin−1 x √ 1 ln x+ aa +x (a > 0)

a2 −x2 a a2 +x2

2 2
(−a < x < a) √ 1 ln x+ xa −a (x > a > 0)

x2 −a2

√ a2
√ a2
h √ i
sinh−1 x a2 +x2
 −1 x
 x

a2 − x2 2 sin a a2 +x2 2 a + a2

√ i √ h √ i
a2
a2 −x2
− cosh−1
2 2
+x x
+ x xa2−a

a2 x2 −a2 2 a

Toc JJ II J I Back
Section 5: Tips on using solutions 11

5. Tips on using solutions

● When looking at the THEORY, ANSWERS, INTEGRALS or


TIPS pages, use the Back button (at the bottom of the page) to
return to the exercises.

● Use the solutions intelligently. For example, they can help you get
started on an exercise, or they can allow you to check whether your
intermediate results are correct.

● Try to make less use of the full solutions as you work your way
through the Tutorial.

Toc JJ II J I Back
Solutions to exercises 12

Full worked solutions


Exercise 1.
Standard form: P (x, y)dx + Q(x, y)dy = 0

i.e. P (x, y) = − xy2 and Q(x, y) = 1


x

∂P ∂Q
Equation is exact if ∂y = ∂x

∂P ∂Q
Check: ∂y = − x12 = ∂x ∴ o.d.e. is exact.

Since equation exact, u(x, y) exists such that

∂u ∂u
du = dx + dy
∂x ∂y

= P dx + Q dy = 0
and equation has solution u = C, C = constant.
Toc JJ II J I Back
Solutions to exercises 13
∂u
∂x =P gives i) ∂u
∂x = − xy2
∂u ∂u 1
∂y =Q gives ii) ∂y = x

Integrate i) partially with respect to x,

y
u= + φ(y),
x

where φ(y) is an arbitrary function of y.

Differentiate with respect to y,


∂u 1 ∂φ 1 dφ
= + = +
∂y x ∂y x dy
(since φ = φ(y) only)

Toc JJ II J I Back
Solutions to exercises 14

Compare with equation ii)


1 dφ 1
+ =
x dy x

i.e. = 0
dy
i.e. φ = C 0 , C 0 = constant
y
and u = + C 0.
x

du = 0 implies u = C, C = constant
y
∴ x =A , A = C − C0

= constant.
Return to Exercise 1

Toc JJ II J I Back
Solutions to exercises 15

Exercise 2.

Standard form: (y 2 − 2x)dx + 2xy dy = 0

∂P ∂Q
Exact if ∂y = ∂x , where P (x, y) = y 2 − 2x
Q(x, y) = 2xy

∂P ∂Q
∂y = 2y = ∂x i.e. o.d.e. is exact.
∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy

= P dx + Q dy = 0,
∂u ∂u
giving i) ∂x = y 2 − 2x , ii) ∂y = 2xy.

Integrate i): u = xy 2 − x2 + φ(y) , φ is arbitrary function.

Differentiate and compare with ii):


∂u dφ
∂y = 2xy + dy = 2xy
Toc JJ II J I Back
Solutions to exercises 16

∴ dy =0 and φ = C0 (constant)
∴ u = xy 2 − x2 + C 0
du = 0 implies u = C, ∴ xy 2 − x2 = A , where A = C − C 0 .

Return to Exercise 2

Toc JJ II J I Back
Solutions to exercises 17

Exercise 3.

P (x, y) dx + Q(x, y) dy = 0 where P (x, y) = 2(y + 1)ex


Q(x, y) = 2(ex − 2y)

∂P ∂Q
∂y = 2ex = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy
= P dx + Q dy = 0,
∂u ∂u
Giving i) ∂x = 2(y + 1)ex , ii) ∂y = 2(ex − 2y) .

Integrate i): u = 2(y + 1)ex + φ(y)

∂u dφ
Differentiate: ∂y = 2ex + dy = 2(ex − 2y) , using ii)

Toc JJ II J I Back
Solutions to exercises 18

i.e. φ = −2y 2 + C 0
R R
i.e. dy = −4y i.e. dφ = −4 y dy

∴ u = 2(y + 1)ex − 2y 2 + C 0

du = 0 gives u = C,
∴ (y + 1)ex − y 2 = A , where A = (C − C 0 )/2 .

Return to Exercise 3

Toc JJ II J I Back
Solutions to exercises 19

Exercise 4.

P (x, y)dx + Q(x, y)dy = 0 where P (x, y) = 2xy + 6x ,


Q(x, y) = x2 + 4y 3

∂P ∂Q
∂y = 2x = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy
= P dx + Q dy = 0,
∂u ∂u
Giving i) ∂x = 2xy + 6x , ii) ∂y = x2 + 4y 3 .

Integrate i): u = x2 y + 3x2 + φ(y)

∂u dφ
Differentiate: ∂y = x2 + dy = x2 + 4y 3 , using ii)


= 4y 3 y 3 dy i.e. φ = y 4 + C 0
R R
i.e. dy i.e. dφ = 4

Toc JJ II J I Back
Solutions to exercises 20

∴ u = x2 y + 3x2 + y 4 + C 0

du = 0 gives u = C,
∴ x2 y + 3x2 + y 4 = A , where A = C − C 0 .

Return to Exercise 4

Toc JJ II J I Back
Solutions to exercises 21

Exercise 5.
(x − xy 2 )dx + (8y − x2 y)dy = 0

P (x, y) = x − xy 2
∂P ∂Q
Q(x, y) = 8y − x2 y . ∂y = −2xy = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists where du = ∂x dx + ∂y dy

= P dx + Q dy = 0
∂u ∂u
Giving i) ∂x = x − xy 2 ; ii) ∂y = 8y − x2 y.

Integrate i): u = 12 x2 (1 − y 2 ) + φ(y)

∂u dφ
Differentiate: ∂y = − 12 x2 · 2y + dy = 8y − x2 y , using ii)

Toc JJ II J I Back
Solutions to exercises 22

R R
∴ dy = 8y i.e. dφ = 8 ydy

i.e. φ(y) = 4y 2 + C 0 and u = 12 x2 (1 − y 2 ) + 4y 2 + C 0

du = 0 gives u = C, ∴ 1 2
2 x (1 − y 2 ) + 4y 2 = A , A = C − C 0 .

Return to Exercise 5

Toc JJ II J I Back
Solutions to exercises 23

Exercise 6.

P (x, y)dx + Q(x, y)dy = 0 where P (x, y) = e4x + 2xy 2 ,


Q(x, y) = cos y + 2x2 y

∂P ∂Q
∂y = 4xy = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy
= P dx + Q dy = 0,
∂u ∂u
Giving i) ∂x = e4x + 2xy 2 , ii) ∂y = cos y + 2x2 y .

Integrate i): u = 14 e4x + x2 y 2 + φ(y)

∂u dφ
Differentiate: ∂y = 2x2 y + dy = cos y + 2x2 y , using ii)


i.e. φ = sin y + C 0
R R
i.e. dy = cos y i.e. dφ = cos y dy

Toc JJ II J I Back
Solutions to exercises 24

∴ u = 14 e4x + x2 y 2 + sin y + C 0

du = 0 gives u = C,
∴ 1 4x
4e + x2 y 2 + sin y = A , where A = C − C 0 .

Return to Exercise 6

Toc JJ II J I Back
Solutions to exercises 25

Exercise 7.

P (x, y) dx + Q(x, y) dy = 0 where P (x, y) = 3x2 + y cos x


Q(x, y) = sin x − 4y 3

∂P ∂Q
∂y = cos x = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy

= P dx + Q dy = 0
∂u ∂u
Giving i) ∂x = 3x2 + y cos x, ii) ∂y = sin x − 4y 3 .

Integrate i): u = x3 + y sin x + φ(y)

∂u dφ
Differentiate: ∂y = sin x + dy = sin x − 4y 3 , using ii)

Toc JJ II J I Back
Solutions to exercises 26

= −4y 3 dφ = −4 y 3 dy
R R
∴ dy i.e.

i.e. φ = −y 4 + C 0 and u = x3 + y sin x − y 4 + C 0

du = 0 gives u = C, ∴ x3 + y sin x − y 4 = A , A = C − C 0 .

Return to Exercise 7

Toc JJ II J I Back
Solutions to exercises 27

Exercise 8.

P (x, y) dx + Q(x, y) dy = 0 where P (x, y) = x tan−1 y


x2
Q(x, y) = 2(1+y 2)

∂P x ∂Q
∂y = 1+y 2 = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy
= P dx + Q dy = 0,
x2
Giving i) ∂u
∂x = x tan−1 y , ii) ∂u
∂y = 2(1+y 2 ) .

x2
Integrate i): u= 2 tan−1 y + φ(y)

∂u x2 1 dφ x2
Differentiate: ∂y = 2 (1+y 2 ) + dy = 2(1+y 2 ) , using ii)

Toc JJ II J I Back
Solutions to exercises 28

∴ dy =0 i.e. φ(y) = C 0

x2
and u = 2 tan−1 y + C 0

du = 0 implies u = C , C = constant
x2
∴ 2 tan−1 y = A, A = C − C 0 .

Return to Exercise 8

Toc JJ II J I Back
Solutions to exercises 29

Exercise 9.

P (x, y)dx + Q(x, y)dy = 0 where P (x, y) = 2x + x2 y 3 ,


Q(x, y) = x3 y 2 + 4y 3

∂P ∂Q
∂y = 3x2 y 2 = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy
= P dx + Q dy = 0,
∂u ∂u
Giving i) ∂x = 2x + x2 y 3 , ii) ∂y = x3 y 2 + 4y 3 .

x3 y 3
Integrate i): u = x2 + 3 + φ(y)

∂u dφ
Differentiate: ∂y = x3 y 2 + dy = x3 y 2 + 4y 3 , using ii)


= 4y 3 y 3 dy i.e. φ = y 4 + C 0
R R
i.e. dy i.e. dφ = 4

Toc JJ II J I Back
Solutions to exercises 30
3 3
x y
∴ u = x2 + 3 + y4 + C 0

du = 0 gives u = C,
x3 y 3
∴ x2 + 3 + y 4 = A , where A = C − C 0 .

Return to Exercise 9

Toc JJ II J I Back
Solutions to exercises 31

Exercise 10.

(2x3 − 6x2 y + 3xy 2 )dx + (−2x3 + 3x2 y − y 3 )dy = 0

∂P ∂Q
∂y = −6x2 + 6xy = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy

= P dx + Q dy = 0
∂u ∂u
Giving i) ∂x = 2x3 − 6x2 y + 3xy 2 , ii) ∂y = −2x3 + 3x2 y − y 3 .

x4
Integrate i): u= 2 − 2x3 y + 32 x2 y 2 + φ(y)

Differentiate: ∂u
∂y = −2x3 + 3x2 y + dφ 3 2
dy = −2x + 3x y − y
3
, using ii)

Toc JJ II J I Back
Solutions to exercises 32

= −y 3 dφ = − y 3 dy
R R
∴ dy i.e.

i.e. φ(y) = − 14 y 4 + C 0

x4 y4
and u(x, y) = 2 − 2x3 y + 32 x2 y 2 − 4 + C0

du = 0 gives u = C,

x4 y4
∴ 2 − 2x3 y + 32 x2 y 2 − 4 = A , A = C − C0 .

Return to Exercise 10

Toc JJ II J I Back
Solutions to exercises 33

Exercise 11.

P (x, y)dx + Q(x, y)dy = 0 where P (x, y) = y 2 cos x − sin x ,


Q(x, y) = 2y sin x + 2

∂P ∂Q
∂y = 2y cos x = ∂x , ∴ o.d.e. is exact.

∂u ∂u
∴ u(x, y) exists such that du = ∂x dx + ∂y dy
= P dx + Q dy = 0,
∂u ∂u
Giving i) ∂x = y 2 cos x − sin x , ii) ∂y = 2y sin x + 2 .

Integrate i): u = y 2 sin x + cos x + φ(y)

∂u dφ
Differentiate: ∂y = 2y sin x + dy = 2y sin x + 2 , using ii)


i.e. φ = 2y + C 0
R R
i.e. dy =2 i.e. dφ = 2 dy

Toc JJ II J I Back
Solutions to exercises 34

∴ u = y 2 sin x + cos x + 2y + C 0

du = 0 gives u = C,

∴ y 2 sin x + cos x + 2y = A , where A = C − C 0 .

Return to Exercise 11

Toc JJ II J I Back

You might also like