Differential Equations: PYQ Walkthrough (2)

medium 2 min read

Question

(JEE Main 2023 PYQ — paraphrased) Solve the differential equation:

dydx+2yx=x2,y(1)=1\frac{dy}{dx} + \frac{2y}{x} = x^2, \quad y(1) = 1

Solution — Step by Step

This is a first-order linear ODE in standard form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x) y = Q(x) with P(x)=2/xP(x) = 2/x and Q(x)=x2Q(x) = x^2.

Integrating factor:

μ(x)=ePdx=e2/xdx=e2lnx=x2\mu(x) = e^{\int P \, dx} = e^{\int 2/x \, dx} = e^{2 \ln x} = x^2

Multiply both sides by x2x^2:

x2dydx+2xy=x4x^2 \frac{dy}{dx} + 2xy = x^4

The left side is ddx(x2y)\frac{d}{dx}(x^2 y) — that’s the magic of the integrating factor.

ddx(x2y)=x4\frac{d}{dx}(x^2 y) = x^4

Integrate both sides:

x2y=x55+Cx^2 y = \frac{x^5}{5} + C

Apply y(1)=1y(1) = 1: 11=1/5+C    C=4/51 \cdot 1 = 1/5 + C \implies C = 4/5.

y=x35+45x2y = \frac{x^3}{5} + \frac{4}{5x^2}

The solution is y=x35+45x2y = \frac{x^3}{5} + \frac{4}{5x^2}.

Why This Works

The integrating factor turns a linear ODE into a perfect derivative. Multiplying by μ(x)=ePdx\mu(x) = e^{\int P \, dx} ensures the left-hand side becomes ddx(μy)\frac{d}{dx}(\mu y), after which we just integrate.

This is the standard recipe for any first-order linear ODE. The hard step is identifying that the equation is linear in yy — meaning yy and dy/dxdy/dx appear only to the first power, with no products like ydydxy \frac{dy}{dx}.

If the equation has yy and dydx\frac{dy}{dx} multiplied together, it’s not linear — try variable separation, substitution, or recognize it as a Bernoulli equation. JEE Main usually keeps to linear or separable; JEE Advanced may throw Bernoulli or homogeneous.

Alternative Method

Variation of parameters: write y=uvy = u v where vv is chosen to kill one term. Set v+(2/x)v=0v' + (2/x) v = 0, giving v=1/x2v = 1/x^2. Then uv=x2    u=x4    u=x5/5+Cu' \cdot v = x^2 \implies u' = x^4 \implies u = x^5/5 + C. So y=(x5/5+C)/x2=x3/5+C/x2y = (x^5/5 + C)/x^2 = x^3/5 + C/x^2. Same answer.

Common Mistake

Students compute the integrating factor as e2xe^{2x} instead of x2x^2, forgetting that 2/xdx=2lnx\int 2/x \, dx = 2 \ln x, not 2x2x. Read the integral carefully — it’s P(x)=2/xP(x) = 2/x, not P(x)=2P(x) = 2.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next