Concept:
The given equation is a first-order linear differential equation of the form
\[
\frac{dy}{dx} + P(x)y = Q(x)
\]
The integrating factor (I.F.) is
\[
I.F. = e^{\int P(x)dx}
\]
The solution is obtained by multiplying the equation by the integrating factor.
Step 1: {Identify \(P(x)\) and \(Q(x)\).}
\[
\frac{dy}{dx} + \frac{y}{x} = x^2
\]
\[
P(x) = \frac{1}{x}, \quad Q(x) = x^2
\]
Step 2: {Find the integrating factor.}
\[
I.F. = e^{\int \frac{1}{x} dx}
\]
\[
= e^{\ln x}
\]
\[
= x
\]
Step 3: {Multiply the differential equation by the integrating factor.}
\[
x\frac{dy}{dx} + y = x^3
\]
Left side becomes derivative of a product:
\[
\frac{d}{dx}(xy) = x^3
\]
Step 4: {Integrate both sides.}
\[
\int \frac{d}{dx}(xy)\,dx = \int x^3\,dx
\]
\[
xy = \frac{x^4}{4} + C
\]
Step 5: {Solve for \(y\).}
\[
y = \frac{x^4}{4x} + \frac{C}{x}
\]
\[
y = \frac{x^3}{4} + \frac{C}{x}
\]