First-order differential equations
First-order linear differential equations
A first-order linear differential equation is one of the type
where \(p(x)\) and \(q(x)\) are given functions, which may be assumed to be continuous. The equation is called nonhomogeneous unless \(q(x)\) is dentically zero. The corresponding homogeneous equation
is separable and so is easily solved. By seperation of variables
Though, pay attention to absolute values.
There are two methods for solving nonhomogeneous equations.
Integration factor
The first method is by using an integrating factor. Let \(\mu(x)\) be an antiderivative of \(p(x)\) and multiply the equation by \(e^{\mu(x)}\).
Variation of the constant
The second method is by using a variation of a constant. Let \(\mu(x)\) be an antiderivative of \(p(x)\) and solve the homegeneous equation
Try:
thus \(k'(x) = q(x) e^{\mu(x)}\).
Example
Solve \(\frac{dy}{dx} + 2xy = x\) with \(y(0) = 3\).
First solving the homogeneous equation