Answer
$y= \frac{e^{x}+C}{x}, x>0$
Work Step by Step
$x\frac{dy}{dx}+y= e^{x}$
Dividing by x, we get
$\frac{dy}{dx}+\frac{1}{x}y= \frac{e^{x}}{x}$.
Comparing the above equation with $\frac{dy}{dx}+Py=Q$, we have
$P=\frac{1}{x}$ and $Q= \frac{e^{x}}{x}$.
Integrating Factor $I.F = e^{\int Pdx}$
$=e^{\int \frac{1}{x}dx}=e^{log|x|}= e^{logx}$ (as x>0)
$=x$
General solution is obtained by the equation written as,
$y(I.F)= \int (Q\times I.F)dx+C$
That is, $yx= \int(\frac{e^{x}}{x}\times x)dx+C$
or $yx= e^{x}+C$
or $y= \frac{e^{x}+C}{x}, x>0$