Ordinary Differential Equations Integrating Factor
Ordinary Differential Equations Integrating Factor
Ordinary Differential Equations Integrating Factor
P(x)dx
This factor is dened so that the equation becomes equivalent to:
d
dx
(IFy) = IFQ(x),
whereby integrating both sides with respect to x, gives:
IF y =
_
IFQ(x) dx
Finally, division by the integrating factor (IF) gives y explicitly in
terms of x, i.e. gives the solution to the equation.
Toc
Back
Section 2: Exercises 5
2. Exercises
In each case, derive the general solution. When a boundary
condition is also given, derive the particular solution.
Click on Exercise links for full worked solutions (there are 10
exercises in total)
Exercise 1.
dy
dx
+ y = x ; y(0) = 2
Exercise 2.
dy
dx
+ y = e
x
; y(0) = 1
Exercise 3.
x
dy
dx
+ 2y = 10x
2
; y(1) = 3
q Theory q Answers q Integrals q Tips q Notation
Toc
Back
Section 2: Exercises 6
Exercise 4.
x
dy
dx
y = x
2
; y(1) = 3
Exercise 5.
x
dy
dx
2y = x
4
sin x
Exercise 6.
x
dy
dx
2y = x
2
Exercise 7.
dy
dx
+ y cot x = cosec x
q Theory q Answers q Integrals q Tips q Notation
Toc
Back
Section 2: Exercises 7
Exercise 8.
dy
dx
+ y cot x = cos x
Exercise 9.
(x
2
1)
dy
dx
+ 2xy = x
Exercise 10.
dy
dx
= y tan x sec x ; y(0) = 1
q Theory q Answers q Integrals q Tips q Notation
Toc
Back
Section 3: Answers 8
3. Answers
1. General solution is y = (x 1) + Ce
x
, and particular
solution is y = (x 1) + 3e
x
,
2. General solution is y = e
x
(x + C) , and particular solution is
y = e
x
(x + 1) ,
3. General solution is y =
5
2
x
2
+
C
x
2
, and particular solution is
y =
1
2
(5x
2
+
1
x
2
) ,
4. General solution is y = x
2
+ Cx , and particular solution is
y = x
2
+ 2x ,
5. General solution is y = x
3
cos x + x
2
sin x + Cx
2
,
6. General solution is y = x
2
ln x + C x
2
,
Toc
Back
Section 3: Answers 9
7. General solution is y sin x = x + C ,
8. General solution is 4y sin x + cos 2x = C ,
9. General solution is (x
2
1)y =
x
2
2
+ C ,
10. General solution is y cos x = C x , and particular solution is
y cos x = 1 x .
Toc
Back
Section 4: Standard integrals 10
4. Standard integrals
f (x)
_
f(x)dx f (x)
_
f(x)dx
x
n x
n+1
n+1
(n = 1) [g (x)]
n
g
(x)
[g(x)]
n+1
n+1
(n = 1)
1
x
ln |x|
g
(x)
g(x)
ln |g (x)|
e
x
e
x
a
x 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
x
2
cosech x ln
tanh
x
2
a+x
ax
(0<|x| <a)
(a > 0)
1
x
2
a
2
1
2a
ln
xa
x+a
a
2
x
2
sin
1 x
a
1
a
2
+x
2
ln
x+
a
2
+x
2
a
(a > 0)
(a < x < a)
1
x
2
a
2
ln
x+
x
2
a
2
a
(x>a>0)
a
2
x
2
a
2
2
_
sin
1
_
x
a
_
a
2
+x
2
a
2
2
_
sinh
1
_
x
a
_
+
x
a
2
+x
2
a
2
_
+
x
a
2
x
2
a
2
_
x
2
a
2
a
2
2
_
cosh
1
_
x
a
_
+
x
x
2
a
2
a
2
_
Toc
Back
Section 5: Tips on using solutions 12
5. Tips on using solutions
q When looking at the THEORY, ANSWERS, INTEGRALS, TIPS
or NOTATION pages, use the Back button (at the bottom of the
page) to return to the exercises.
q 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.
q Try to make less use of the full solutions as you work your way
through the Tutorial.
Toc
Back
Section 6: Alternative notation 13
6. Alternative notation
The linear rst order dierential equation:
dy
dx
+ P(x) y = Q(x)
has the integrating factor IF=e
P(x) dx
.
The integrating factor method is sometimes explained in terms of
simpler forms of dierential equation. For example, when constant
coecients a and b are involved, the equation may be written as:
a
dy
dx
+ b y = Q(x)
In our standard form this is:
dy
dx
+
b
a
y =
Q(x)
a
with an integrating factor of:
IF = e
b
a
dx
= e
bx
a
Toc
Back
Solutions to exercises 14
Full worked solutions
Exercise 1.
Compare with form:
dy
dx
+ P(x)y = Q(x) (P, Q are functions of x)
Integrating factor: P(x) = 1.
Integrating factor, IF = e
P(x)dx
= e
dx
= e
x
Multiply equation by IF:
e
x
dy
dx
+ e
x
y = e
x
x
i.e.
d
dx
[e
x
y] = e
x
x
Toc
Back
Solutions to exercises 15
Integrate both sides with respect to x:
e
x
y = e
x
(x 1) + C
{ Note:
_
u
dv
dx
dx = uv
_
v
du
dx
dx i.e. integration by parts with
u x,
dv
dx
e
x
xe
x
_
e
x
dx
xe
x
e
x
= e
x
(x 1) }
i.e. y = (x 1) + Ce
x
.
Particular solution with y(0) = 2:
2 = (0 1) + Ce
0
= 1 + C i.e. C = 3 and y = (x 1) + 3e
x
.
Return to Exercise 1
Toc
Back
Solutions to exercises 16
Exercise 2.
Integrating Factor: P(x) = 1 , IF = e
Pdx
= e
dx
= e
x
Multiply equation:
e
x
dy
dx
+ e
x
y = e
x
e
x
i.e.
d
dx
[e
x
y] = 1
Integrate:
e
x
y = x + C
i.e. y = e
x
(x + C) .
Particular solution:
y = 1
x = 0
gives 1 = e
0
(0 + C)
= 1.C i.e. C = 1
and y = e
x
(x + 1) .
Return to Exercise 2
Toc
Back
Solutions to exercises 17
Exercise 3.
Equation is linear, 1st order i.e.
dy
dx
+ P(x)y = Q(x)
i.e.
dy
dx
+
2
x
y = 10x, where P(x) =
2
x
, Q(x) = 10x
Integrating factor : IF = e
P(x)dx
= e
2
dx
x
= e
2 ln x
= e
ln x
2
= x
2
.
Multiply equation: x
2
dy
dx
+ 2xy = 10x
3
i.e.
d
dx
_
x
2
y
= 10x
3
Integrate: x
2
y =
5
2
x
4
+ C
i.e. y =
5
2
x
2
+
C
x
2
Toc
Back
Solutions to exercises 18
Particular solution y(1) = 3 i.e. y(x) = 3 when x = 1.
i.e. 3 =
5
2
1 +
C
1
i.e.
6
2
=
5
2
+ C
i.e. C =
1
2
y =
5
2
x
2
+
1
2x
2
=
1
2
_
5x
2
+
1
x
2
_
.
Return to Exercise 3
Toc
Back
Solutions to exercises 19
Exercise 4.
Standard form:
dy
dx
_
1
x
_
y = x
Compare with
dy
dx
+ P(x)y = Q(x) , giving P(x) =
1
x
Integrating Factor: IF = e
P(x)dx
= e
dx
x
= e
ln x
= e
ln(x
1
)
=
1
x
.
Multiply equation:
1
x
dy
dx
1
x
2
y = 1
i.e.
d
dx
_
1
x
y
_
= 1
Integrate:
1
x
y = x + C
i.e. y = x
2
+ Cx .
Toc
Back
Solutions to exercises 20
Particular solution with y(1) = 3:
3 = 1 + C
i.e. C = 2
Particular solution is y = x
2
+ 2x .
Return to Exercise 4
Toc
Back
Solutions to exercises 21
Exercise 5.
Linear in y :
dy
dx
2
x
y = x
3
sin x
Integrating factor: IF = e
2
dx
x
= e
2 ln x
= e
ln x
2
=
1
x
2
Multiply equation:
1
x
2
dy
dx
2
x
3
y = xsin x
i.e.
d
dx
_
1
x
2
y
_
= xsin x
Integrate:
y
x
2
= xcos x
_
1 (cos x)dx+C
Pdx
= e
2
dx
x
= e
2 ln x
= e
ln x
2
=
1
x
2
Multiply equation:
1
x
2
dy
dx
2
x
3
y =
1
x
i.e.
d
dx
_
1
x
2
y
_
=
1
x
Toc
Back
Solutions to exercises 23
Integrate:
1
x
2
y =
_
dx
x
i.e.
1
x
2
y = ln x + C
i.e. y = x
2
ln x + Cx
2
.
Return to Exercise 6
Toc
Back
Solutions to exercises 24
Exercise 7.
Of the form:
dy
dx
+ P(x)y = Q(x) (i.e. linear, 1st order o.d.e.)
where P(x) = cot x.
Integrating factor : IF = e
P(x)dx
= e
cos x
sin x
dx
_
e
(x)
f(x)
dx
_
= e
ln(sin x)
= sin x
Multiply equation : sin x
dy
dx
+ sin x
_
cos x
sin x
_
y =
sin x
sin x
i.e. sin x
dy
dx
+ cos x y = 1
i.e.
d
dx
[sin x y] = 1
Integrate: (sin x)y = x + C . Return to Exercise 7
Toc
Back
Solutions to exercises 25
Exercise 8.
Integrating factor: P(x) = cot x =
cos x
sin x
IF = e
Pdx
= e
cos x
sin x
dx
= e
ln(sin x)
= sin x
_
Note:
cos x
sin x
f
(x)
f(x)
_
Multiply equation:
sin x
dy
dx
+ sin x y
cos x
sin x
= sin x cos x
i.e.
d
dx
[sin x y] = sin x cos x
Integrate: y sin x =
_
sin x cos x dx
Toc
Back
Solutions to exercises 26
{ Note:
_
sin xcos xdx
_
f(x)f
(x)dx
_
f
df
dx
dx
_
fdf =
1
2
f
2
+ C }
i.e. y sin x =
1
2
sin
2
x + C
=
1
2
1
2
(1 cos 2x) + C
i.e. 4y sin x +cos 2x = C
_
where C
= 4C + 1
= constant
_
.
Return to Exercise 8
Toc
Back
Solutions to exercises 27
Exercise 9.
Standard form:
dy
dx
+
_
2x
x
2
1
_
y =
x
x
2
1
Integrating factor: P(x) =
2x
x
2
1
IF = e
Pdx
= e
2x
x
2
1
dx
= e
ln(x
2
1)
= x
2
1
Multiply equation: (x
2
1)
dy
dx
+ 2xy = x
(the original form of the equation was half-way there!)
i.e.
d
dx
_
(x
2
1)y
= x
Integrate: (x
2
1)y =
1
2
x
2
+ C .
Return to Exercise 9
Toc
Back
Solutions to exercises 28
Exercise 10.
P(x) = tan x
Q(x) = sec x
IF = e
tan x dx
= e
sin x
cos x
dx
= e
+
sin x
cos x
dx
= e
ln(cos x)
= cos x
Multiply by IF: cos x
dy
dx
cos x
sin x
cos x
y = cos x sec x
i.e.
d
dx
[cos x y] = 1 i.e. y cos x = x + C .
y(0) = 1 i.e. y = 1 when x = 0 gives
cos(0) = 0 + C C = 1
i.e. y cos x = x + 1 .
Return to Exercise 10
Toc
Back