Table of Contents
Last modified on February 14th, 2025
A first-order linear differential equation is a differential equation of the form:
${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
Here,
It belongs to the first order because it involves the first derivative ${\dfrac{dy}{dx}}$ and is linear since the dependent variable y has the degree of 1 (there are no powers or products of y).
Let us imagine a cup of hot coffee cooling in a room. According to Newton’s Law of Cooling, the rate at which its temperature changes is described by the equation:
${\dfrac{dT}{dt}+kT=kT_{room}}$
This equation is a first-order linear differential equation. Solving it allows us to determine how long it takes for the coffee to reach room temperature.
First-order differential equations can be broadly grouped into two types: homogeneous and non-homogeneous.
A first-order linear differential equation is homogeneous if the function Q(x) = 0, which reduces to:
${\dfrac{dy}{dx}+P\left( x\right) y=0}$
For example, ${\dfrac{dy}{dx}+3y=0}$
The solution of a homogeneous first-order linear differential equation is obtained by using the separation of variables or the integrating factor method.
A first-order linear differential equation is non-homogeneous if Q(x) ≠ 0, which means that the system includes an external forcing function:
${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
For example, ${\dfrac{dy}{dx}+2y=e^{x}}$
The solution of a non-homogeneous first-order linear differential equation involves the integrating factor method.
The standard method to solve a first-order differential equation is the integrating factor method.
To solve a first-order linear differential equation:
${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
We multiply both sides by an unknown function I(x), called the integrating factor, chosen such that the left-hand side transforms into a derivative of a product.
This integrating factor is derived as follows.
Rewriting the given equation,
${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
On multiplying by the integrating factor I(x),
⇒ ${I\left( x\right) \dfrac{dy}{dx}+I\left( x\right) P\left( x\right) y=I\left( x\right) Q\left( x\right)}$ …..(i)
Now, we define I(x) in such a way that the left-hand side becomes a derivative of yI(x):
${\dfrac{d}{dx}\left( yI\left( x\right) \right) =I\left( x\right) \dfrac{dy}{dx}+y\dfrac{d}{dx}I\left( x\right)}$ …..(ii)
Comparing the left-hand side of equations (i) and (ii), we get
${I\left( x\right) P\left( x\right) y=y\dfrac{d}{dx}I\left( x\right)}$
On dividing both sides by y (here, y ≠ 0), we get
⇒ ${I\left( x\right) P\left( x\right) =\dfrac{d}{dx}I\left( x\right)}$
This is a separable differential equation.
⇒ ${\dfrac{dI\left( x\right) }{I\left( x\right) }=P\left( x\right) dx}$
Now, integrating both sides,
⇒ ${\int \dfrac{dI\left( x\right) }{I\left( x\right) }=\int P\left( x\right) dx}$
⇒ ${\ln I\left( x\right) =\int P\left( x\right) dx}$
Taking exponentials on both sides,
I(x) = ${e^{\int P\left( x\right) dx}}$
⇒ I(x) = ${e^{\int Pdx}}$, which is the integrating factor.
Now, by using this integrating factor, we solve the differential equation ${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
Multiplying the equation by the integrating factor I(x),
⇒ ${e^{\int Pdx}\dfrac{dy}{dx}+Pe^{\int Pdx}y=Qe^{\int Pdx}}$
Here, we observe that the left-hand side is the derivative of yI(x).
⇒ ${\dfrac{d}{dx}\left( ye^{\int Pdx}\right) =Qe^{\int Pdx}}$
Now, integrating both sides with respect to x, we get
⇒ ${ye^{\int Pdx}=\int Qe^{\int Pdx}dx+C}$
Solving for y,
⇒ ${y=\dfrac{1}{e^{\int Pdx}}\left( \int Qe^{\int Pdx}dx+C\right)}$, where C is some integrating constant.
Problem: SOLVING a first-order linear differential equation by the INTEGRATING FCTOR METHOD
Solve: ${\dfrac{dy}{dx}+2y=e^{x}}$, where y is the function of x.
Given, ${\dfrac{dy}{dx}+2y=e^{x}}$
Step 1: Deriving Integrating Factor
First, we will identify the structure with the general form.
Before applying the integrating factor method, we must confirm that the given equation is in the standard form:
${\dfrac{dy}{dx}+P\left( x\right) y=Q\left( x\right)}$
Comparing with our given equation, we get
P(x) = 2 and Q(x) = ex
Since it is already in the standard form, we proceed to the next step.
[Note: If the equation is not in this form, we will rearrange it first.]
Now, we calculate the integrating factor I(x):
To transform the left-hand side of the equation as a derivative, we use the integrating factor:
I(x) = ${e^{\int p\left( x\right) dx}}$
Since P(x) = 2, we get
⇒ I(x) = ${e^{\int 2dx}}$ = e2x
Step 2: Solving
On multiplying every term in the equation by e2x,
⇒ ${e^{2x}\dfrac{dy}{dx}+2e^{2x}y=e^{2x}e^{x}}$
⇒ ${e^{2x}\dfrac{dy}{dx}+2e^{2x}y=e^{3x}}$
Now, the left-hand side can be written as a single derivative of a product.
⇒ ${\dfrac{d}{dx}\left( e^{2x}y\right) =e^{3x}}$
Now, we integrate both sides:
⇒ ${\int \dfrac{d}{dx}\left( e^{2x}y\right) dx=\int e^{3x}dx}$
⇒ ${e^{2x}y=\int e^{3x}dx}$
⇒ ${e^{2x}y=\dfrac{e^{3x}}{3}+C}$
Here, C is the integrating constant.
To isolate y, we divide both sides by e2x:
⇒ ${y=\dfrac{1}{e^{2x}}\left( \dfrac{e^{3x}}{3}+C\right)}$
⇒ ${y=\dfrac{e^{x}}{3}+Ce^{-2x}}$, which is the general solution.
Verifying the Solution
Differentiating y = e-x + Ce-2x,
${\dfrac{dy}{dx}=-e^{-x}-2Ce^{-2x}}$
Now, substituting ${\dfrac{dy}{dx}}$ into the original equation, we get
${\dfrac{dy}{dx}+2y=e^{x}}$
(-e-x – 2Ce-2x) + 2(e-x + Ce-2x) = e-x
⇒ -e-x – 2Ce-2x + 2e-x + 2Ce-2x = e-x
⇒ e-x = e-x
Since both sides are equal, our solution is verified.
We can also solve homogeneous first-order linear differential equations using another method called the separation of variables. In this method, we separate each variable on each side of the equation.
Problem: SOLVING a first-order linear differential equation by the SEPARATION OF VARIABLES METHOD
Solve the equation: ${\dfrac{dy}{dx}+3y=0}$
Given, ${\dfrac{dy}{dx}+3y=0}$
Step 1: Rewriting the Equation by Separating the Variables
Isolating the derivative, we get
⇒ ${\dfrac{dy}{dx}=-3y}$
Keeping all terms involving y on one side and all terms involving x on the other,
⇒ ${\dfrac{dy}{y}=-3dx}$
Step 2: Integrating Both Sides
Now, we integrate both sides:
${\int \dfrac{dy}{y}=\int -3dx}$
⇒ ln|y| = -3x + C
Step 3: Solving for y(x)
Exponentiating both sides to isolate y and remove the logarithm, we get
⇒ y = Ce-x, which is the general solution.
Sometimes, we need to find a specific solution that satisfies an initial condition, usually given as y(x0) = y0. This condition helps us to determine the constant C in the general solution, which gives a unique solution.
Let us now solve a first-order linear differential equation with an initial condition and determine the unique solution.
Solve: ${\dfrac{dy}{dx}+2y=e^{x}}$ with y(0) = 1
Here, for specific solutions, we solve the IVP by substituting the given conditions into the general solution.
Step 1: Finding the General Solution
As we know from the integrating factor method:
The general solution of ${\dfrac{dy}{dx}+2y=e^{x}}$ is ${y=\dfrac{e^{x}}{3}+Ce^{-2x}}$
Step 2: Applying the Initial Condition
To find C, we substitute x = 0 and y(0) = 1:
${1=\dfrac{e^{0}}{3}+Ce^{0}}$
⇒ ${1=\dfrac{1}{3}+C}$
Step 3: Solving for C
⇒ ${C=1-\dfrac{1}{3}}$
⇒ ${C=\dfrac{2}{3}}$
Step 4: Writing the Unique Solution
Thus, the unique solution to the initial value problem y(0) = 1 is: ${y=\dfrac{e^{x}}{3}+\dfrac{2}{3}e^{-2x}}$
Last modified on February 14th, 2025