NDA Maths · Differential Equations

Solving ODEs — Separable, Substitution, Integrating Factor

First-order ODEs are solved by a small toolkit: separate the variables, reduce a tangled one by substitution, or use an integrating factor for the linear case — then fit any initial condition.

Why this matters

29 PYQs, the biggest subtopic and the home of most HARD questions. The whole skill is reading the equation's shape to pick the method: separable if the variables come apart, a substitution v = x ± y if they don't, an integrating factor if it is linear. Applications add growth/decay and particle-motion initial-value problems.

Concept 1 of 4

Separation of variables

Intuition

The first thing to try: get all the y's (with dy) on one side and all the x's (with dx) on the other, then integrate both sides. Most first-order NDA equations either separate directly or do so after a small rewrite (taking logs, or recognising an exponential).

Definition

The separable method:

  • Write the equation as g(y)dy=f(x)dxg(y)\,dy = f(x)\,dx, then integrate both sides — don't forget the single arbitrary constant.
  • Exponentials separate: ln(dydx)=ax+bydydx=eaxebyebydy=eaxdx\ln\big(\tfrac{dy}{dx}\big) = ax+by \Rightarrow \tfrac{dy}{dx}=e^{ax}e^{by} \Rightarrow e^{-by}\,dy=e^{ax}\,dx.
  • A constant derivative integrates trivially: cos(dydx)=pdydx=cos1py=xcos1p+C\cos\big(\tfrac{dy}{dx}\big)=p \Rightarrow \tfrac{dy}{dx}=\cos^{-1}p \Rightarrow y = x\cos^{-1}p + C.

Worked example

Solve dydx=(1+y2)\dfrac{dy}{dx} = (1+y^2) — i.e. dy=(1+y2)dxdy = (1+y^2)\,dx.
  1. Separate: dy1+y2=dx\dfrac{dy}{1+y^2} = dx.
  2. Integrate both sides: tan1y=x+C\tan^{-1}y = x + C.
Answer:tan1y=x+C\tan^{-1}y = x + C (so y=tan(x+C)y = \tan(x+C)).
Practice this conceptself-check · 4 quick reps

Try it yourself

Solve ln(dydx)+y=x\ln\big(\dfrac{dy}{dx}\big) + y = x.

Practice — Level 1 (4 reps)

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

  1. 1.
    Solve xdyydx=0x\,dy - y\,dx = 0.
  2. 2.
    Separate dydx=e2y\frac{dy}{dx} = e^{2y}.
  3. 3.
    Solve dydx=(ln5)y\frac{dy}{dx} = (\ln 5)\,y.
  4. 4.
    After separating, never forget the?

From the bank · past-year question

Example 1Differential EquationsMODERATE
What is the solution of the following differential equation? ln(dydx)+y=x\ln\left(\frac{dy}{dx}\right)+y=x

[Q99 · Apr · 2021]

Take logs / exponentials to unlock separation

Equations like ln(dy/dx)=ax+by\ln(dy/dx)=ax+by look non-separable until you exponentiate: dy/dx=eaxebydy/dx=e^{ax}e^{by} splits cleanly. Always check whether one rewrite makes the variables come apart before reaching for a heavier method.

Concept 2 of 4

Reducible to separable by substitution

Intuition

When x and y appear glued together as a combination like x+yx+y or yxy-x, substitute a new variable for that combination. The substitution turns a tangled equation into a separable one in the new variable. Also learn to spot exact differentials like d(xy)d(xy) and d(x/y)d(x/y).

Definition

Two reduction tricks:

  • Substitute the combination: if the equation depends on x+yx+y (or yxy-x), set v=x+yv=x+y, so dvdx=1+dydx\tfrac{dv}{dx}=1+\tfrac{dy}{dx}, and the equation becomes separable in vv.
  • Recognise exact differentials: xdy+ydx=d(xy)x\,dy+y\,dx=d(xy); xdyydxy2=d ⁣(xy)\dfrac{x\,dy-y\,dx}{y^2}=d\!\big(\tfrac{x}{y}\big); xdx+ydy=12d(x2+y2)x\,dx+y\,dy=\tfrac12 d(x^2+y^2).

Worked example

Solve dydx=cos(yx)+1\dfrac{dy}{dx} = \cos(y-x) + 1.
  1. Let v=yxv = y - x, so dvdx=dydx1=cosv\dfrac{dv}{dx} = \dfrac{dy}{dx} - 1 = \cos v.
  2. Separate: dvcosv=dxsecvdv=dx\dfrac{dv}{\cos v} = dx \Rightarrow \sec v\,dv = dx.
  3. Integrate: lnsecv+tanv=x+c1\ln|\sec v + \tan v| = x + c_1, so sec(yx)+tan(yx)=Aex\sec(y-x)+\tan(y-x) = Ae^{x}.
Answer:sec(yx)+tan(yx)=Aex\sec(y-x)+\tan(y-x) = Ae^{x}.
Practice this conceptself-check · 3 quick reps

Try it yourself

Solve dxdy=x+y+1x+y1\dfrac{dx}{dy} = \dfrac{x+y+1}{x+y-1}.

Practice — Level 1 (3 reps)

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

  1. 1.
    For an equation in x+yx+y, substitute?
  2. 2.
    xdy+ydx=?x\,dy + y\,dx = ?
  3. 3.
    xdyydxy2=?\frac{x\,dy - y\,dx}{y^2} = ?

From the bank · past-year question

Example 2Differential EquationsHARD
What is the solution of the differential equation dxdy=x+y+1x+y1\frac{dx}{dy}=\frac{x+y+1}{x+y-1}?

[Q99 · Sep · 2018]

Spot the glued combination first

If you cannot separate directly, look for x+yx+y or yxy-x appearing as a unit — that is the signal to substitute vv for it. Trying to force separation without the substitution leads nowhere.

Concept 3 of 4

Linear equations and the integrating factor

Intuition

A first-order LINEAR equation — y appears only to the first power, multiplied by functions of x — is solved by multiplying through by an integrating factor that turns the left side into the derivative of a product. Sometimes the equation is linear in x instead of y, so flip it to dx/dy first.

Definition

The integrating-factor method:

  • Standard form: dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)\,y = Q(x).
  • Integrating factor μ=ePdx\mu = e^{\int P\,dx}; then ddx(μy)=μQ\dfrac{d}{dx}(\mu y) = \mu Q, so μy=μQdx+c\mu y = \int \mu Q\,dx + c.
  • If the equation is linear in xx, use dxdy+P(y)x=Q(y)\dfrac{dx}{dy} + P(y)\,x = Q(y) with μ=ePdy\mu = e^{\int P\,dy}.
  • Bernoulli dydx+Py=Qyn\dfrac{dy}{dx}+Py = Qy^{n}: substitute v=y1nv=y^{1-n} to make it linear.

Integrating factor

μ=eP(x)dx,ddx(μy)=μQ\mu = e^{\int P(x)\,dx},\qquad \frac{d}{dx}(\mu y) = \mu Q

Worked example

Solve dydx+yx=x\dfrac{dy}{dx} + \dfrac{y}{x} = x.
  1. Here P=1xP = \tfrac1x, so μ=e1xdx=elnx=x\mu = e^{\int \frac1x dx} = e^{\ln x} = x.
  2. ddx(xy)=xx=x2\dfrac{d}{dx}(xy) = x\cdot x = x^2.
  3. Integrate: xy=x33+cxy = \dfrac{x^3}{3} + c, so y=x23+cxy = \dfrac{x^2}{3} + \dfrac{c}{x}.
Answer:xy=x33+cxy = \dfrac{x^3}{3} + c.
Practice this conceptself-check · 3 quick reps

Try it yourself

Solve ydx(x+2y2)dy=0y\,dx - (x + 2y^2)\,dy = 0.

Practice — Level 1 (3 reps)

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

  1. 1.
    Integrating factor for dydx+Py=Q\frac{dy}{dx}+Py=Q?
  2. 2.
    IF for dydx+1xy=...\frac{dy}{dx}+\frac{1}{x}y = ...?
  3. 3.
    Bernoulli dydx+Py=Qy2\frac{dy}{dx}+Py=Qy^2: substitute?

From the bank · past-year question

Example 3Differential EquationsMODERATE
What is the general solution of the differential equation ydx(x+2y2)dy=0y\,dx-(x+2y^2)\,dy=0?

[Q88 · Apr · 2017]

If it is not linear in y, try linear in x

ydx(x+2y2)dy=0y\,dx - (x+2y^2)\,dy = 0 is not linear in yy, but rewriting as dxdyxy=2y\frac{dx}{dy}-\frac{x}{y}=2y makes it linear in xx. Flipping to dx/dydx/dy is the move when y-as-the-function fails.

Concept 4 of 4

Initial-value problems and growth/decay

Intuition

An initial value pins down the arbitrary constant: solve the ODE generally, then plug in the given point. The classic application is exponential growth and decay — anything whose rate of change is proportional to its current amount. Verifying a proposed solution just means substituting it back.

Definition

Applications and verification:

  • Growth/decay: dydt=ky\dfrac{dy}{dt} = ky has solution y=y0ekty = y_0 e^{kt} (k>0k>0 growth, k<0k<0 decay — radioactivity, cooling).
  • IVP: find the general solution, then use the condition (e.g. y(0)=y0y(0)=y_0) to fix the constant.
  • Verify a candidate by substituting it into the ODE; a factored equation like (y)2xy=0(y')^2 - x\,y' = 0 splits into y=0y'=0 and y=xy'=x, giving two solution families.
y₀growth (k > 0)decay (k < 0)t →dy/dt = k y → y = y₀ e^{kt}

Worked example

A particle starts at the origin with dxdt=x+1\dfrac{dx}{dt} = x + 1. How long to travel 24 m?
  1. Separate: dxx+1=dt\dfrac{dx}{x+1} = dt, integrate: ln(x+1)=t+C\ln(x+1) = t + C.
  2. At t=0,x=0t=0, x=0: ln1=CC=0\ln 1 = C \Rightarrow C = 0.
  3. When x=24x = 24: t=ln25=ln52=2ln5t = \ln 25 = \ln 5^2 = 2\ln 5.
Answer:2ln52\ln 5 seconds.
Practice this conceptself-check · 3 quick reps

Try it yourself

If dydx=(ln5)y\dfrac{dy}{dx} = (\ln 5)\,y with y(0)=ln5y(0) = \ln 5, find y(1)y(1).

Practice — Level 1 (3 reps)

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

  1. 1.
    Solution of dydt=ky\frac{dy}{dt}=ky?
  2. 2.
    Radioactive decay has kk ___ 0.
  3. 3.
    Factor (y)2xy=0(y')^2 - x\,y' = 0.

From the bank · past-year question

Example 4Differential EquationsMODERATE
A particle starts from origin with a velocity (in m/s) given by the equation dxdt=x+1\frac{dx}{dt}=x+1. The time (in second) taken by the particle to traverse a distance of 24 m is

[Q77 · Apr · 2021]

Apply the initial condition to the GENERAL solution

Solve fully (keeping the arbitrary constant) BEFORE substituting the initial value. Plugging the condition in too early — before integrating — loses the constant you are trying to determine.

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 (1)

Watch out for (4)

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
What is the solution of (1+2x) dy - (1-2y) dx = 0?

[Q99 · Apr · 2018]

Example 2Differential EquationsEASY
What is the solution of the differential equation x dy - y dx = 0?

[Q86 · Apr · 2018]

Example 3Differential EquationsEASY
What is the general solution of the differential equation dydx+xy=0\dfrac{dy}{dx}+\dfrac{x}{y}=0?

[Q91 · Apr · 2019]

Example 4Differential EquationsMODERATE
If dydx=(ln5)y\frac{dy}{dx}=(\ln5)y with y(0)=ln5y(0)=\ln5, then what is y(1)y(1) equal to?

[Q72 · Apr · 2022]

Example 5Differential EquationsEASY
The solution of the differential equation dy=(1+y2)dxdy=(1+y^2)\,dx is

[Q82 · Apr · 2020]

Drill every past-year question on this subtopic

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