Differential Equations: Conceptual Doubts Cleared (12)

hard 2 min read

Question

Solve the linear differential equation:

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

Find the particular solution that passes through (1,1)(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)=2x,Q(x)=x2P(x) = \frac{2}{x}, \quad Q(x) = x^2

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

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

The left side is the derivative of a product:

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

x2y=x4dx=x55+Cx^2 y = \int x^4\,dx = \frac{x^5}{5} + C

y=x35+Cx2y = \frac{x^3}{5} + \frac{C}{x^2}

1=15+C    C=451 = \frac{1}{5} + C \implies C = \frac{4}{5}

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

Why This Works

The integrating factor μ=ePdx\mu = e^{\int P\,dx} is engineered so that multiplying through converts the left side into the derivative of a product. That step is the entire trick of linear ODEs — once the left becomes ddx(μy)\frac{d}{dx}(\mu y), integration finishes the job.

The general solution has two parts: the particular solution x3/5x^3/5 that responds to the forcing x2x^2, and the homogeneous solution C/x2C/x^2 that solves dy/dx+2y/x=0dy/dx + 2y/x = 0. Initial conditions fix the constant CC.

Alternative Method

Recognise that the homogeneous part dy/dx=2y/xdy/dx = -2y/x is separable: lny=2lnx+c\ln|y| = -2\ln|x| + c, giving yh=C/x2y_h = C/x^2. Then guess yp=Ax3y_p = Ax^3 as a particular solution and find A=1/5A = 1/5 by substituting. The general solution is the sum.

Common Mistake

Students forget the absolute value in lnx\ln|x| when computing 1/xdx\int 1/x\,dx. For x>0x > 0, this is harmless, but for ODEs involving x<0x < 0 the sign matters. Always note the domain.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next