Integrating factor
Differential equations |
---|
![]() |
Classification |
Solution |
In mathematics, an integrating factor is a function that is chosen to facilitate the solving of a given equation involving differentials. It is commonly used to solve ordinary differential equations, but is also used within multivariable calculus when multiplying through by an integrating factor allows an inexact differential to be made into an exact differential (which can then be integrated to give a scalar field). This is especially useful in thermodynamics where temperature becomes the integrating factor that makes entropy an exact differential.
Use
An integrating factor is any expression that a differential equation is multiplied by to facilitate integration. For example, the nonlinear second order equation
- [math]\displaystyle{ \frac{d^2 y}{d t^2} = A y^{2/3} }[/math]
admits [math]\displaystyle{ \frac{d y}{d t} }[/math] as an integrating factor:
- [math]\displaystyle{ \frac{d^2 y}{d t^2} \frac{d y}{d t} = A y^{2/3} \frac{d y}{d t}. }[/math]
To integrate, note that both sides of the equation may be expressed as derivatives by going backwards with the chain rule:
- [math]\displaystyle{ \frac{d}{d t}\left(\frac 1 2 \left(\frac{d y}{d t}\right)^2\right) = \frac{d}{d t}\left(A \frac 3 5 y^{5/3}\right). }[/math]
Therefore,
- [math]\displaystyle{ \left(\frac{d y}{d t}\right)^2 = \frac{6 A}{5} y^{5/3} + C_0. }[/math]
where [math]\displaystyle{ C_0 }[/math] is a constant.
This form may be more useful, depending on application. Performing a separation of variables will give
- [math]\displaystyle{ \int_{y(0)}^{y(t)} \frac{d y}{\sqrt{\frac{6 A}{5} y^{5/3} + C_0}} = t }[/math]
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
Integrating factors are useful for solving ordinary differential equations that can be expressed in the form
- [math]\displaystyle{ y'+ P(x)y = Q(x) }[/math]
The basic idea is to find some function, say [math]\displaystyle{ M(x) }[/math], 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 [math]\displaystyle{ e^{\int P(x) \, dx} }[/math].
Note that it is not necessary to include the arbitrary constant in the integral, or absolute values in case the integral of [math]\displaystyle{ P(x) }[/math] 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 [math]\displaystyle{ |f(x)| = f(x) \sgn f(x) }[/math], where [math]\displaystyle{ \sgn }[/math] refers to the sign function, which will be constant on an interval if [math]\displaystyle{ f(x) }[/math] is continuous. As [math]\displaystyle{ \ln |f(x)| }[/math] is undefined when [math]\displaystyle{ f(x) = 0 }[/math], 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 [math]\displaystyle{ M(x) }[/math] be the integrating factor of a first order linear differential equation such that multiplication by [math]\displaystyle{ M(x) }[/math] transforms a partial derivative into a total derivative, then:
- [math]\displaystyle{ M(x)\underset{\text{partial derivative}}{(\underbrace{y'+P(x)y})} }[/math]
- [math]\displaystyle{ M(x)y'+M(x)P(x)y }[/math]
- [math]\displaystyle{ \underbrace{M(x)y'+M'(x)y}_{\text{total derivative}} }[/math]
Going from step 2 to step 3 requires that [math]\displaystyle{ M(x)P(x)=M'(x) }[/math], which is a separable differential equation, whose solution yields [math]\displaystyle{ M(x) }[/math] in terms of [math]\displaystyle{ P(x) }[/math]:
- [math]\displaystyle{ M(x)P(x) = M'(x) }[/math]
- [math]\displaystyle{ P(x) = \frac{M'(x)}{M(x)} }[/math]
- [math]\displaystyle{ \int P(x) \, dx = \ln M(x) + c }[/math]
- [math]\displaystyle{ M(x)=Ce^{\int P(x) \, dx} }[/math]
To verify, multiplying by [math]\displaystyle{ M(x) }[/math] gives
- [math]\displaystyle{ M(x)y' + P(x) M(x)y = Q(x)M(x) }[/math]
By applying the product rule in reverse, we see that the left-hand side can be expressed as a single derivative in [math]\displaystyle{ x }[/math]
- [math]\displaystyle{ M(x)y' + P(x) M(x)y = M(x)y' + M'(x)y = \frac{d}{dx}( M(x)y) }[/math]
We use this fact to simplify our expression to
- [math]\displaystyle{ \frac{d}{dx}\left( M(x)y\right) = Q(x) M(x) }[/math]
Integrating both sides with respect to [math]\displaystyle{ x }[/math]
- [math]\displaystyle{ Ce^{\int P(x) \, dx}y = \int Q(x) Ce^{\int P(x) \, dx} dx }[/math]
- [math]\displaystyle{ e^{\int P(x) \, dx}y = \left( \int Q(x) e^{\int P(x) \, dx} \,dx \right)+ C }[/math]
where [math]\displaystyle{ C }[/math] is a constant.
Moving the exponential to the right-hand side, the general solution to Ordinary Differential Equation is:
- [math]\displaystyle{ y = e^{-\int P(x) \, dx}\left( \int Q(x) e^{\int P(x) \, dx} \,dx \right)+ Ce^{- \int P(x) \, dx} }[/math]
In the case of a homogeneous differential equation, [math]\displaystyle{ Q(x) = 0 }[/math] and the general solution to Ordinary Differential Equation is:
- [math]\displaystyle{ y = Ce^{- \int P(x) \, dx} }[/math].
for example, consider the differential equation
- [math]\displaystyle{ y'-\frac{2y}{x} = 0. }[/math]
We can see that in this case [math]\displaystyle{ P(x) = \frac{-2}{x} }[/math]
- [math]\displaystyle{ M(x)=e^{\int_1^x P(x) dx} }[/math]
- [math]\displaystyle{ M(x)=e^{\int_1^x \frac{-2}{x}\,dx} = e^{-2 \ln x} = {\left(e^{\ln x}\right)}^{-2} = x^{-2} }[/math]
- [math]\displaystyle{ M(x)=\frac{1}{x^2}. }[/math]
Multiplying both sides by [math]\displaystyle{ M(x) }[/math] we obtain
- [math]\displaystyle{ \frac{y'}{x^2} - \frac{2y}{x^3} = 0 }[/math]
The above equation can be rewritten as
- [math]\displaystyle{ \frac{d (x^{-2}y)}{dx} = 0 }[/math]
By integrating both sides with respect to x we obtain
- [math]\displaystyle{ x^{-2}y = C }[/math]
or
- [math]\displaystyle{ y = Cx^2 }[/math]
The same result may be achieved using the following approach
- [math]\displaystyle{ \frac{y'}{x^2} - \frac{2y}{x^3} = 0 }[/math]
- [math]\displaystyle{ \frac{y'x^3 - 2x^2y}{x^5} = 0 }[/math]
- [math]\displaystyle{ \frac{x(y'x^2 - 2xy)}{x^5} = 0 }[/math]
- [math]\displaystyle{ \frac{y'x^2 - 2xy}{x^4} = 0. }[/math]
Reversing the quotient rule gives
- [math]\displaystyle{ \left(\frac{y}{x^2}\right)' = 0 }[/math]
or
- [math]\displaystyle{ \frac{y}{x^2} = C, }[/math]
or
- [math]\displaystyle{ y = Cx^2. }[/math]
where [math]\displaystyle{ C }[/math] is a constant.
Solving second order linear ordinary differential equations
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 [math]\displaystyle{ M(x) }[/math] such that multiplying [math]\displaystyle{ y'+p(x)y=h(x) }[/math] by it would yield [math]\displaystyle{ (M(x)y)'=M(x)h(x) }[/math], after which subsequent integration and division by [math]\displaystyle{ M(x) }[/math] would yield [math]\displaystyle{ y }[/math]. For second order linear differential equations, if we want [math]\displaystyle{ M(x)=e^{\int p(x)\,dx} }[/math] to work as an integrating factor, then
- [math]\displaystyle{ (M(x)y)''=M(x)\left(y'' + 2p(x)y' + \left(p(x)^2+p'(x)\right) y \right)=M(x)h(x) }[/math]
This implies that a second order equation must be exactly in the form [math]\displaystyle{ y'' + 2p(x)y' + \left(p(x)^2+p'(x)\right) y=h(x) }[/math] for the integrating factor to be usable.
Example 1
For example, the differential equation
- [math]\displaystyle{ y''+2xy'+\left(x^2+1\right)y=0 }[/math]
can be solved exactly with integrating factors. The appropriate [math]\displaystyle{ p(x) }[/math]can be deduced by examining the [math]\displaystyle{ y' }[/math] term. In this case, [math]\displaystyle{ 2p(x)=2x }[/math], so [math]\displaystyle{ p(x)=x }[/math]. After examining the [math]\displaystyle{ y }[/math] term, we see that we do in fact have [math]\displaystyle{ p(x)^2+p'(x)=x^2+1 }[/math], so we will multiply all terms by the integrating factor [math]\displaystyle{ e^{\int x \, dx} = e^{x^2/2} }[/math]. This gives us
- [math]\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 }[/math]
which can be rearranged to give
- [math]\displaystyle{ \left(e^{x^2/2}y\right)''=0 }[/math]
Integrating twice yields
- [math]\displaystyle{ e^{x^2/2}y=c_1x+c_2 }[/math]
Dividing by the integrating factor gives:
- [math]\displaystyle{ y=\frac{c_1x+c_2}{e^{x^2/2}} }[/math]
Example 2
A slightly less obvious application of second order integrating factors involves the following differential equation:
- [math]\displaystyle{ y''+2\cot(x)y'-y=1 }[/math]
At first glance, this is clearly not in the form needed for second order integrating factors. We have a [math]\displaystyle{ 2p(x) }[/math] term in front of [math]\displaystyle{ y' }[/math] but no [math]\displaystyle{ p(x)^2+p'(x) }[/math] in front of [math]\displaystyle{ y }[/math]. However,
- [math]\displaystyle{ p(x)^2+p'(x)=\cot^2(x)-\csc^2(x) }[/math]
and from the Pythagorean identity relating cotangent and cosecant,
- [math]\displaystyle{ \cot^2(x)-\csc^2(x)=-1 }[/math]
so we actually do have the required term in front of [math]\displaystyle{ y }[/math] and can use integrating factors.
- [math]\displaystyle{ e^{\int \cot(x)\,dx}=e^{\ln(\sin(x))}=\sin(x) }[/math]
Multiplying each term by [math]\displaystyle{ \sin(x) }[/math] gives
- [math]\displaystyle{ \sin(x)y''+2\cot(x)\sin(x)y'-\sin(x)y=\sin(x) }[/math]
which rearranged is
- [math]\displaystyle{ (\sin(x)y)''=\sin(x) }[/math]
Integrating twice gives
- [math]\displaystyle{ \sin(x)y=-\sin(x)+c_1x+c_2 }[/math]
Finally, dividing by the integrating factor gives
- [math]\displaystyle{ y=c_1x\csc(x)+c_2\csc(x)-1 }[/math]
Solving nth order linear differential equations
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 [math]\displaystyle{ M(x)y }[/math] [math]\displaystyle{ n }[/math] times for an [math]\displaystyle{ n }[/math]th order differential equation and combine like terms. This will yield an equation in the form
- [math]\displaystyle{ M(x)F\!\left(y,y',y'',\ldots,y^{(n)}\right) }[/math]
If an [math]\displaystyle{ n }[/math]th order equation matches the form [math]\displaystyle{ F\!\left(y,y',y'',\ldots,y^{(n)}\right) }[/math] that is gotten after differentiating [math]\displaystyle{ n }[/math] times, one can multiply all terms by the integrating factor and integrate [math]\displaystyle{ h(x)M(x) }[/math] [math]\displaystyle{ n }[/math] times, dividing by the integrating factor on both sides to achieve the final result.
Example
A third order usage of integrating factors gives
- [math]\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) }[/math]
thus requiring our equation to be in the form
- [math]\displaystyle{ y''' + 3p(x)y'' + \left(3p(x)^2+3p'(x)\right)y' + \left(p(x)^3+3p(x)p'(x)+p''(x)\right)y = h(x) }[/math]
For example in the differential equation
- [math]\displaystyle{ y''' + 3x^2y'' + \left(3x^4+6x\right)y' + \left(x^6+6x^3+2\right)y = 0 }[/math]
we have [math]\displaystyle{ p(x)=x^2 }[/math], so our integrating factor is [math]\displaystyle{ e^{x^3/3} }[/math]. Rearranging gives
- [math]\displaystyle{ \left(e^{x^3/3}y\right)'''=0 }[/math]
Integrating thrice and dividing by the integrating factor yields
- [math]\displaystyle{ y=\frac{c_1x^2+c_2x+c_3}{e^{x^3/3}} }[/math]
See also
- Variation of parameters
- Differential equations
- Product rule
- Quotient rule
- Exact differential
- Matrix exponential
References
- Munkhammar, Joakim, "Integrating Factor", MathWorld, http://mathworld.wolfram.com/IntegratingFactor.html.
de:Exakte Differentialgleichung
![]() | Original source: https://en.wikipedia.org/wiki/Integrating factor.
Read more |