## Calculus with Applications (10th Edition)

$$y = \frac{{{x^2}}}{4} + 2x + \frac{C}{{{x^2}}}$$
\eqalign{ & x\frac{{dy}}{{dx}} + 2y = {x^2} + 6x,\,\,\,\,\,\,x > 0 \cr & {\text{this equation is not written in the form }}\frac{{dy}}{{dx}} + P\left( x \right)y = Q\left( x \right) \cr & {\text{dividing both sides of the equation by }}x \cr & \frac{{dy}}{{dx}} + \frac{2}{x}y = x + 6 \cr & {\text{the equation is already written in the form }}\frac{{dy}}{{dx}} + P\left( x \right)y = Q\left( x \right) \cr & {\text{we can note that }}P\left( x \right){\text{ is }}\frac{2}{x} \cr & {\text{The integrating factor is }}I\left( x \right) = {e^{\int {P\left( x \right)} dx}} \cr & I\left( x \right) = {e^{\int {\frac{2}{x}} dx}} = {e^{2\ln x}} = {e^{\ln {x^2}}} = {x^2} \cr & {\text{multiplying both sides of the differential equation }}\frac{{dy}}{{dx}} + \frac{2}{x}y = x + 6{\text{ by }}{x^2} \cr & {x^2}\frac{{dy}}{{dx}} + 2xy = {x^3} + 6{x^2} \cr & {\text{Write the terms on the left in the form }}{D_x}\left[ {I\left( x \right)y} \right] \cr & {D_x}\left[ {{x^2}y} \right] = {x^3} + 6{x^2} \cr & {\text{solve for }}y{\text{ integrating both sides}} \cr & {x^2}y = \int {\left( {{x^3} + 6{x^2}} \right)} dx \cr & {x^2}y = \frac{{{x^4}}}{4} + 2{x^3} + C \cr & y = \frac{{{x^2}}}{4} + 2x + \frac{C}{{{x^2}}} \cr}