MHT-CET Maths · Differential Equations

Linear Differential Equations — the Integrating Factor

A first-order linear ODE has the shape dy/dx + P(x)y = Q(x). Multiply by the integrating factor IF = e to the power of the integral of P, and the left side collapses into d/dx(y times IF) — integrate once and you are done.

Why this matters

This is the workhorse subtopic and the densest HARD pool in the chapter — 24 PYQs, most of them HARD. Nearly every question is one skill: force the equation into standard form, read off P and Q, build the integrating factor, and integrate. The recurring MHT-CET traps live entirely here: reading P before the equation is in standard form, missing that some equations are only linear in x (swap the roles of x and y), and failing to spot a Bernoulli equation that becomes linear after one substitution.

Concept 1 of 8

Recognizing the Standard Linear Form

Intuition

Before you can use any of this, the equation must be written so that dy/dx sits alone with coefficient 1, the plain-y term is on the same side, and everything free of y is on the right. That shape — dy/dx plus P(x)y equals Q(x) — is what makes the whole integrating-factor machine run. Get the equation into it FIRST; only then read P and Q.

Definition

A first-order ODE is linear when it can be written in the standard form

dydx+P(x)y=Q(x),\dfrac{dy}{dx} + P(x)\,y = Q(x),
where PP and QQ depend on xx only (not on yy). To reach it:

  • Divide through by whatever multiplies dydx\dfrac{dy}{dx} so its coefficient becomes 11.
  • Collect every term containing yy on the left; the rest becomes Q(x)Q(x) on the right.
  • P(x)P(x) is then the coefficient of yy, read off only after the coefficient of dydx\dfrac{dy}{dx} is 11.

Standard linear form

dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)\,y = Q(x)
  • P(x)coefficient of y — read AFTER dividing so dy/dx has coefficient 1
  • Q(x)everything with no y, on the right

Worked example

Put xdydx2y=x3x\dfrac{dy}{dx} - 2y = x^3 into standard linear form and identify P(x)P(x) and Q(x)Q(x).
  1. Divide every term by xx so dydx\dfrac{dy}{dx} has coefficient 11: dydx2xy=x2\dfrac{dy}{dx} - \dfrac{2}{x}y = x^2.
  2. Compare with dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x).
  3. Read off: P(x)=2xP(x) = -\dfrac{2}{x}, Q(x)=x2Q(x) = x^2.
Answer:P(x)=2xP(x) = -\dfrac{2}{x}, Q(x)=x2Q(x) = x^2.
Practice this conceptself-check · 4 quick reps

Try it yourself

Write (1+x2)dydx+2xy=4x2(1+x^2)\dfrac{dy}{dx} + 2xy = 4x^2 in standard form and give P(x)P(x).

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    Standard form of 2dydx+6y=ex2\dfrac{dy}{dx} + 6y = e^x: give PP.
  2. 2.
    For xdydx+y=logxx\dfrac{dy}{dx} + y = \log x, what is P(x)P(x)?
  3. 3.
    For cosxdydxysinx=6x\cos x\dfrac{dy}{dx} - y\sin x = 6x, what is P(x)P(x)?
  4. 4.
    Is dydx+xy2=x\dfrac{dy}{dx} + xy^2 = x linear?

Read PP only AFTER making the dydx\dfrac{dy}{dx} coefficient 11

In cosxdydxysinx=6x\cos x\,\dfrac{dy}{dx} - y\sin x = 6x, the naive read P=sinxP = -\sin x is wrong. Divide by cosx\cos x first: dydxytanx=6xsecx\dfrac{dy}{dx} - y\tan x = 6x\sec x, so P=tanxP = -\tan x. Reading PP before normalizing the leading coefficient is the single most common mistake here.

A y2y^2, y\sqrt{y}, or 1/y1/y means it is NOT linear (yet)

Linear means yy appears only to the first power. Terms like y2secxy^2\sec x or y4cosxy^4\cos x are NON-linear — those are Bernoulli equations that first need a substitution before an integrating factor applies.

Concept 2 of 8

The Integrating Factor and the Solution Formula

Intuition

Once the equation is in standard form, multiply the whole thing by the integrating factor IF = e to the integral of P. The magic: the left side becomes an exact derivative, d/dx of (y times IF). So integrating both sides just once gives y times IF equals the integral of Q times IF. Two formulas carry the entire subtopic.

Definition

For the standard linear ODE dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x):

  • The integrating factor is IF=ePdx\text{IF} = e^{\int P\,dx}.
  • Multiplying by IF turns the left side into a perfect derivative: ddx(yIF)=QIF\dfrac{d}{dx}\big(y\cdot\text{IF}\big) = Q\cdot\text{IF}.
  • Integrating once gives the solution formula

yIF=QIFdx+c.y\cdot\text{IF} = \int Q\cdot\text{IF}\,dx + c.
The constant cc is fixed later by any initial condition. Everything in this subtopic is: normalize, compute IF, integrate QIFQ\cdot\text{IF}.

Integrating factor and general solution

IF=eP(x)dx,yIF=Q(x)IFdx+c\text{IF} = e^{\int P(x)\,dx}, \qquad y\cdot\text{IF} = \int Q(x)\cdot\text{IF}\,dx + c
  • IFthe integrating factor e to the integral of P
  • cthe single arbitrary constant, fixed by an initial condition

Worked example

Solve dydx+2y=e2x\dfrac{dy}{dx} + 2y = e^{-2x}.
  1. Already standard: P=2P = 2, Q=e2xQ = e^{-2x}.
  2. IF=e2dx=e2x\text{IF} = e^{\int 2\,dx} = e^{2x}.
  3. Solution formula: ye2x=e2xe2xdx+c=1dx+c=x+cy\,e^{2x} = \int e^{-2x}\cdot e^{2x}\,dx + c = \int 1\,dx + c = x + c.
  4. Divide by e2xe^{2x}: y=(x+c)e2xy = (x+c)e^{-2x}.
Answer:y=(x+c)e2xy = (x + c)e^{-2x}.
Practice this conceptself-check · 4 quick reps

Try it yourself

If y+ddx(xy)=x(sinx+logx)y + \dfrac{d}{dx}(xy) = x(\sin x + \log x), reduce it to a linear ODE, find the integrating factor, and give the solution.

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    IF for dydx+3y=x\dfrac{dy}{dx} + 3y = x.
  2. 2.
    IF for dydx+yx=x\dfrac{dy}{dx} + \dfrac{y}{x} = x.
  3. 3.
    After multiplying by IF, the left side equals?
  4. 4.
    Solve dydx+y=0\dfrac{dy}{dx} + y = 0.

From the bank · past-year question

Example 2Differential EquationsHARD
If y+ddx(xy)=x(sinx+logx)y+\frac{d}{dx}(xy) =x(\sin x+ \log x) then

[Q118 · 22 April Shift I · 2025]

The left side is ddx(yIF)\dfrac{d}{dx}(y\cdot\text{IF}) — do not re-differentiate the product

After multiplying by IF, the entire left side is ALREADY the derivative of yIFy\cdot\text{IF}. Integrating both sides simply un-does it, giving yIF=QIFdx+cy\cdot\text{IF} = \int Q\cdot\text{IF}\,dx + c. Students who try to apply the product rule again are re-doing work the integrating factor already handled.

One arbitrary constant only, added at the integration step

The solution formula produces exactly ONE constant cc, not one per side. Add it when you integrate QIFdx\int Q\cdot\text{IF}\,dx; an initial condition then pins its value.

Concept 3 of 8

Simple Integrating Factors

Intuition

Most exam questions have a friendly P whose integral you can do in your head, so the IF comes out as a clean power, a clean exponential, or a trig factor. The three you meet constantly: P = n/x gives IF = x to the n; a constant P gives an exponential; and P = -tan x gives IF = cos x. Recognize the pattern and the IF is instant.

Definition

Common integrating factors worth recognizing at a glance:

  • P=1xIF=elogx=xP = \dfrac{1}{x} \Rightarrow \text{IF} = e^{\log x} = x; more generally P=nxIF=xnP = \dfrac{n}{x} \Rightarrow \text{IF} = x^{n}.
  • P=2x1+x2IF=elog(1+x2)=1+x2P = \dfrac{2x}{1+x^2} \Rightarrow \text{IF} = e^{\log(1+x^2)} = 1+x^2 (and likewise 3x21+x31+x3\dfrac{3x^2}{1+x^3} \Rightarrow 1+x^3).
  • P=constant kIF=ekxP = \text{constant } k \Rightarrow \text{IF} = e^{kx}.
  • P=tanxIF=elogcosx=cosxP = -\tan x \Rightarrow \text{IF} = e^{\log\cos x} = \cos x; P=cotxIF=sinxP = \cot x \Rightarrow \text{IF} = \sin x.

In every case the pattern is: Pdx\int P\,dx is a logarithm, so the IF is what that logarithm is a log OF.

Common integrating factors

P=nxIF=xn,P=kIF=ekx,P=tanxIF=cosxP=\dfrac{n}{x}\Rightarrow\text{IF}=x^{n}, \quad P=k\Rightarrow\text{IF}=e^{kx}, \quad P=-\tan x\Rightarrow\text{IF}=\cos x

Worked example

Solve xdydx+2y=x2x\dfrac{dy}{dx} + 2y = x^2 with y(1)=1y(1)=1, and find y ⁣(12)y\!\left(\tfrac12\right).
  1. Standard form: dydx+2xy=x\dfrac{dy}{dx} + \dfrac{2}{x}y = x, so P=2xP = \dfrac{2}{x}.
  2. IF=e2xdx=x2\text{IF} = e^{\int \frac{2}{x}dx} = x^2.
  3. yx2=xx2dx+c=x44+cy x^2 = \int x\cdot x^2\,dx + c = \dfrac{x^4}{4} + c. At x=1,y=1x=1,\,y=1: 1=14+cc=341 = \tfrac14 + c \Rightarrow c = \tfrac34.
  4. At x=12x = \tfrac12: y14=164+34y=4916y\cdot\tfrac14 = \tfrac{1}{64} + \tfrac34 \Rightarrow y = \tfrac{49}{16}.
Answer:y ⁣(12)=4916y\!\left(\tfrac12\right) = \dfrac{49}{16}.
Practice this conceptself-check · 4 quick reps

Try it yourself

Find the general solution of dydxy=x5\dfrac{dy}{dx} - y = x - 5, then the curve through (0,2)(0,2).

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    IF for dydx+yx=sinx\dfrac{dy}{dx} + \dfrac{y}{x} = \sin x.
  2. 2.
    IF for (1+x3)dydx(1+x^3)\dfrac{dy}{dx}-form with P=3x21+x3P = \dfrac{3x^2}{1+x^3}.
  3. 3.
    IF for sinxdydx+ycosx=4x\sin x\dfrac{dy}{dx} + y\cos x = 4x.
  4. 4.
    IF for dydx+y=ex\dfrac{dy}{dx} + y = e^{-x}.

From the bank · past-year question

Example 3Differential EquationsMODERATE
If y=y(x)y=y(x) is the solution of the differential equation xdydx+2y=x2x\frac{dy}{dx}+2y=x^2 satisfying y(1)=1y(1)=1, then the value of y ⁣(12)y\!\left(\frac{1}{2}\right) is

[Q116 · 9th May Shift 1 · 2023]

elogf(x)=f(x)e^{\log f(x)} = f(x) — simplify the exponential of a log

When Pdx=log(1+x2)\int P\,dx = \log(1+x^2), the IF is elog(1+x2)=1+x2e^{\log(1+x^2)} = 1+x^2, NOT e1+x2e^{1+x^2}. Any time Pdx\int P\,dx turns out to be a logarithm, the IF is simply the thing inside that log. Forgetting to cancel ee and log\log leaves an unusable IF.

Watch the sign of PP in the exponential

P=tanxP = -\tan x gives Pdx=logcosx\int P\,dx = \log\cos x, so IF=cosx\text{IF} = \cos x. A dropped minus sign would give secx\sec x and the wrong solution. Track the sign of PP all the way into the IF.

Concept 4 of 8

Tricky Integrating Factors

Intuition

Some P's need real work before the IF appears: the integral might be a log-of-a-log, might combine an exponential with a power, or might need partial fractions. The method is identical — IF = e to the integral of P — but the integral itself is the challenge. Do that integral carefully and the rest is routine.

Definition

Harder integrating factors seen in HARD questions:

  • Log-of-a-log: P=1xlogxP = \dfrac{1}{x\log x} gives Pdx=log(logx)\int P\,dx = \log(\log x), so IF=logx\text{IF} = \log x.
  • Exponential times a power: P=x1+x=1+11+xP = -\dfrac{x}{1+x} = -1 + \dfrac{1}{1+x} gives Pdx=x+log(1+x)\int P\,dx = -x + \log(1+x), so IF=ex(1+x)\text{IF} = e^{-x}(1+x).
  • Combine-then-cancel: P=11xP = 1 - \dfrac{1}{x} gives Pdx=xlogx\int P\,dx = x - \log x, so IF=exx\text{IF} = \dfrac{e^{x}}{x}.
  • Partial fractions: P=2x+1x1P = -\dfrac{2}{x} + \dfrac{1}{x-1} gives Pdx=2logx+log(x1)\int P\,dx = -2\log x + \log(x-1), so IF=x1x2\text{IF} = \dfrac{x-1}{x^2}.

Split PP into standard pieces, integrate each, then exponentiate.

A tricky IF built by partial fractions

P=2x+1x1    Pdx=logx1x2    IF=x1x2P = -\dfrac{2}{x} + \dfrac{1}{x-1} \;\Rightarrow\; \int P\,dx = \log\dfrac{x-1}{x^2} \;\Rightarrow\; \text{IF} = \dfrac{x-1}{x^2}

Worked example

Find the integrating factor of xlogxdydx+y=2xlogxx\log x\,\dfrac{dy}{dx} + y = 2x\log x.
  1. Divide by xlogxx\log x: dydx+1xlogxy=2\dfrac{dy}{dx} + \dfrac{1}{x\log x}\,y = 2, so P=1xlogxP = \dfrac{1}{x\log x}.
  2. Substitute u=logxu = \log x, du=dxxdu = \dfrac{dx}{x}: 1xlogxdx=duu=log(logx)\int \dfrac{1}{x\log x}\,dx = \int \dfrac{du}{u} = \log(\log x).
  3. So IF=elog(logx)=logx\text{IF} = e^{\log(\log x)} = \log x.
Answer:IF=logx\text{IF} = \log x.
Practice this conceptself-check · 4 quick reps

Try it yourself

Solve (1+x)dydxxy=1x(1+x)\dfrac{dy}{dx} - xy = 1 - x.

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    IF when P=1xlogxP = \dfrac{1}{x\log x}.
  2. 2.
    IF when P=11xP = 1 - \dfrac{1}{x}.
  3. 3.
    IF when P=x1+xP = -\dfrac{x}{1+x}.
  4. 4.
    First step when PP is a rational function?

From the bank · past-year question

Example 4Differential EquationsHARD
Let y=y(x)y = y(x) be the solution of the differential equation xlogxdydx+y=2xlogx  (x1)x\log x\,\frac{dy}{dx} + y = 2x\log x\; (x \geq 1), then y(e)y(e) is equal to

[Q124 · 16th May Shift 1 · 2023]

Split PP before integrating a rational coefficient

For P=x1+xP = -\dfrac{x}{1+x}, do polynomial/partial-fraction division first: x1+x=1+11+x-\dfrac{x}{1+x} = -1 + \dfrac{1}{1+x}. Integrating the un-split form is where students stall. The same trick handles 2xx(x1)\dfrac{2-x}{x(x-1)} via partial fractions before the IF appears.

Do not stop at Pdx\int P\,dx — exponentiate it

The IF is ePdxe^{\int P\,dx}, so after finding Pdx=x+log(1+x)\int P\,dx = -x + \log(1+x) you still must exponentiate to ex(1+x)e^{-x}(1+x). Using the raw integral as the IF is a common slip on the harder coefficients.

Concept 5 of 8

Linear in x — Swap the Roles of x and y

Intuition

Some equations are hopeless as dy/dx but become perfectly linear when you flip them to dx/dy. If y appears in awkward places but x appears only to the first power, treat x as the unknown function of y: write dx/dy + P(y)x = Q(y), and use exactly the same integrating factor machine with y as the variable.

Definition

An ODE is **linear in xx** if it fits

dxdy+P(y)x=Q(y),\dfrac{dx}{dy} + P(y)\,x = Q(y),
with P,QP, Q functions of yy only. Then IF=eP(y)dy\text{IF} = e^{\int P(y)\,dy} and xIF=Q(y)IFdy+cx\cdot\text{IF} = \int Q(y)\cdot\text{IF}\,dy + c. Signals to flip: the equation has ydxy\,dx and xdyx\,dy terms, or a coefficient of dydx\dfrac{dy}{dx} that is a messy function of yy. Rewriting dydx\dfrac{dy}{dx} as 1/dxdy1/\dfrac{dx}{dy} exposes the linear-in-xx shape.

Linear in x (reciprocal form)

dxdy+P(y)x=Q(y),IF=eP(y)dy\dfrac{dx}{dy} + P(y)\,x = Q(y), \qquad \text{IF} = e^{\int P(y)\,dy}

Worked example

Solve ydx(x+3y2)dy=0y\,dx - (x + 3y^2)\,dy = 0, the curve through (1,1)(1,1).
  1. Rewrite as dxdy=xy+3y\dfrac{dx}{dy} = \dfrac{x}{y} + 3y, i.e. dxdy1yx=3y\dfrac{dx}{dy} - \dfrac{1}{y}x = 3y — linear in xx, P(y)=1yP(y) = -\dfrac{1}{y}.
  2. IF=e1ydy=elogy=1y\text{IF} = e^{\int -\frac{1}{y}dy} = e^{-\log y} = \dfrac{1}{y}.
  3. x1y=3y1ydy+c=3y+cx\cdot\dfrac{1}{y} = \int 3y\cdot\dfrac{1}{y}\,dy + c = 3y + c, so x=3y2+cyx = 3y^2 + cy. Through (1,1)(1,1): 1=3+cc=21 = 3 + c \Rightarrow c = -2.
  4. The curve is x=3y22yx = 3y^2 - 2y.
Answer:x=3y22yx = 3y^2 - 2y (so it passes through (13,13)\left(-\tfrac13, \tfrac13\right)).
Practice this conceptself-check · 4 quick reps

Try it yourself

Solve (1+y2)+(xetan1y)dydx=0(1 + y^2) + (x - e^{\tan^{-1}y})\dfrac{dy}{dx} = 0.

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    When is flipping to dxdy\dfrac{dx}{dy} worth it?
  2. 2.
    IF of dxdy1yx=3y\dfrac{dx}{dy} - \dfrac{1}{y}x = 3y.
  3. 3.
    IF of dxdy+x1+y2=\dfrac{dx}{dy} + \dfrac{x}{1+y^2} = \cdots.
  4. 4.
    In linear-in-xx, the variable of integration is?

From the bank · past-year question

Example 5Differential EquationsHARD
The solution of (1+y2)+(xetan1y)dy dx=0\left( 1 +y^{2} \right)+\left( x-e^{\tan - 1y} \right)\frac{dy}{\text{ }dx}= 0 is

[Q126 · 20 April Shift II · 2025]

If yy is tangled, check whether xx is linear before giving up

ydx(x+3y2)dy=0y\,dx - (x+3y^2)\,dy = 0 never separates and is not linear in yy — but dividing by dydy shows xx appears only to the first power, so it is linear in xx. Flipping to dxdy\dfrac{dx}{dy} is the move; forcing dydx\dfrac{dy}{dx} leads nowhere.

After flipping, integrate with respect to yy, not xx

Everything shifts: PP and QQ are functions of yy, the IF is eP(y)dye^{\int P(y)\,dy}, and the solution formula integrates QIFQ\cdot\text{IF} over yy. Slipping back to dxdx mid-solution is a classic error.

Concept 6 of 8

Bernoulli Equations — Substitute to Linearize

Intuition

A Bernoulli equation has a lone power of y on the right: dy/dx + P y = Q y to the n. It is not linear as written, but one substitution fixes it. Divide through by y to the n, then let v = y to the (1 minus n) — the equation becomes linear in v, and you finish with the ordinary integrating factor.

Definition

A Bernoulli equation is dydx+P(x)y=Q(x)yn\dfrac{dy}{dx} + P(x)y = Q(x)y^{n} with n0,1n \neq 0, 1. To solve:

  • **Divide by yny^{n}:** yndydx+Py1n=Qy^{-n}\dfrac{dy}{dx} + P\,y^{1-n} = Q.
  • Substitute v=y1nv = y^{1-n}, so dvdx=(1n)yndydx\dfrac{dv}{dx} = (1-n)y^{-n}\dfrac{dy}{dx}.
  • The equation becomes **linear in vv:** dvdx+(1n)Pv=(1n)Q\dfrac{dv}{dx} + (1-n)P\,v = (1-n)Q — now use IF=e(1n)Pdx\text{IF} = e^{\int (1-n)P\,dx}.

Special common case n=2n = 2: v=y1=1/yv = y^{-1} = 1/y.

Bernoulli substitution

dydx+Py=Qyn    v=y1n    dvdx+(1n)Pv=(1n)Q\dfrac{dy}{dx} + Py = Qy^{n} \;\xrightarrow{\;v = y^{1-n}\;}\; \dfrac{dv}{dx} + (1-n)Pv = (1-n)Q
  • nthe power on the right-hand y; must not be 0 or 1
  • vthe new unknown y to the power (1 minus n)

Worked example

Solve dydx=ytanxy2secx\dfrac{dy}{dx} = y\tan x - y^2\sec x.
  1. Rewrite: dydxytanx=y2secx\dfrac{dy}{dx} - y\tan x = -y^2\sec x — Bernoulli with n=2n = 2.
  2. Divide by y2y^2 and let v=y1v = y^{-1}, so dvdx=y2dydx\dfrac{dv}{dx} = -y^{-2}\dfrac{dy}{dx}: the equation becomes dvdxvtanx=secx\dfrac{dv}{dx} - v\tan x = \sec x.
  3. IF=etanxdx=cosx\text{IF} = e^{\int -\tan x\,dx} = \cos x. Then ddx(vcosx)=cosxsecx=1\dfrac{d}{dx}(v\cos x) = \cos x\sec x = 1, so vcosx=x+cv\cos x = x + c.
  4. With v=1/yv = 1/y: cosxy=x+c\dfrac{\cos x}{y} = x + c, i.e. cosx=y(x+c)\cos x = y(x + c). Matching the bank's tan-form solution: secx=y(tanx+c)\sec x = y(\tan x + c).
Answer:secx=y(tanx+c)\sec x = y(\tan x + c).
Practice this conceptself-check · 4 quick reps

Try it yourself

Solve dydx+yx=xy2\dfrac{dy}{dx} + \dfrac{y}{x} = x\,y^2.

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    For dydx+Py=Qy2\dfrac{dy}{dx} + Py = Qy^2, substitute?
  2. 2.
    For n=3n = 3, what is vv?
  3. 3.
    First step to linearize a Bernoulli equation?
  4. 4.
    Is dydx+xy=x2y0\dfrac{dy}{dx} + xy = x^2 y^0 Bernoulli?

From the bank · past-year question

Example 6Differential EquationsHARD
The solution of the equation x2yx3 dy dx=y4cosxx^{2}y-x^{3}\cdot\frac{\text{ }dy}{\text{ }dx}=y^{4}\cos x, where y(0)=1y(0) = 1, is

[Q123 · 25 April Shift I · 2025]

Divide by yny^{n} BEFORE substituting

You cannot substitute v=y1nv = y^{1-n} usefully until the yndydxy^{-n}\dfrac{dy}{dx} term is exposed. Divide the whole equation by yny^{n} first; only then does dvdx\dfrac{dv}{dx} appear cleanly. Skipping this step leaves an equation you cannot linearize.

Spot the lone yny^{n} — it is not a linear ODE

dydx=ytanxy2secx\dfrac{dy}{dx} = y\tan x - y^2\sec x looks linear until you see the y2y^2. Treating it as linear (integrating factor straight away) is wrong. The yny^{n} on the right is the tell: substitute first.

Concept 7 of 8

Exact Equations by d(·)-Grouping

Intuition

Sometimes the fastest route is not an integrating factor at all — it is recognizing that a clump of terms is itself the differential of a simple product or quotient. Group the terms into pieces like d(xy) or d(x/y), integrate each piece directly, and the answer falls out. This beats the linear machine when the grouping is obvious.

Definition

Recognize these exact differentials and integrate by grouping:

  • xdy+ydx=d(xy)x\,dy + y\,dx = d(xy).
  • xdyydxy2=d ⁣(xy)\dfrac{x\,dy - y\,dx}{y^2} = d\!\left(\dfrac{x}{y}\right), and ydxxdyx2=d ⁣(yx)\dfrac{y\,dx - x\,dy}{x^2} = d\!\left(\dfrac{y}{x}\right).
  • xdx+ydy=12d(x2+y2)x\,dx + y\,dy = \tfrac12\,d(x^2 + y^2).
  • For products like (1+xy)ydx+(1xy)xdy=0(1+xy)y\,dx + (1-xy)x\,dy = 0, divide by a factor such as x2y2x^2y^2 to expose d ⁣(1xy)d\!\left(-\tfrac{1}{xy}\right), d(logx)d(\log x), and d(logy)d(\log y).

Exact differentials to spot

xdy+ydx=d(xy),xdyydxy2=d ⁣(xy)x\,dy + y\,dx = d(xy), \qquad \dfrac{x\,dy - y\,dx}{y^2} = d\!\left(\dfrac{x}{y}\right)

Worked example

Solve xdy=y(dx+ydy)x\,dy = y(dx + y\,dy) with y(1)=1y(1) = 1, y>0y > 0, and find y(3)y(-3).
  1. Expand: xdy=ydx+y2dyxdyydx=y2dyxdyydxy2=dyx\,dy = y\,dx + y^2\,dy \Rightarrow x\,dy - y\,dx = y^2\,dy \Rightarrow \dfrac{x\,dy - y\,dx}{y^2} = dy.
  2. Recognize the left side: since ydxxdyy2=d ⁣(xy)\dfrac{y\,dx - x\,dy}{y^2} = d\!\left(\dfrac{x}{y}\right), the negative of it is xdyydxy2=d ⁣(xy)\dfrac{x\,dy - y\,dx}{y^2} = d\!\left(-\dfrac{x}{y}\right). So d ⁣(xy)=dyd\!\left(-\dfrac{x}{y}\right) = dy.
  3. Integrate: xy=y+c-\dfrac{x}{y} = y + c. At (1,1)(1,1): 1=1+cc=2-1 = 1 + c \Rightarrow c = -2.
  4. At x=3x = -3: 3y=y2y22y3=0y=3\dfrac{3}{y} = y - 2 \Rightarrow y^2 - 2y - 3 = 0 \Rightarrow y = 3 (taking y>0y > 0).
Answer:y(3)=3y(-3) = 3.
Practice this conceptself-check · 4 quick reps

Try it yourself

Solve (1+xy)ydx+(1xy)xdy=0(1 + xy)y\,dx + (1 - xy)x\,dy = 0.

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    xdy+ydx=?x\,dy + y\,dx = ?
  2. 2.
    xdyydxy2=?\dfrac{x\,dy - y\,dx}{y^2} = ?
  3. 3.
    xdx+ydy=?x\,dx + y\,dy = ?
  4. 4.
    To expose a grouping in (1+xy)ydx+(1+xy)y\,dx + \cdots, divide by?

From the bank · past-year question

Example 7Differential EquationsHARD
The solution of (1+xy)ydx+(1xy)xdy=0(1+xy)y\,dx+(1-xy)x\,dy=0 is

[Q146 · 13th May Shift 2 · 2024]

Mind the sign and denominator of the quotient differentials

xdy+ydx=d(xy)x\,dy + y\,dx = d(xy) (a PLUS), but xdyydxy2=d ⁣(xy)\dfrac{x\,dy - y\,dx}{y^2} = d\!\left(\tfrac{x}{y}\right) (a MINUS, over y2y^2). Swapping the sign or writing x2x^2 in the denominator gives the wrong grouping and the wrong answer.

Try grouping before reaching for an integrating factor

When you see xdyx\,dy and ydxy\,dx sitting together, test for an exact differential first. Forcing the equation into standard linear form when a clean d(xy)d(xy) or d(x/y)d(x/y) is staring at you wastes the whole solution.

Concept 8 of 8

Direct Integration and Reduction of Order

Intuition

The simplest first-order equations are the ones where dy/dx is already isolated as a function of x alone — just integrate. And a second-order equation with no y term (only y'' and x) drops an order: integrate once to get dy/dx, apply a condition, integrate again. No integrating factor needed at all.

Definition

Two direct routes:

  • Direct integration: if dydx=f(x)\dfrac{dy}{dx} = f(x), then y=f(x)dx+cy = \int f(x)\,dx + c. Likewise (x+2)dydx=x2+4x9(x+2)\dfrac{dy}{dx} = x^2 + 4x - 9 becomes dydx=x2+4x9x+2\dfrac{dy}{dx} = \dfrac{x^2+4x-9}{x+2}, integrate after dividing.
  • Reduction of order: for xd2ydx2=1x\dfrac{d^2y}{dx^2} = 1 (no yy, no dydx\dfrac{dy}{dx}), write it as d2ydx2=1x\dfrac{d^2y}{dx^2} = \dfrac{1}{x}; integrate to dydx=logx+c1\dfrac{dy}{dx} = \log x + c_1, fix c1c_1 with the slope condition, then integrate again for yy.

Each integration introduces one constant — a second-order problem needs two conditions.

Reduction of order (integrate twice)

d2ydx2=g(x)    dydx=g(x)dx+c1    y= ⁣(gdx)dx+c1x+c2\dfrac{d^2y}{dx^2} = g(x) \;\Rightarrow\; \dfrac{dy}{dx} = \int g(x)\,dx + c_1 \;\Rightarrow\; y = \int\!\left(\int g\,dx\right)dx + c_1 x + c_2

Worked example

Solve d2ydx2=12x\dfrac{d^2y}{dx^2} = 12x given y=5y = 5 and dydx=3\dfrac{dy}{dx} = 3 at x=0x = 0.
  1. The right side has no yy, so integrate twice. Integrate once: dydx=6x2+c1\dfrac{dy}{dx} = 6x^2 + c_1.
  2. Apply dydx=3\dfrac{dy}{dx} = 3 at x=0x = 0: 3=0+c1c1=33 = 0 + c_1 \Rightarrow c_1 = 3.
  3. Integrate again: y=2x3+3x+c2y = 2x^3 + 3x + c_2. Apply y=5y = 5 at x=0x = 0: 5=c25 = c_2.
Answer:y=2x3+3x+5y = 2x^3 + 3x + 5
Practice this conceptself-check · 4 quick reps

Try it yourself

Solve dydx=3x24x+1\dfrac{dy}{dx} = 3x^2 - 4x + 1, the curve through (0,5)(0, 5).

Practice — Level 1 (4 reps)

Quick reps to lock in the method. Try each, then check.

  1. 1.
    Solve dydx=cosx\dfrac{dy}{dx} = \cos x.
  2. 2.
    logxdx=?\int \log x\,dx = ?
  3. 3.
    How many constants does a 2nd-order ODE solution carry?
  4. 4.
    First step for xd2ydx2=1x\dfrac{d^2y}{dx^2} = 1?

From the bank · past-year question

Example 8Differential EquationsMODERATE
The solution of the differential equation x d2y dx2=1x\frac{{\text{ }d}^{2}y}{\text{ }dx^{2}}= 1 at x=y=1x=y= 1 with dy dx=0\frac{dy}{\text{ }dx}= 0 at x=1x= 1, is

[Q126 · 19 April Shift I · 2025]

Apply the slope condition after the FIRST integration

For a second-order equation, use the dydx\dfrac{dy}{dx} condition to fix c1c_1 as soon as you have dydx\dfrac{dy}{dx} — do not wait until the end. Fixing both constants only at the final step tangles the algebra and often gives the wrong c2c_2.

Divide out the leading factor before integrating

xd2ydx2=1x\dfrac{d^2y}{dx^2} = 1 is NOT d2ydx2=1\dfrac{d^2y}{dx^2} = 1; first isolate d2ydx2=1x\dfrac{d^2y}{dx^2} = \dfrac{1}{x}. Integrating the un-isolated form gives y=x+y = x + \cdots instead of the correct xlogxx\log x term.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (8)

  • Recognizing the Standard Linear Form

    Standard linear form

    dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)\,y = Q(x)
  • The Integrating Factor and the Solution Formula

    Integrating factor and general solution

    IF=eP(x)dx,yIF=Q(x)IFdx+c\text{IF} = e^{\int P(x)\,dx}, \qquad y\cdot\text{IF} = \int Q(x)\cdot\text{IF}\,dx + c
  • Simple Integrating Factors

    Common integrating factors

    P=nxIF=xn,P=kIF=ekx,P=tanxIF=cosxP=\dfrac{n}{x}\Rightarrow\text{IF}=x^{n}, \quad P=k\Rightarrow\text{IF}=e^{kx}, \quad P=-\tan x\Rightarrow\text{IF}=\cos x
  • Tricky Integrating Factors

    A tricky IF built by partial fractions

    P=2x+1x1    Pdx=logx1x2    IF=x1x2P = -\dfrac{2}{x} + \dfrac{1}{x-1} \;\Rightarrow\; \int P\,dx = \log\dfrac{x-1}{x^2} \;\Rightarrow\; \text{IF} = \dfrac{x-1}{x^2}
  • Linear in x — Swap the Roles of x and y

    Linear in x (reciprocal form)

    dxdy+P(y)x=Q(y),IF=eP(y)dy\dfrac{dx}{dy} + P(y)\,x = Q(y), \qquad \text{IF} = e^{\int P(y)\,dy}
  • Bernoulli Equations — Substitute to Linearize

    Bernoulli substitution

    dydx+Py=Qyn    v=y1n    dvdx+(1n)Pv=(1n)Q\dfrac{dy}{dx} + Py = Qy^{n} \;\xrightarrow{\;v = y^{1-n}\;}\; \dfrac{dv}{dx} + (1-n)Pv = (1-n)Q
  • Exact Equations by d(·)-Grouping

    Exact differentials to spot

    xdy+ydx=d(xy),xdyydxy2=d ⁣(xy)x\,dy + y\,dx = d(xy), \qquad \dfrac{x\,dy - y\,dx}{y^2} = d\!\left(\dfrac{x}{y}\right)
  • Direct Integration and Reduction of Order

    Reduction of order (integrate twice)

    d2ydx2=g(x)    dydx=g(x)dx+c1    y= ⁣(gdx)dx+c1x+c2\dfrac{d^2y}{dx^2} = g(x) \;\Rightarrow\; \dfrac{dy}{dx} = \int g(x)\,dx + c_1 \;\Rightarrow\; y = \int\!\left(\int g\,dx\right)dx + c_1 x + c_2

Watch out for (16)

Mastery check — 5 interleaved questions

Try each one before clicking. Questions are interleaved across the concepts above, not grouped — interleaving sharpens transfer.

Example 1Differential EquationsMODERATE
The equation of the curve passing through origin and satisfying (1+x2)dy dx+2xy=4x2\left( 1 +x^{2} \right)\frac{dy}{\text{ }dx}+ 2xy= 4x^{2} is

[Q115 · 25 April Shift II · 2025]

Example 2Differential EquationsMODERATE
Integrating factor of the differential equation dydx+y=1+yx\frac{dy}{dx} + y = 1 + \frac{y}{x} is

[Q149 · 9th May Shift 2 · 2023]

Example 3Differential EquationsHARD
The curve satisfying the differential equation ydx(x+3y2)dy=0y\,dx - (x+3y^2)\,dy = 0 and passing through the point (1,1)(1,1) also passes through the point

[Q125 · 9th May Shift 1 · 2023]

Example 4Differential EquationsHARD
The general solution of the differential equation dydx=ytanxy2secx\frac{dy}{dx} = y\tan x - y^2\sec x is

[Q142 · Shift 1 · 2023]

Example 5Differential EquationsHARD
If xdy=y(dx+ydy), y(1)=1, y(x)>0x\,dy=y(dx+y\,dy),\ y(1)=1,\ y(x)>0, then y(3)y(-3) is:

[Q114 · 13th May Shift 2 · 2024]

Drill every past-year question on this subtopic

24 questions from the bank — paginated, with cart and Word-export support.