Tag Archives: integrating factor

Differential Equations: Worked Examples Using Integrating Factor

$$\frac{dy}{dx} – 2y = 3x + 1$$
$$e^{ \int \! -2 \ dx } = e^{-2x}$$
$$e^{-2x} \frac{dy}{dx} – 2 e^{-2x} y = e^{-2x} \left( 3x + 1 \right)$$
$$\frac{d}{dx} \left( e^{-2x} y \right) = 3 x e^{-2x} + e^{-2x}$$
$$e^{-2x} y + C = \int \! 3 x e^{-2x} \ dx + \int \! e^{-2x} \ dx$$
$$e^{-2x} y = \int \! 3 x e^{-2x} \ dx – \frac{1}{2}e^{-2x} + K \ \ where \ \ K = \left( C_0 – C \right)$$

\( \int \! 3 x e^{-2x} \ dx \)

\( u = 3x \)

\( du = 3 \ dx \)

\( dv = e^{-2x} \ dx \)

\( v = – \frac{1}{2}e^{-2x}\)

\( \int \! 3 x e^{-2x} \ dx = – \frac{3}{2}xe^{-2x} + \int \! \frac{3}{2}e^{-2x} \ dx \)

\( \int \! 3 x e^{-2x} \ dx = – \frac{3}{2}xe^{-2x} – \frac{3}{4}e^{-2x} + C_1 \)

$$e^{-2x} y = – \frac{3}{2}xe^{-2x} – \frac{5}{4}e^{-2x} + C_2 \ \ where \ \ C_2 = \left( K + C_1 \right)$$
$$y \left( x \right) = – \frac{3}{2}x – \frac{5}{4} + C_2e^{2x}$$

 

$$\frac{dy}{dx} + \cos \left(x \right) y = \cos x$$
$$\mu = e^{ \int \! \cos x \ dx } = e^{ \sin x }$$
$$e^{ \sin x } \frac{dy}{dx} + e^{ \sin x } \cos \left(x \right) y = e^{ \sin x } \cos x$$
$$\frac{d}{dx} \left( e^{ \sin x } y \right) = e^{ \sin x } \cos x$$
$$\left( e^{ \sin x } y \right) = \int \! e^{ \sin x } \cos x \ dx + C$$

\( v = \sin x \)

\( dv = \cos x \ dx \)

\( \int \! e^v \ dv = e^v + K = e^{ \sin x } + C_1\)

$$\left( e^{ \sin x } y \right) = e^{ \sin x } + C_1 + C = e^{ \sin x } + C_2$$
$$y \left( x \right) = 1 + C_2 e^{ – \sin x }$$

Using the Integrating Factor

Let \( g \) and \( h \) be continuous functions. The form of the following first order linear differential equation is solvable using an integrating factor.

$$\frac{dy}{dx} + g y = h$$

The left side of the equation almost looks like the result of the product rule. For example, if \(j\left(x \right) = \mu \left(x \right) y\left(x \right)\) then

$$\frac{dj}{dx} = \mu \frac{dy}{dx} + \frac{d \mu }{dx} y$$

Comparing

\( \frac{dy}{dx} + g y \)         to         \( \mu \frac{dy}{dx} + \frac{d \mu }{dx} y \)

suggests that if there exists a function \( \mu \left(x \right) \) such that

$$\frac{d \mu}{dx} = \mu g$$

then multiplying both sides of the original differential equation by \( \mu \left(x \right) \) yields

$$\mu \frac{dy}{dx} + \mu g y = \mu h$$

and since \(\frac{d \mu}{dx} = \mu g \)

$$\mu \frac{dy}{dx} + \mu g y = \frac{d \mu}{dx} y + \mu \frac{dy}{dx} = \frac{d}{dx} \left( \mu y \right)$$

which yields the integrable equation

$$\frac{d}{dx} \left( \mu y \right) = \mu h$$

Integrating yields a formula the for the solution to the differential equation in question

$$y = \frac{1}{\mu} \left( \int \! \mu h \ dx + C \right)$$

If this formula is to be of any practical use \( \mu \) must be determined. Recall that

$$\frac{d \mu}{dx} = \mu g$$

which is a separable differential equation. Therefore,

$$\mu = e^{ \int \! g\left(x \right) \ dx + K} = A e^{ \int \! g\left(x \right) \ dx}$$

Since the arbitrary constant will not affect the final answer it is convention to let \( A = 1 \). \( \mu \) is called the integrating factor. Substituting \( \mu \) into the general solution yields

$$y\left(x \right) = e^{ -\int \! g\left(x \right) \ dx} \left( \int \! e^{ \int \! g\left(x \right) \ dx} h\left(x \right) \ dx + C \right)$$