Differential Equations: Exam-Pattern Drill (6)

hard 2 min read

Question

Solve the linear differential equation

dydx+yx=x2,x>0\frac{dy}{dx} + \frac{y}{x} = x^2, \quad x > 0

with initial condition y(1)=2y(1) = 2.

Solution — Step by Step

This is a linear first-order ODE: dy/dx+P(x)y=Q(x)dy/dx + P(x)y = Q(x) with P=1/xP = 1/x, Q=x2Q = x^2.

Integrating factor: μ=ePdx=elnx=x\mu = e^{\int P\,dx} = e^{\ln x} = x.

Multiplying by xx: xdy/dx+y=x3x\,dy/dx + y = x^3. Left side equals d(xy)/dxd(xy)/dx.

d(xy)=x3dxxy=x44+C\int d(xy) = \int x^3\,dx \Rightarrow xy = \frac{x^4}{4} + C

So y=x3/4+C/xy = x^3/4 + C/x.

y(1)=1/4+C=2C=7/4y(1) = 1/4 + C = 2 \Rightarrow C = 7/4.

Final answer: y=x3/4+7/(4x)y = x^3/4 + 7/(4x).

Why This Works

The integrating factor turns a linear ODE into an exact derivative. Once we recognise μy\mu y as the product whose derivative we want, integration is mechanical.

The structure μ=ePdx\mu = e^{\int P\,dx} is engineered so that (μy)=μy+μy=μ(y+Py)=μQ(\mu y)' = \mu y' + \mu' y = \mu(y' + Py) = \mu Q. That’s why the trick always works for linear ODEs.

Alternative Method

Recognise the homogeneous equation y+y/x=0y' + y/x = 0 has solution yh=C/xy_h = C/x. Look for a particular solution yp=Ax3y_p = Ax^3. Substituting: 3Ax2+Ax2=x23Ax^2 + Ax^2 = x^2, so A=1/4A = 1/4, giving yp=x3/4y_p = x^3/4. Total: y=x3/4+C/xy = x^3/4 + C/x. Same answer via the homogeneous + particular method.

For JEE Main, recognise the linear-ODE pattern fast: it’s yy' plus a function-of-xx times yy equals another function of xx. If the equation isn’t in this form, manipulate until it is.

Common Mistake

Forgetting the constant of integration when integrating the integrating factor. Always include CC — it carries the initial condition. Skipping CC loses you 2 marks even if the rest is right.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next