The only way to learn mathematics is to do mathematics, Paul Halmos.
Definition. A first-order linear ordinary differential equation is an ODE involving an unknown function $y(x)$, its first derivative $y'$, and functions of the independent variable $x$. It can be written in the general form: $a(x)y' + b(x)y = c(x)$ where:
These equations are termed linear because the unknown function $y$ and its derivative $y'$ appear only to the first power. They are never multiplied together (e.g., $yy'$), squared (e.g., $(y')^2$), or composed inside other functions in any nonlinear way (e.g., $\sin(y)$ or $e^y$).
By dividing the entire equation by $a(x)$ (assuming $a(x) \neq 0$), we get the Standard Form: $y' + p(x)y = q(x)$
If the function $q(x) = 0$ for all $x$ in the interval of interest, the equation simplifies to $y' + p(x)y = 0$, which is called a homogeneous linear differential equation.
If the functions $p(x)$ and $q(x)$ are continuous on an open interval $I$ containing the point $x_0$, then the initial value problem $y' + p(x)y = q(x)$ with $y(x_0) = y_0$ has a unique solution that exists on the entire interval $I$.
This is a powerful guarantee: the solution will not blow up or behave unpredictably as long as the coefficients $p(x)$ and $q(x)$ remain continuous.

Let’s look at a linear inhomogeneous differential equation with a constant coefficient $k$ and an independent variable $t$ (often representing time): $y' + ky = q(t)$ where:
Our goal is to find the general solution, which consists of two parts: the complementary solution $y_c$ and the particular solution $y_p$.
Step 1: Solving the Homogeneous Equation
The homogeneous equation corresponding to the given differential equation is obtained by setting the inhomogeneous term q(t) = 0: $y' + ky = 0$. This equation describes the system’s natural, unforced behavior. We solve it using separation of variables:
Step 1. Solving the Homogeneous Equation.$ y' + ky = 0 \implies \frac{dy}{dt} = -ky$.
To solve this, we separate variables: $\frac{dy}{y}=-kdt$.
Integrate both sides: $\int \frac{dy}{y} = \int -kdt$. $\ln|y| = -kt + C_1$ where $C_1$ is the constant of integration.
Exponentiate both sides to solve for $y$: $|y| = e^{-kt + C_1} = e^{C_1}e^{-kt}$.
Let $C = \pm e^{C_1}$. Thus, the complementary solution is: $y_c(t) = Ce^{-kt}$ where C is an arbitrary constant determined by the initial conditions of the system.
Step 2: Solving the Inhomogeneous Equation
To find a particular solution $y_p(t)$ to the inhomogeneous equation $y' + ky = q(t)$, we use the Method of Integrating Factors.
The integrating factor, $\mu(t)$, is defined as $e^{\int p(t)dt}$. Since our $p(t)$ is just the constant $k$, the integrating factor is: $\mu(t) = e^{\int k dt} = e^{kt}$
Multiply every term in the original standard-form equation by $e^{kt}$: $e^{kt}y' + ke^{kt}y = e^{kt}q(t)$
This simplifies the left-hand side to: $\frac{d}{dt}(e^{kt}·y)=e^{kt}q(t)$.
Now, integrate both sides with respect to $t$: $e^{kt}y = \int e^{kt}q(t)dt$
Divide by $e^{kt}$ to isolate $y$, and it yields the particular solution: $y_p(t) = e^{-kt}\int e^{kt}q(t)dt$
Step 3: Writing the General Solution
The general solution to the linear inhomogeneous differential equation of the form is the sum of the complementary and particular solution:$y(t) = y_c(t) + y_p(t) = Ce^{-kt} + e^{-kt}\int e^{kt}q(t)dt$.
This structure holds deep physical significance:
Understanding the limit of $y(t)$ as time progresses helps us interpret the physical implications of the constant $k$.
Case 1: $k > 0$ (Stable System)
If $k$ is positive, the exponential term $e^{-kt}$ decays to zero as $t \to \infty$.
Then, $\lim_{t \to \infty} y_c(t) = \lim_{t \to \infty} Ce^{-kt} = 0$
In this scenario, the complementary solution acts as a transient state that eventually fades away. Over time, the system “forgets” its initial conditions, and the solution $y(t)$ is entirely dominated by the particular solution $y_p(t)$ (the steady-state response driven by $q(t)$).
Case 2: $k < 0$ (Unstable System)
If $k$ is negative, the exponent $-kt$ becomes positive. As $t \to \infty$, the term $e^{-kt}$ grows exponentially.
Then, $\lim_{t \to \infty} y_c(t) = \lim_{t \to \infty} Ce^{-kt} = \infty \quad \text{(assuming) } C > 0)$
Here, the transient part of the solution grows without bound. The system exhibits explosive instability, and the initial conditions dominate the long-term behavior. The external forcing term $q(t)$ becomes negligible (it has little effect on the long-term behaviour) in comparison to the rapidly growing homogeneous response.
Solve: $y' + 2y = e^{3t}$
Step 1: Solve the Homogeneous Equation. The homogeneous equation is obtained by setting the right-hand side (the forcing term) to zero: $y' + 2y = 0$.
Separate Variables: $\frac{dy}{dt} = -2y \implies \frac{dy}{y} = -2dt$
Integrate both sides: $\int \frac{dy}{y} = \int-2dt ⇒ ln|y| = -2t + C'$
Solve for y. Exponentiate both sides to isolate y: $|y| = e^{-2t+C'} = C''e^{-2t}$ where $C'' = e^{C'}$. $y = \pm C''e^{-2t} = Ce^{-2t}$ where C = ±C’’(an arbitrary constant).
Complementary Solution: $y_c(t) = Ce^{-2t}$
Step 2: Find a Particular Solution
We will use the method of integrating factors to find a particular solution $y_p(t)$.
Compute the Integrating Factor: $μ(t) = e^{\int 2dt} = e^{2t}$
Multiply Both Sides. Multiply the original non-homogeneous equation by $e^{2t}$: $e^{2t}y' + 2e^{2t}y = e^{2t}e^{3t}$
Simplify Left-Hand Side. Recognize that the left side is the expanded product rule of $(e^{2t}y)$. $\frac{d}{dt}(e^{2t}y) = e^{5t}$
Integrate both sides: $e^{2t}y = \int e^{5t}dt + C ↭ e^{2t}y = \frac{1}{5}e^{5t} + C$. We ignore the constant of integration here because it is already accounted for in the complementary solution.
Solve for $y_p(t)$: Divide by $e^{2t}$: $y_p(t) = e^{-2t} \left( \frac{1}{5}e^{5t} \right) = \frac{1}{5}e^{3t}$
Step 3: Write the General Solution
The general solution is the sum of the complementary and particular solutions: $\boxed{y(t) = y_c(t) + y_p(t) = Ce^{-2t} + \frac{1}{5}e^{3t}}$.
Step 4: Analysis of the solution
Solve: $y' + 2ty = 4t$
Step 1: Solve the Homogeneous Equation. Write the Homogeneous Equation by dropping the forcing term: y’ + 2ty = 0.
Separate Variables: $\frac{dy}{dt} = -2ty ⇒ \frac{dy}{y} = -2tdt$
Integrate both sides: $\int \frac{dy}{y} = \int-2tdt \implies ln|y| = -t^2 + C'$
Solve for y: $|y| = e^{-t^2+C'} = C''e^{-t^2}$ where C’’ = eC’. $y = ± C''e^{-t^2} = Ce^{-t^2}$ where C = ±C’'.
Complementary Solution: $y_c(t) = Ce^{-t^2}$
Step 2: Find a Particular Solution. We will use the method of integrating factors.
Compute the Integrating Factor: $μ(t) = e^{\int 2tdt} = e^{t^2}$
Multiply Both Sides. Multiply the original equation by $e^{t^2}$: $e^{t^2}y' + 2te^{t^2}y = 4te^{t^2}$
Simplify Left-Hand Side: $\frac{d}{dt}(e^{t^2}y) = 4te^{t^2}$
Integrate both sides: $e^{t^2}y = \int 4te^{t^2} dt$
Use $u$-substitution: Let $u = t^2$, then $du = 2t dt$. The integral becomes: $\int 2(2t e^{t^2}) dt = \int 2e^u du = 2e^u = 2e^{t^2}$.
So, $e^{t^2}y = 2e^{t^2}$
Solve for $y_p(t)$: Divide both sides by $e^{t^2}$. $y_p(t) = 2$ Ignoring the constant C (it will be accounted for in the complementary solution).
Step 3: Write the General Solution.
Combine the complementary and particular solutions: $\boxed{y(t) = y_c(t) + y_p(t) = Ce^{-t^2} + 2}$ where C is a constant determined by initial or boundary conditions.
Step 4. Analysis of the Solution
Complementary Solution ($Ce^{-t^2}$): This decays to zero as $t \to \infty$ because $e^{-t^2}$ decreases exponentially (and does so much faster than a standard exponential function).
Particular Solution ($2$): The particular solution is a constant. It represents the steady-state response to the forcing term $4t$ acting against the dampening term $2ty$.
Overall Behavior: As time progresses ($t \to \infty$), the initial conditions are “forgotten” as the transient term vanishes. The system approaches a stable equilibrium. Therefore, $y(t) \approx 2$ as $t \to \infty$.