Skip to content
Exercise 9.5 · Q3

Q.Solve the following differential equation: dydx+yx=x2\frac{dy}{dx} + \frac{y}{x} = x^2

CBSENCERTSubjective· 3mImportance★★★★★
Appeared in past exams:AP EAPCET 2026· Set eng-2026-05-14-AN· 1mexactTG EAPCET 2023· Set eng-2023-05-14-AN· 1mexact
38% · 85/222 Questions
✓ Free question

This is a first-order linear ODE solved using the integrating factor method. The integrating factor is xx, and the general solution is y=x34+Cxy = \frac{x^3}{4} + \frac{C}{x}.

We start with the equation:

dydx+yx=x2\frac{dy}{dx} + \frac{y}{x} = x^2

This is a classic first-order linear ordinary differential equation of the form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x) y = Q(x). The key idea is to multiply both sides by an integrating factor that turns the left-hand side into the derivative of a product. This works because the left side already looks like a product rule waiting to happen — we just need the right multiplier.

Here, P(x)=1xP(x) = \frac{1}{x} and Q(x)=x2Q(x) = x^2.

  1. Find the integrating factor The integrating factor μ(x)\mu(x) is given by:

μ(x)=e∫P(x) dx=e∫1x dx=elog⁡∣x∣=∣x∣\mu(x) = e^{\int P(x) \, dx} = e^{\int \frac{1}{x} \, dx} = e^{\log |x|} = |x|

For x>0x > 0 (which is typical unless otherwise stated), we take μ(x)=x\mu(x) = x.

  1. Multiply the entire equation by μ(x)\mu(x)

x⋅dydx+x⋅yx=x⋅x2x \cdot \frac{dy}{dx} + x \cdot \frac{y}{x} = x \cdot x^2

Simplifies to:

xdydx+y=x3x \frac{dy}{dx} + y = x^3

  1. Recognize the left side as a derivative Notice that:

ddx(xy)=xdydx+y\frac{d}{dx} (x y) = x \frac{dy}{dx} + y

So the equation becomes:

ddx(xy)=x3\frac{d}{dx} (x y) = x^3

  1. Integrate both sides

xy=∫x3 dx=x44+Cx y = \int x^3 \, dx = \frac{x^4}{4} + C

where CC is the constant of integration.

  1. Solve for yy Divide through by xx (assuming x≠0x \neq 0):

y=x34+Cxy = \frac{x^3}{4} + \frac{C}{x}

Watch out

A common mistake is forgetting the constant CC or dividing by xx without noting that x=0x=0 is a singular point. The solution is valid for x≠0x \neq 0.

Tip

You can verify your answer by differentiating yy and plugging back into the original ODE — the C/xC/x term cancels out, confirming it's correct.

✓Final answer

The general solution is y=x34+Cxy = \frac{x^3}{4} + \frac{C}{x}.

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.