MathsDifferential equations › First order equations and integrating factors

First order equations and integrating factors

Multiply a stubborn first order equation by exactly the right function and its left side folds into one derivative, ready to integrate whole.

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.

COMMON MISCONCEPTION

If the variables in a first order equation do not separate, the equation cannot be solved.

The multiplier that folds the equation

Separation applies only to special cases. The integrating factor is broader. Any linear equation dy/dx + P(x)y = Q(x), separable or not, gives way when both sides are multiplied by the integrating factor:

IF=ePdx\text{IF} = e^{\text{∫} P \, dx}NOT IN THE BOOKLET — LEARN IT

The point of this exact multiplier is the product rule read in reverse. After multiplying, the left side is precisely the derivative of IF × y, so integrating both sides takes one step. Non-separable turns out not to mean unsolvable.

The integrating factor folds the equation: multiply by IF and the left side becomes one derivativedy/dx + P(x) y = Q(x)× IF = e to the ∫P dxd(IF × y)/dx = IF × Qone integration finishes it
FIG. 1The integrating factor at work: multiply through by IF and the two left-hand terms fold into the single derivative (IF × y)'.

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. It works.

That last step is worth naming. The answer with the constant still in it is the general solution, and each value of the constant gives a different curve, so what you have solved for is a whole family of solution curves. Examiners 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, and the boundary condition names it. That single curve is the particular solution.

Constant coefficients and the long run

When P is a constant the factor is a plain exponential, and the solution splits into a steady part driven by Q and a transient Ce−Px that dies away. Reading which part is which turns algebra into behaviour, since every solution of dy/dx + 3y = 6 slides onto y = 2 whatever its starting value. Sketch that family and the horizontal line y = 2 is the spine of the picture, with members approaching it from above when C is positive and from below when C is negative.

Solutions of dy/dx + 3y = 6 from different starts: every transient dies and the curves funnel onto y = 2y = 2y = 2 + Ce to the −3xdifferent C, same destination
FIG. 2Solutions of dy/dx + 3y = 6 from several starting values: the transient Ce−3x dies and every curve funnels onto y = 2.

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. A fixed level 2, plus a memory of the start 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 the dy/dx coefficient is 1. The formula assumes it.
  • No constant is needed inside the exponential; any choice cancels in the working.
  • After integrating, divide by the integrating factor before applying the boundary condition.
  • A sketch of the family wants at least two members and any asymptote they share, labelled.
  • Substituting the final answer back into the equation is a one-line check worth doing.

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 = e. The equation becomes d(e y)/dx = x e, whose right side integrates by recognition to ½e + c.

Linear first order: multiply by e∫P dx and the left side becomes d(IF × y)/dx.

Constant P splits solutions into steady state plus a transient that dies away.

A general solution is a family of curves, one per value of the constant; a boundary condition picks out the 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.

6 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the first order equations and integrating factors questions page.

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.

Open the full revision checklist to see every objective in the course in one place.