First-order differential equations
First-order linear equations
General form
A first-order linear differential equation is written as: y' + a(x) * y = b(x) where a and b are continuous functions on an interval I. The case where b(x) = 0 is called homogeneous (or without a right-hand side).
Solving the homogeneous equation
We first solve y' + a(x) * y = 0, which is separable: y'/y = -a(x) -> ln|y| = -A(x) + C, where A is an antiderivative of a Hence y_h(x) = K * exp(-A(x)), where K is a real number.
Method of Variation of a Constant
To find a particular solution to the complete equation, we set y(x) = K(x) * exp(-A(x)), where K(x) becomes a function. Substituting this into the equation, the term K * y_h cancels out (since y_h is a solution to the homogeneous equation), leaving: K'(x) = b(x) * exp(A(x)) We integrate to obtain K(x), then y(x).
Example
Solve y' + 2y = e^(-x). Homogeneous equation: y_h = K * exp(-2x). Differentiation: , so . General solution: y(x) = (e^x + C) * e^(-2x) = e^(-x) + C * e^(-2x)
Summary table
| Step | Action |
|---|---|
| 1 | Solve the associated homogeneous equation |
| 2 | Apply the variation of the constant |
| 3 | Integrate K'(x) to obtain K(x) |
| 4 | Write y = K(x) * y_h(x) |
Pitfall: do not forget the correct factor exp(A(x)) – a sign error in a(x) reverses the entire calculation and gives a false solution.

