First Order Linear Differential Equations

A review of how to solve first order linear equations by use of an integrating factor.

The Essentials

First order linear differential equations can be written in the form:

\[ \frac{dy}{dx} + p(x)y = f(x) \]

After the equation is in this form, multiply both sides of the equation by the integration factor mu (μ) where mu is:

\[ \mu = e^{\int p(x) \, dx} \] \[ \mu \frac{dy}{dx} + \mu p(x)y = \mu f(x) \]

Next, recognize that the left hand side can be written as the result of the product rule for derivatives:

\[ \frac{d}{dx} (\mu y) = \mu f(x) \]

Then, integrate to get rid of the derivative and solve for y:

\[ \int \frac{d}{dx} (\mu y) \, dx = \int \mu f(x) \, dx \] \[ \mu y = \int \mu f(x) \, dx \] \[ y(x) = \frac{\int \mu f(x) \, dx}{\mu} \]

Example

Solve the equation:

\[ x \frac{dy}{dx} = 20x^2 + 3y \]

First, we put the equation in standard form:

\[ \frac{dy}{dx} - \frac{3}{x} y = 20x \]

Our p is \( p(x) = −\frac{3}{x} \), so our integrating factor is:

\begin{align*} e^{\int p(x) \, dx} &= e^{\int - \frac{3}{x} \, dx} \\ &= e^{-3 \ln(x)} \\ &= x^{-3} \end{align*}

Then, we multiply through by the integrating factor:

\[ x^{-3} \frac{dy}{dx} - 3x^{-4}y = 20x^{-2} \]

Next, we recognize that the left hand side is the result of the product rule for differentiation:

\[ \frac{d}{dx} (x^{-3}y) = 20x^{-2} \]

And Finally, we integrate and solve for \( y(x) \)

\[ \int \frac{d}{dx} (x^{-3}y) \, dx = \int 20x^{-2} \, dx \] \[ x^{-3}y = -20x^{-1} + C \] \[ y(x) = -20x^2 + Cx^3 \]

Practice

Evaluate these expressions:

  1. \( \frac{dy}{dx} + 3y = 12 \)
  2. \( x \frac{dy}{dx} = \sqrt{x} + 2y \)
  3. \( \cos(x) \frac{dy}{dx} = \cos^2(x) - \sin(x)y \)

Solution:

  1. \( y(x) = 4 + Ce^{-3x} \)
  2. \( Cx^2 - \frac{2}{3} \sqrt{x} \)
  3. \( x \cos(x) + C \cos(x) \)