Skip to main content

First order linear

First order linear differential equations are are widely used in various fields, such as physics, engineering, and biology, to model processes like cooling, population growth, and electrical circuits. Understanding how to solve first order linear differential equations helps you analyse and predict the behavior of systems in the real world.

First order linear differential equations

An equation is considered to be a first order linear differential equation if it can be written in the standard form:

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

The variables in this type of equation cannot be separated into opposite sides of the equation.

Integrating factor

To solve first order linear differential equations, we use the integrating factor method. The integrating factor is often denoted by \(I\).

  1. Rearrange the equation into the standard form \(\dfrac{dy}{dx}+p(x)y=q(x)\).
  2. Let the integrating factor \(I=e^{\int p(x)dx}\).
  3. Multiply both sides by \(I\) to get \(yI=\int(I\times q(x))dx\).
  4. Integrate both sides and solve for \(y\).
  5. If a coordinate is provided, find the particular solution.

Example – solving first order linear differential equations

Solve for \(y(x)\) give \(\dfrac{dy}{dx}+5y=e^{2x}\) and \(y(0)=0\).

The equation is already in the standard form, so we let \(p(x)=5\) and \(q(x)=e^{2x}\).

Since \(I=e^{\int p(x)dx}\) and \(\int p(x)dx=5x\), then \(I=e^{5x}\).

We can substitute this into \(yI=\int(I\times q(x)dx\) and solve for \(y\).
\[\begin{align*} ye^{5x} & = \int e^{5x}\times e^{2x}dx\\
& = \int e^{7x}dx\\
& = \frac{1}{7}e^{7x}+c,\,c\in\mathbb{R}\\
y & = \frac{1}{7}e^{2x}+ce^{-5x}
\end{align*}\]

We know that \(y(0)=0\), so we can find the particular solution.
\[\begin{align*} 0 & = \frac{1}{7}e^{0}+ce^{0}\\
& = \frac{1}{7}+c\\
c & = -\frac{1}{7}
\end{align*}\]

The solution is \(y=\dfrac{1}{7}e^{2x}-\dfrac{1}{7}e^{-5x}\).

Exercise – solving first order linear differential equations

  1. Find the general solution for the following.
    1. \(3\dfrac{dy}{dx}+12y=4\)
    2. \(x\dfrac{dy}{dx}+2y=3\)
    3. \(\dfrac{dy}{dx}+y=e^{3x}\)
    4. \(y'+3x^{2}y=x^{2}\)
    5. \(x^{2}y'+xy=1\)
    6. \(xdy=(x\sin(x)-y)dx\)
    7. \(\cos(x)\dfrac{dy}{dx}+y\sin(x)=1\)
    8. \(x\dfrac{dy}{dx}+4y=x^{3}-x\)
  2. Find the particular solution for the following.
    1. \(\dfrac{dy}{dx}+2xy=x\) where \(y(0)=-3\)
    2. \(\cos^{2}x\dfrac{dy}{dx}+y=1\) where \(y(0)=-3\)

    1. \(y=\dfrac{1}{3}+ce^{-4x}\)
    2. \(y=\dfrac{3}{2}+cx^{-2}\)
    3. \(y=\dfrac{1}{4}e^{3x}+ce^{-x}\)
    4. \(y=\dfrac{1}{3}+ce^{-x^{3}}\)
    5. \(y=x^{-1}\ln(x)+cx^{-1}\)
    6. \(y=-\cos(x)+\dfrac{\sin(x)}{x}+cx^{-1}\)
    7. \(y=\sin(x)+c\cos(x)\)
    8. \(y=\dfrac{1}{7}x^{3}-\dfrac{1}{5}x+cx^{-4}\)
    1. \(y=\dfrac{1}{2}-\dfrac{7}{2}e^{-x^{2}}\)
    2. \(y=1-4e^{-\tan(x)}\)