4First-order differential equations

IA Differential Equations



4.4 Non-constant coefficients
Consider the general form of equation
a(x)y
0
+ b(x)y = c(x).
Divide by a(x) to get the standard form
y
0
+ p(x)y = f(x).
We solve this by multiplying an integrating factor
µ
(
x
) to obtain (
µ
)
y
0
+ (
µp
)
y
=
µf.
We want to choose a
µ
such that the left hand side is equal to (
µy
)
0
. By the
product rule, we want µp = µ
0
, i.e.
p =
1
µ
dµ
dx
Z
p dx =
Z
1
µ
dµ
dx
dx
=
Z
1
µ
du
= ln µ(+C)
µ = exp
Z
p dx
Then by construction, we have (µy)
0
= µf and thus
y =
R
µf dx
µ
, where µ = exp
Z
p dx
Example. Consider
xy
0
+ (1
x
)
y
= 1. To obtain it in standard form, we have
y
0
+
1x
x
y =
1
x
. We have µ = exp
R
(
1
x
1) dx
= e
ln xx
= xe
x
. Then
y =
R
xe
x
1
x
dx
xe
x
=
e
x
+ C
xe
x
=
1
x
+
C
x
e
x
Suppose that we have a boundary condition
y
is finite at
x
= 0. Since we have
y
=
Ce
x
1
x
, we have to ensure that
Ce
x
1
0 as
x
0. Thus
C
= 1, and by
L’Hopital’s rule, y 1 as x 0.