Maths › Differential equations › First order equations and integrating factors
First order equations and integrating factors
Put a linear first-order equation in the form y′ + P(x)y = Q(x). Multiplication by the integrating factor exp(∫P dx) makes the left-hand side the derivative of a product. Integrate, include the constant, then apply the initial condition on an interval where the coefficients are defined.
Builds on Solving differential equations and The product, quotient and chain rules.
IN THIS TOPIC
- Recognise the linear form dy/dx + P(x)y = Q(x) and rearrange into it.
- Build the integrating factor and collapse the left side to one derivative.
- Sketch members of the family of solution curves a general solution describes.
- Fix the constant from a boundary condition and check by substituting back.
- Read a value or the long-term behaviour off the particular solution.
COMMON MISCONCEPTION
If the variables in a first order equation do not separate, the equation cannot be solved.
Any linear first order equation dy/dx + P(x)y = Q(x) can be solved whether or not it separates. Multiply through by the integrating factor e∫P dx, chosen so that the left-hand side becomes d(IF × y)/dx by the product rule, then integrate both sides. For dy/dx + y/x = x the factor is x, giving d(xy)/dx = x2 and y = x2/3 + c/x.
The integrating factor
Separation of variables applies only in special cases. Any linear equation dy/dx + P(x)y = Q(x), separable or not, can be solved by multiplying both sides by the integrating factor:
This multiplier is chosen so that the left-hand side becomes the derivative of a product: after multiplying, it equals d(IF × y)/dx by the product rule, so both sides can be integrated directly. On an interval where P and Q are continuous, the initial-value problem y′ + P(x)y = Q(x), y(x₀) = y₀, has a unique solution.
WORKED EXAMPLE
A full solution, checked
Solve dy/dx + y/x = x for x > 0, given y(1) = 1.
P = 1/x, so IF = eln x = x.
Multiplying through gives x dy/dx + y = x², whose left side is d(xy)/dx.
Integrating gives xy = x³/3 + c, so y = x²/3 + c/x. With y(1) = 1, 1 = 1/3 + c and c = 2/3.
y = x²/3 + 2/(3x). Substituting back: dy/dx + y/x = (2x/3 − 2/(3x²)) + (x/3 + 2/(3x²)) = x, as required. The coefficients 1/x and x are continuous on x > 0, which contains the initial point x = 1, so this solution is unique there.
The answer with the constant still present is the general solution. Each value of the constant gives a different curve, so the general solution describes a family of solution curves. A question may ask for two or three members of the family sketched on one set of axes.
What the constant does to the picture depends on where it sits. When it is simply added on, as in y = F(x) + c, changing c slides the entire curve up or down the page, so the members are the same shape at different heights and no two of them ever cross. When it multiplies a term, as in y = x²/3 + c/x, the shape changes as well, and negative values of c bend the curve the other way near the origin. Either way, exactly one member passes through any given point on an interval where P and Q are continuous, and the boundary condition determines it. That single curve is the particular solution.
Constant coefficients and long-term behaviour
For constants p > 0 and q, the equation y′ + py = q has solution y = q/p + Ce−px; q/p is the equilibrium and the transient Ce−px tends to zero. So every solution of dy/dx + 3y = 6 tends to y = 2 whatever the initial value, approaching it from above when C > 0 and from below when C < 0. For variable Q(x), a particular solution need not be constant, and this description does not apply.
WORKED EXAMPLE
Steady state plus transient
Solve dy/dx + 3y = 6.
IF = e3x, so the equation becomes d(e3xy)/dx = 6e3x.
Integrating both sides gives e3xy = 2e3x + C.
y = 2 + Ce−3x: the equilibrium value 2 plus a transient that decays with time constant 1/3.
GUIDED PRACTICE
An exponential right-hand side
Solve dy/dx + 2y = e−x.
Show the working
IF = e2x, so d(e2xy)/dx = e2x × e−x = ex.
Integrating gives e2xy = ex + C.
y = e−x + Ce−2x. Check: dy/dx + 2y = (−e−x − 2Ce−2x) + (2e−x + 2Ce−2x) = e−x.
ASSESSMENT FOCUS
- Divide through first so that the coefficient of dy/dx is 1: the formula for the integrating factor assumes that form.
- No constant is needed inside the exponential; any choice cancels.
- After integrating, divide by the integrating factor before applying the boundary condition.
- A sketch of the family should show at least two members and any shared asymptote, labelled.
- Substitute the final answer back into the equation as a check, and state the interval on which P and Q are continuous.
CHECK YOURSELF
Write down the integrating factor for dy/dx + 2xy = x, and the equation it produces.
Show a hint
∫2x dx = x².
Show the answer
IF = ex². The equation becomes d(ex² y)/dx = x ex², whose right side integrates by recognition to ½ex² + c.
Linear first order: multiply by e∫P dx and the left side becomes d(IF × y)/dx; on an interval where P and Q are continuous the initial-value problem has a unique solution.
For constants p > 0 and q, y = q/p + Ce−px: q/p is the equilibrium and the transient tends to zero. For variable Q(x) a particular solution need not be constant.
A general solution is a family of curves, one for each value of the constant; a boundary condition selects one particular member.
WORKBOOK
Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.
Or read them with their worked answers on the first order equations and integrating factors questions page.
USED LATER IN
CHECK YOUR PROGRESS
Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.
- Recognise the linear form dy/dx + P(x)y = Q(x) and rearrange into it.
- Build the integrating factor and collapse the left side to one derivative.
- Sketch members of the family of solution curves a general solution describes.
- Fix the constant from a boundary condition and check by substituting back.
- Read a value or the long-term behaviour off the particular solution.
Open the full revision checklist to see every objective in the course in one place.