How to integrate $\int_{1}^{e}\frac{x^2 - 1}{x}dx$ $$\int_{1}^{e}\frac{x^2 - 1}{x}dx$$
I tried to integrate it by splitting the numerator. I get undefined as my final answer. Any help would be super appreciated. 
Edit: The lower limit was 1. My apologies
Thanks, 
SG
 A: You just have:
$$
\begin{align}
\int_1^e \frac{x^2-1}xdx
&=\!\int_1^e \frac{x^2}xdx-\int_1^e \frac{1}xdx \\
&=\int_1^e x \:dx-\int_1^e \frac{1}xdx\\
&=\left[\frac{x^2}2-\ln |x|\right]_1^e\\
&=\frac{e^2}2-\frac{3}2\\
\end{align}
$$
A: This integral is not improper, so you shouldn't get undefined. $$\begin{align}\int_1^e \frac{x^2 - 1}{x}\text{d}x =\int_1^e x-\frac{1}{x}\text{d}x \\ =  \left[\frac{1}{2}x^2-\ln|x|\right]_1^e \\ = \frac{1}{2}e^2-\ln|e|-\left(\frac{1}{2}1^2-\ln|1|\right) \\ = \frac{1}{2}e^2-1-\frac{1}{2}+0 \\ = \frac{1}{2}e^2-\frac{3}{2} \end{align}$$
A: As an improper integral we may write
$$\begin{align}
\int_0^e \frac{x^2-1}{x} dx &=\lim_{\epsilon \to 0} \int_{\epsilon}^e \frac{x^2-1}{x} dx \\
&=\lim_{\epsilon \to 0} \left(\frac12 (e^2- \epsilon^2) -(\log e -\log \epsilon)  \right) \\
&=- \infty
\end{align}$$
Thus, the integral diverges.
Edit after the OP edit.
Replace $\epsilon$ by $1$ in the previous answer to reveal
$$\int_1^e \frac{x^2-1}{x} dx=\frac12(e^2-1) -(\log e -\log 1) =\frac12(e^2-3)$$
