# Verifying a solution to a differential equation

How can I verify if this function $$y(x) = {1\over x}\int_{1}^x{e^{t}\over t}dt$$ is a solution of the differential equation $x^2y'+xy=e^x$?

I am stuck. I am pretty sure that I have to find the derivative of y and then plug it in to the first equation... but I am not sure how for this scenario. Any help would be greatly appreciated.

If $y(x)= {1\over x}\int_{1}^x{e^{t}\over t}dt$ then, for $x>0$, $$y'(x)=-{1\over x^2}\int_{1}^x{e^{t}\over t}dt+{1\over x}\cdot{e^{x}\over x}=-{y(x)\over x}+{e^{x}\over x^2},$$ that is $x^2y'(x)+xy(x)=e^x$. Hence it is a solution of the differential equation for $x>0$.