6.7 First-Order Differential Equations: Linear & Non-Linear

Key Takeaways

  • A first-order equation is separable when it can be written as f(y) dy = g(x) dx, which is always the first form to test for because it needs no integrating factor.
  • The linear form dy/dx + Py = Q is solved with the integrating factor e raised to the integral of P dx, after which the solution is y times IF equals the integral of Q times IF.
  • An exact equation M dx + N dy = 0 satisfies the condition that the partial of M with respect to y equals the partial of N with respect to x.
  • Bernoulli's equation dy/dx + Py = Q y^n is reduced to linear form by the substitution v = y raised to the power (1 - n).
Last updated: August 2026

Why Differential Equations Matter in Paper-II

A differential equation is a relation containing derivatives. Its order is the order of the highest derivative, and its degree is the power of that highest derivative once the equation is cleared of radicals and fractions. Almost every dynamic process examined later in Paper-II is described by one: the cooling of a forged component obeys a first-order equation, damped vibration of a shaft obeys a second-order one, and the transient temperature of a lumped body in heat transfer is a first-order decay.

Because CIL awards one mark per item with no negative marking, the productive skill here is recognising which of four standard types you are looking at, since each has a fixed recipe.

Type 1: Variable Separable

If the equation can be rearranged so that all $y$ terms sit with $dy$ and all $x$ terms with $dx$:

f(y)dy=g(x)dxf(y)dy=g(x)dx+Cf(y)\,dy = g(x)\,dx \quad \Longrightarrow \quad \int f(y)\,dy = \int g(x)\,dx + C

Always test this first — it requires no machinery.

Worked example — Newton's law of cooling. A casting at $T_0$ cools in surroundings at $T_s$ according to

dTdt=k(TTs)\frac{dT}{dt} = -k(T - T_s)

Separating gives $\dfrac{dT}{T - T_s} = -k,dt$, so $\ln(T - T_s) = -kt + C$, and applying the initial condition $T = T_0$ at $t = 0$ yields

T=Ts+(T0Ts)ektT = T_s + (T_0 - T_s)e^{-kt}

This exponential-decay form reappears verbatim as the lumped-capacitance solution in the Heat Transfer chapter.

Type 2: Homogeneous Equations

If $\dfrac{dy}{dx} = F!\left(\dfrac{y}{x}\right)$, that is, every term has the same total degree in $x$ and $y$, substitute

y=vxdydx=v+xdvdxy = vx \quad \Longrightarrow \quad \frac{dy}{dx} = v + x\frac{dv}{dx}

The substitution always converts a homogeneous equation into a variable-separable one in $v$ and $x$.

Type 3: Linear First-Order Equations

The standard form is

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)\,y = Q(x)

where $P$ and $Q$ are functions of $x$ alone. Multiply through by the integrating factor

IF=ePdx\text{IF} = e^{\int P\,dx}

which makes the left side an exact derivative, giving the solution

yIF=QIFdx+Cy \cdot \text{IF} = \int Q \cdot \text{IF}\,dx + C

Worked example. Solve $\dfrac{dy}{dx} + \dfrac{y}{x} = x^2$.

Here $P = 1/x$, so $\text{IF} = e^{\int dx/x} = e^{\ln x} = x$. Then $yx = \int x^3,dx = \dfrac{x^4}{4} + C$, giving $y = \dfrac{x^3}{4} + \dfrac{C}{x}$.

If instead the roles of $x$ and $y$ are reversed — the equation is linear in $x$ with $y$ as the independent variable — write it as $\dfrac{dx}{dy} + P(y)x = Q(y)$ and use the same recipe.

Type 4: Exact Differential Equations

An equation written as

M(x,y)dx+N(x,y)dy=0M(x,y)\,dx + N(x,y)\,dy = 0

is exact when

My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}

This is the same equality-of-mixed-partials condition met in the previous section, and it means the left side is the total differential of some function $u(x,y)$. The solution is $u = C$, obtained as

Mdx  (treating y constant)+(terms of N free of x)dy=C\int M\,dx \;(\text{treating } y \text{ constant}) + \int \left(\text{terms of } N \text{ free of } x\right) dy = C

When the exactness test fails, an integrating factor can sometimes restore it. Two standard cases:

  • If $\dfrac{1}{N}\left(\dfrac{\partial M}{\partial y} - \dfrac{\partial N}{\partial x}\right)$ is a function of $x$ alone, call it $f(x)$; then $\text{IF} = e^{\int f,dx}$.
  • If $\dfrac{1}{M}\left(\dfrac{\partial N}{\partial x} - \dfrac{\partial M}{\partial y}\right)$ is a function of $y$ alone, call it $g(y)$; then $\text{IF} = e^{\int g,dy}$.

Bernoulli's Equation

The non-linear form named in the syllabus is

dydx+P(x)y=Q(x)yn,n0,1\frac{dy}{dx} + P(x)y = Q(x)\,y^{n}, \qquad n \neq 0, 1

Divide throughout by $y^n$ and substitute $v = y^{1-n}$. Since $\dfrac{dv}{dx} = (1-n)y^{-n}\dfrac{dy}{dx}$, the equation becomes

dvdx+(1n)Pv=(1n)Q\frac{dv}{dx} + (1-n)Pv = (1-n)Q

which is linear in $v$ and solved by the integrating factor of Type 3.

Classification Flowchart

Test in this orderIf it passes
Can the variables be separated?Integrate both sides directly
Is $dy/dx$ a function of $y/x$ only?Substitute $y = vx$
Is it $y' + Py = Qy^n$?Substitute $v = y^{1-n}$, then linear
Is it $y' + Py = Q$?Integrating factor $e^{\int P dx}$
Is $M_y = N_x$?Exact; solve $u = C$

Application: Draining a Mine Sump

A sump of uniform cross-section $A$ drains through an orifice of area $a$. Torricelli's law gives the outflow velocity as $\sqrt{2gh}$, so

Adhdt=Cda2ghA\frac{dh}{dt} = -C_d\,a\sqrt{2gh}

This is variable-separable. Writing $h^{-1/2}dh = -\dfrac{C_d a\sqrt{2g}}{A}dt$ and integrating from $h_1$ to $h_2$ gives the emptying time

t=2A(h1h2)Cda2gt = \frac{2A\left(\sqrt{h_1} - \sqrt{h_2}\right)}{C_d\,a\sqrt{2g}}

The same result is derived again from a control-volume argument in the Fluid Mechanics chapter, which is a useful cross-check that the calculus and the physics agree.

Test Your Knowledge

The integrating factor for the differential equation dy/dx + y/x = x^2 is:

A
B
C
D
Test Your Knowledge

The substitution that reduces Bernoulli's equation dy/dx + Py = Q y^n to linear form is:

A
B
C
D
Test Your Knowledge

The equation M dx + N dy = 0 is exact if:

A
B
C
D
Test Your Knowledge

A casting cooling according to Newton's law of cooling has a temperature-time relationship that is:

A
B
C
D