First-Order Linear Differential Equations
A differential equation is linear if it can be written in the form $$ y' + a(x)y = b(x) $$ where \( a(x) \) and \( b(x) \) are continuous functions defined on some interval.
The equation is said to be homogeneous if \( b(x) = 0 \): $$ y' + a(x)y = 0 $$
It is called nonhomogeneous (or complete) if \( b(x) \ne 0 \).
Solving First-Order Linear Differential Equations
The general solution to a first-order linear differential equation of the form \( y' + a(x)y = b(x) \) is given by: $$ y = e^{-\int a(x)\, dx} \int b(x)\, e^{\int a(x)\, dx} dx + c $$
If the equation is homogeneous (i.e., \( b(x) = 0 \)), the solution simplifies to: $$ y = k\, e^{-\int a(x)\, dx} $$ where \( k \in \mathbb{R} \) is an arbitrary constant.
Examples
Example 1
Consider the homogeneous linear differential equation: $$ y' = x^2 y $$
We first express it in standard form: $$ y' - x^2 y = 0 $$
Here, \( a(x) = -x^2 \).
Applying the general formula for the homogeneous case:
$$ y = k\, e^{-\int a(x)\, dx} = k\, e^{-\int (-x^2)\, dx} = k\, e^{\int x^2\, dx} $$
Evaluating the integral: $$ y = k\, e^{\frac{x^3}{3}} $$
Example 2
Now consider the nonhomogeneous equation: $$ y' = -\frac{y}{x} + 2x $$
Rewriting it in standard form: $$ y' + \frac{1}{x} y = 2x $$
We identify \( a(x) = \frac{1}{x} \), \( b(x) = 2x \).
We apply the general solution formula:
$$ y = e^{-\int \frac{1}{x}\, dx} \int 2x\, e^{\int \frac{1}{x}\, dx} dx + c $$
Evaluating the integrals: $$ y = e^{-\log x} \int 2x\, e^{\log x} dx + c $$
Since \( e^{\log x} = x \), we have:
$$ y = \frac{1}{x} \int 2x^2\, dx + c $$
Now integrate: $$ y = \frac{1}{x} \left( \frac{2x^3}{3} + c \right) $$
Simplifying the expression: $$ y = \frac{2x^2}{3} + \frac{c}{x} $$
And so on.
