Find the general solution of the differential equation
\[
\frac{dy}{dx}+\frac{y}{x}=x^2 .
\]
Show Hint
For a linear differential equation
\[
\frac{dy}{dx}+P(x)y=Q(x),
\]
first compute the integrating factor
\[
\text{I.F.=e^{\int P(x)\,dx}.
\]
Multiplying the equation by the I.F. converts the left side into
\(\frac{d}{dx}(y\cdot \text{I.F.)\), making the equation easy to integrate.
Concept:
The given equation is a linear differential equation of the form
\[
\frac{dy}{dx}+P(x)y=Q(x)
\]
where
\[
P(x)=\frac{1}{x}, \qquad Q(x)=x^2
\]
The solution is obtained using the integrating factor (I.F.):
\[
\text{I.F.=e^{\int P(x)\,dx}
\]
Step 1: Find the integrating factor.
\[
\text{I.F.=e^{\int \frac{1}{x}dx}
\]
\[
=e^{\ln x}=x
\]
Step 2: Multiply the equation by the integrating factor.
\[
x\frac{dy}{dx}+y=x^3
\]
The left-hand side becomes the derivative of a product:
\[
\frac{d}{dx}(xy)=x^3
\]
Step 3: Integrate both sides.
\[
xy=\int x^3\,dx
\]
\[
xy=\frac{x^4}{4}+C
\]
Step 4: Express the solution for \(y\).
\[
y=\frac{x^4}{4x}+\frac{C}{x}
\]
\[
y=\frac{x^3}{4}+\frac{C}{x}
\]
Step 5: General solution.
\[
\boxed{y=\frac{x^3}{4}+\frac{C}{x}}
\]