An integrating factor is any expression that a differential equation is multiplied by to facilitate integration. For example, the nonlinear second order equation
d
2
y
d
t
2
=
A
y
2
/
3
{\displaystyle {\frac {d^{2}y}{dt^{2}}}=Ay^{2/3}}
admits
d
y
d
t
{\textstyle {\frac {dy}{dt}}}
as an integrating factor:
d
2
y
d
t
2
d
y
d
t
=
A
y
2
/
3
d
y
d
t
.
{\displaystyle {\frac {d^{2}y}{dt^{2}}}{\frac {dy}{dt}}=Ay^{2/3}{\frac {dy}{dt}}.}
To integrate, note that both sides of the equation may be expressed as derivatives by going backwards with the chain rule :
d
d
t
(
1
2
(
d
y
d
t
)
2
)
=
d
d
t
(
A
3
5
y
5
/
3
)
.
{\displaystyle {\frac {d}{dt}}\left({\frac {1}{2}}\left({\frac {dy}{dt}}\right)^{2}\right)={\frac {d}{dt}}\left(A{\frac {3}{5}}y^{5/3}\right).}
Therefore,
(
d
y
d
t
)
2
=
6
A
5
y
5
/
3
+
C
0
.
{\displaystyle \left({\frac {dy}{dt}}\right)^{2}={\frac {6A}{5}}y^{5/3}+C_{0}.}
where
C
0
{\displaystyle C_{0}}
is a constant.
This form may be more useful, depending on application. Performing a separation of variables will give
∫
y
(
0
)
y
(
t
)
d
y
6
A
5
y
5
/
3
+
C
0
=
t
{\displaystyle \int _{y(0)}^{y(t)}{\frac {dy}{\sqrt {{\frac {6A}{5}}y^{5/3}+C_{0}}}}=t}
This is an implicit solution which involves a nonelementary integral . This same method is used to solve the period of a simple pendulum .
Solving first order linear ordinary differential equations
edit
Integrating factors are useful for solving ordinary differential equations that can be expressed in the form
y
′
+
P
(
x
)
y
=
Q
(
x
)
{\displaystyle y'+P(x)y=Q(x)}
The basic idea is to find some function, say
M
(
x
)
{\displaystyle M(x)}
, called the "integrating factor", which we can multiply through our differential equation in order to bring the left-hand side under a common derivative. For the canonical first-order linear differential equation shown above, the integrating factor is
e
∫
P
(
x
)
d
x
{\displaystyle e^{\int P(x)\,dx}}
.
Note that it is not necessary to include the arbitrary constant in the integral, or absolute values in case the integral of
P
(
x
)
{\displaystyle P(x)}
involves a logarithm. Firstly, we only need one integrating factor to solve the equation, not all possible ones; secondly, such constants and absolute values will cancel out even if included. For absolute values, this can be seen by writing
|
f
(
x
)
|
=
f
(
x
)
sgn
f
(
x
)
{\displaystyle |f(x)|=f(x)\operatorname {sgn} f(x)}
, where
sgn
{\displaystyle \operatorname {sgn} }
refers to the sign function , which will be constant on an interval if
f
(
x
)
{\displaystyle f(x)}
is continuous. As
ln
|
f
(
x
)
|
{\displaystyle \ln |f(x)|}
is undefined when
f
(
x
)
=
0
{\displaystyle f(x)=0}
, and a logarithm in the antiderivative only appears when the original function involved a logarithm or a reciprocal (neither of which are defined for 0), such an interval will be the interval of validity of our solution.
To derive this, let
M
(
x
)
{\displaystyle M(x)}
be the integrating factor of a first order linear differential equation such that multiplication by
M
(
x
)
{\displaystyle M(x)}
transforms a non-integrable expression into an integrable derivative, then:
M
(
x
)
(
y
′
+
P
(
x
)
y
⏟
)
non-integrable expression
{\displaystyle M(x){\underset {\text{non-integrable expression}}{(\underbrace {y'+P(x)y} )}}}
M
(
x
)
y
′
+
M
(
x
)
P
(
x
)
y
{\displaystyle M(x)y'+M(x)P(x)y}
M
(
x
)
y
′
+
M
′
(
x
)
y
⏟
integrable derivative
{\displaystyle \underbrace {M(x)y'+M'(x)y} _{\text{integrable derivative}}}
Going from step 2 to step 3 requires that
M
(
x
)
P
(
x
)
=
M
′
(
x
)
{\displaystyle M(x)P(x)=M'(x)}
, which is a separable differential equation , whose solution yields
M
(
x
)
{\displaystyle M(x)}
in terms of
P
(
x
)
{\displaystyle P(x)}
:
M
(
x
)
P
(
x
)
=
M
′
(
x
)
{\displaystyle M(x)P(x)=M'(x)}
P
(
x
)
=
M
′
(
x
)
M
(
x
)
{\displaystyle P(x)={\frac {M'(x)}{M(x)}}}
∫
P
(
x
)
d
x
=
ln
M
(
x
)
+
c
{\displaystyle \int P(x)\,dx=\ln M(x)+c}
M
(
x
)
=
C
e
∫
P
(
x
)
d
x
{\displaystyle M(x)=Ce^{\int P(x)\,dx}}
To verify, multiplying by
M
(
x
)
{\displaystyle M(x)}
gives
M
(
x
)
y
′
+
P
(
x
)
M
(
x
)
y
=
Q
(
x
)
M
(
x
)
{\displaystyle M(x)y'+P(x)M(x)y=Q(x)M(x)}
By applying the product rule in reverse, we see that the left-hand side can be expressed as a single derivative in
x
{\displaystyle x}
M
(
x
)
y
′
+
P
(
x
)
M
(
x
)
y
=
M
(
x
)
y
′
+
M
′
(
x
)
y
=
d
d
x
(
M
(
x
)
y
)
{\displaystyle M(x)y'+P(x)M(x)y=M(x)y'+M'(x)y={\frac {d}{dx}}(M(x)y)}
We use this fact to simplify our expression to
d
d
x
(
M
(
x
)
y
)
=
Q
(
x
)
M
(
x
)
{\displaystyle {\frac {d}{dx}}\left(M(x)y\right)=Q(x)M(x)}
Integrating both sides with respect to
x
{\displaystyle x}
C
e
∫
P
(
x
)
d
x
y
=
∫
Q
(
x
)
C
e
∫
P
(
x
)
d
x
d
x
{\displaystyle Ce^{\int P(x)\,dx}y=\int Q(x)Ce^{\int P(x)\,dx}dx}
e
∫
P
(
x
)
d
x
y
=
(
∫
Q
(
x
)
e
∫
P
(
x
)
d
x
d
x
)
+
C
{\displaystyle e^{\int P(x)\,dx}y=\left(\int Q(x)e^{\int P(x)\,dx}\,dx\right)+C}
where
C
{\displaystyle C}
is a constant.
Moving the exponential to the right-hand side, the general solution to Ordinary Differential Equation is:
y
=
e
−
∫
P
(
x
)
d
x
(
∫
Q
(
x
)
e
∫
P
(
x
)
d
x
d
x
)
+
C
e
−
∫
P
(
x
)
d
x
{\displaystyle y=e^{-\int P(x)\,dx}\left(\int Q(x)e^{\int P(x)\,dx}\,dx\right)+Ce^{-\int P(x)\,dx}}
In the case of a homogeneous differential equation ,
Q
(
x
)
=
0
{\displaystyle Q(x)=0}
and the general solution to Ordinary Differential Equation is:
y
=
C
e
−
∫
P
(
x
)
d
x
{\displaystyle y=Ce^{-\int P(x)\,dx}}
.
for example, consider the differential equation
y
′
−
2
y
x
=
0.
{\displaystyle y'-{\frac {2y}{x}}=0.}
We can see that in this case
P
(
x
)
=
−
2
x
{\displaystyle P(x)={\frac {-2}{x}}}
M
(
x
)
=
e
∫
1
x
P
(
x
)
d
x
{\displaystyle M(x)=e^{\int _{1}^{x}P(x)dx}}
M
(
x
)
=
e
∫
1
x
−
2
x
d
x
=
e
−
2
ln
x
=
(
e
ln
x
)
−
2
=
x
−
2
{\displaystyle M(x)=e^{\int _{1}^{x}{\frac {-2}{x}}\,dx}=e^{-2\ln x}={\left(e^{\ln x}\right)}^{-2}=x^{-2}}
M
(
x
)
=
1
x
2
.
{\displaystyle M(x)={\frac {1}{x^{2}}}.}
Multiplying both sides by
M
(
x
)
{\displaystyle M(x)}
we obtain
y
′
x
2
−
2
y
x
3
=
0
{\displaystyle {\frac {y'}{x^{2}}}-{\frac {2y}{x^{3}}}=0}
The above equation can be rewritten as
d
(
x
−
2
y
)
d
x
=
0
{\displaystyle {\frac {d(x^{-2}y)}{dx}}=0}
By integrating both sides with respect to x we obtain
x
−
2
y
=
C
{\displaystyle x^{-2}y=C}
or
y
=
C
x
2
{\displaystyle y=Cx^{2}}
The same result may be achieved using the following approach
y
′
x
2
−
2
y
x
3
=
0
{\displaystyle {\frac {y'}{x^{2}}}-{\frac {2y}{x^{3}}}=0}
y
′
x
3
−
2
x
2
y
x
5
=
0
{\displaystyle {\frac {y'x^{3}-2x^{2}y}{x^{5}}}=0}
x
(
y
′
x
2
−
2
x
y
)
x
5
=
0
{\displaystyle {\frac {x(y'x^{2}-2xy)}{x^{5}}}=0}
y
′
x
2
−
2
x
y
x
4
=
0.
{\displaystyle {\frac {y'x^{2}-2xy}{x^{4}}}=0.}
Reversing the quotient rule gives
(
y
x
2
)
′
=
0
{\displaystyle \left({\frac {y}{x^{2}}}\right)'=0}
or
y
x
2
=
C
,
{\displaystyle {\frac {y}{x^{2}}}=C,}
or
y
=
C
x
2
.
{\displaystyle y=Cx^{2}.}
where
C
{\displaystyle C}
is a constant.
Solving second order linear ordinary differential equations
edit
The method of integrating factors for first order equations can be naturally extended to second order equations as well. The main goal in solving first order equations was to find an integrating factor
M
(
x
)
{\displaystyle M(x)}
such that multiplying
y
′
+
p
(
x
)
y
=
h
(
x
)
{\displaystyle y'+p(x)y=h(x)}
by it would yield
(
M
(
x
)
y
)
′
=
M
(
x
)
h
(
x
)
{\displaystyle (M(x)y)'=M(x)h(x)}
, after which subsequent integration and division by
M
(
x
)
{\displaystyle M(x)}
would yield
y
{\displaystyle y}
. For second order linear differential equations, if we want
M
(
x
)
=
e
∫
p
(
x
)
d
x
{\displaystyle M(x)=e^{\int p(x)\,dx}}
to work as an integrating factor, then
(
M
(
x
)
y
)
″
=
M
(
x
)
(
y
″
+
2
p
(
x
)
y
′
+
(
p
(
x
)
2
+
p
′
(
x
)
)
y
)
=
M
(
x
)
h
(
x
)
{\displaystyle (M(x)y)''=M(x)\left(y''+2p(x)y'+\left(p(x)^{2}+p'(x)\right)y\right)=M(x)h(x)}
This implies that a second order equation must be exactly in the form
y
″
+
2
p
(
x
)
y
′
+
(
p
(
x
)
2
+
p
′
(
x
)
)
y
=
h
(
x
)
{\displaystyle y''+2p(x)y'+\left(p(x)^{2}+p'(x)\right)y=h(x)}
for the integrating factor to be usable.
For example, the differential equation
y
″
+
2
x
y
′
+
(
x
2
+
1
)
y
=
0
{\displaystyle y''+2xy'+\left(x^{2}+1\right)y=0}
can be solved exactly with integrating factors. The appropriate
p
(
x
)
{\displaystyle p(x)}
can be deduced by examining the
y
′
{\displaystyle y'}
term. In this case,
2
p
(
x
)
=
2
x
{\displaystyle 2p(x)=2x}
, so
p
(
x
)
=
x
{\displaystyle p(x)=x}
. After examining the
y
{\displaystyle y}
term, we see that we do in fact have
p
(
x
)
2
+
p
′
(
x
)
=
x
2
+
1
{\displaystyle p(x)^{2}+p'(x)=x^{2}+1}
, so we will multiply all terms by the integrating factor
e
∫
x
d
x
=
e
x
2
/
2
{\displaystyle e^{\int x\,dx}=e^{x^{2}/2}}
. This gives us
e
x
2
/
2
y
″
+
2
e
x
2
/
2
p
(
x
)
y
′
+
e
x
2
/
2
(
p
(
x
)
2
+
p
′
(
x
)
)
y
=
0
{\displaystyle e^{x^{2}/2}y''+2e^{x^{2}/2}p(x)y'+e^{x^{2}/2}\left(p(x)^{2}+p'(x)\right)y=0}
which can be rearranged to give
(
e
x
2
/
2
y
)
″
=
0
{\displaystyle \left(e^{x^{2}/2}y\right)''=0}
Integrating twice yields
e
x
2
/
2
y
=
c
1
x
+
c
2
{\displaystyle e^{x^{2}/2}y=c_{1}x+c_{2}}
Dividing by the integrating factor gives:
y
=
c
1
x
+
c
2
e
x
2
/
2
{\displaystyle y={\frac {c_{1}x+c_{2}}{e^{x^{2}/2}}}}
A slightly less obvious application of second order integrating factors involves the following differential equation:
y
″
+
2
cot
(
x
)
y
′
−
y
=
1
{\displaystyle y''+2\cot(x)y'-y=1}
At first glance, this is clearly not in the form needed for second order integrating factors. We have a
2
p
(
x
)
{\displaystyle 2p(x)}
term in front of
y
′
{\displaystyle y'}
but no
p
(
x
)
2
+
p
′
(
x
)
{\displaystyle p(x)^{2}+p'(x)}
in front of
y
{\displaystyle y}
. However,
p
(
x
)
2
+
p
′
(
x
)
=
cot
2
(
x
)
−
csc
2
(
x
)
{\displaystyle p(x)^{2}+p'(x)=\cot ^{2}(x)-\csc ^{2}(x)}
and from the Pythagorean identity relating cotangent and cosecant,
cot
2
(
x
)
−
csc
2
(
x
)
=
−
1
{\displaystyle \cot ^{2}(x)-\csc ^{2}(x)=-1}
so we actually do have the required term in front of
y
{\displaystyle y}
and can use integrating factors.
e
∫
cot
(
x
)
d
x
=
e
ln
(
sin
(
x
)
)
=
sin
(
x
)
{\displaystyle e^{\int \cot(x)\,dx}=e^{\ln(\sin(x))}=\sin(x)}
Multiplying each term by
sin
(
x
)
{\displaystyle \sin(x)}
gives
sin
(
x
)
y
″
+
2
cot
(
x
)
sin
(
x
)
y
′
−
sin
(
x
)
y
=
sin
(
x
)
{\displaystyle \sin(x)y''+2\cot(x)\sin(x)y'-\sin(x)y=\sin(x)}
which rearranged is
(
sin
(
x
)
y
)
″
=
sin
(
x
)
{\displaystyle (\sin(x)y)''=\sin(x)}
Integrating twice gives
sin
(
x
)
y
=
−
sin
(
x
)
+
c
1
x
+
c
2
{\displaystyle \sin(x)y=-\sin(x)+c_{1}x+c_{2}}
Finally, dividing by the integrating factor gives
y
=
c
1
x
csc
(
x
)
+
c
2
csc
(
x
)
−
1
{\displaystyle y=c_{1}x\csc(x)+c_{2}\csc(x)-1}
Solving nth order linear differential equations
edit
Integrating factors can be extended to any order, though the form of the equation needed to apply them gets more and more specific as order increases, making them less useful for orders 3 and above. The general idea is to differentiate the function
M
(
x
)
y
{\displaystyle M(x)y}
n
{\displaystyle n}
times for an
n
{\displaystyle n}
th order differential equation and combine like terms. This will yield an equation in the form
M
(
x
)
F
(
y
,
y
′
,
y
″
,
…
,
y
(
n
)
)
{\displaystyle M(x)F\!\left(y,y',y'',\ldots ,y^{(n)}\right)}
If an
n
{\displaystyle n}
th order equation matches the form
F
(
y
,
y
′
,
y
″
,
…
,
y
(
n
)
)
{\displaystyle F\!\left(y,y',y'',\ldots ,y^{(n)}\right)}
that is gotten after differentiating
n
{\displaystyle n}
times, one can multiply all terms by the integrating factor and integrate
h
(
x
)
M
(
x
)
{\displaystyle h(x)M(x)}
n
{\displaystyle n}
times, dividing by the integrating factor on both sides to achieve the final result.
A third order usage of integrating factors gives
(
M
(
x
)
y
)
‴
=
M
(
x
)
(
y
‴
+
3
p
(
x
)
y
″
+
(
3
p
(
x
)
2
+
3
p
′
(
x
)
)
y
′
+
(
p
(
x
)
3
+
3
p
(
x
)
p
′
(
x
)
+
p
″
(
x
)
)
y
)
{\displaystyle (M(x)y)'''=M(x)\left(y'''+3p(x)y''+\left(3p(x)^{2}+3p'(x)\right)y'+\left(p(x)^{3}+3p(x)p'(x)+p''(x)\right)y\right)}
thus requiring our equation to be in the form
(
y
‴
+
3
p
(
x
)
y
″
+
(
3
p
(
x
)
2
+
3
p
′
(
x
)
)
y
′
+
(
p
(
x
)
3
+
3
p
(
x
)
p
′
(
x
)
+
p
″
(
x
)
)
y
=
h
(
x
)
{\displaystyle \left(y'''+3p(x)y''+(3p(x)^{2}+3p'(x)\right)y'+\left(p(x)^{3}+3p(x)p'(x)+p''(x)\right)y=h(x)}
For example in the differential equation
y
‴
+
3
x
2
y
″
+
(
3
x
4
+
6
x
)
y
′
+
(
x
6
+
6
x
3
+
2
)
y
=
0
{\displaystyle y'''+3x^{2}y''+\left(3x^{4}+6x\right)y'+\left(x^{6}+6x^{3}+2\right)y=0}
we have
p
(
x
)
=
x
2
{\displaystyle p(x)=x^{2}}
, so our integrating factor is
e
x
3
/
3
{\displaystyle e^{x^{3}/3}}
. Rearranging gives
(
e
x
3
/
3
y
)
‴
=
0
{\displaystyle \left(e^{x^{3}/3}y\right)'''=0}
Integrating thrice and dividing by the integrating factor yields
y
=
c
1
x
2
+
c
2
x
+
c
3
e
x
3
/
3
{\displaystyle y={\frac {c_{1}x^{2}+c_{2}x+c_{3}}{e^{x^{3}/3}}}}