Evaluation of improper integral I have to evaluate:
$$\int_{0}^{2}\frac{x^{2}-x+1}{x-1}dx$$
So I divide it in:
$$\int_{0}^{1}\frac{x^{2}-x+1}{x-1}dx+\int_{1}^{2}\frac{x^{2}-x+1}{x-1}dx$$ and the integral is equal to:
$$\frac{x^{2}}{2}+\ln (\left | x-1 \right |)$$ Then I substitute 1 as :$$\lim_{a \to 1^{-}} \left [  \frac{x^{2}}{2}+\ln (\left | x-1 \right |)\right ]_{0}^{a}+\lim_{b \to 1^{+}} \left [  \frac{x^{2}}{2}+\ln (\left | x-1 \right |)\right ]_{b}^{2}$$
But then I got indefinite term.
Can anyone help me?
 A: Maybe partial fraction decomposition and a small $u$-substitution will help you see that this integral should diverge, so its value does not exist.
$$  \frac{x^2 - x + 1}{x-1} = x + \frac{1}{x-1}  $$
so
$$  \int_0^2 \frac{x^2 - x + 1}{x-1} \,\mathrm{d}x = \int_0^2 x + \frac{1}{x-1} \,\mathrm{d}x  \text{.}  $$
Linearity of the integral gives
$$  \int_0^2 x + \frac{1}{x-1} \,\mathrm{d}x = \int_0^2 x \,\mathrm{d}x + \int_0^2 \frac{1}{x-1} \,\mathrm{d}x  \text{.}  $$
The first integral, as you have shown, is easy.  Let's apply a substitution, $x \mapsto u+1$ so $\mathrm{d}x \mapsto \mathrm{d}u$, to the second integral.
$$  \int_0^2 x \,\mathrm{d}x + \int_0^2 \frac{1}{x-1} \,\mathrm{d}x = \left. \frac{x^2}{2} \right|_{x=0}^2 + \int_{-1}^1 \frac{1}{u} \,\mathrm{d}u  \text{.}  $$
The evaluation for the first term is easy.  (Perhaps we already realize that the integral has no hope of converging by the $p$-test.)  But we should recognize that the integral cannot be approached directly with the Fundamental Theorem of Calculus because its integrand is not continuous (at $x = 0$).  So we break it at $x = 0$.
$$ \left. \frac{x^2}{2} \right|_{x=0}^2 + \int_{-1}^1 \frac{1}{u} \,\mathrm{d}u = 2 + \int_{-1}^0 \frac{1}{u} \,\mathrm{d}u + \int_{0}^1 \frac{1}{u} \,\mathrm{d}u  \text{.}  $$
An antiderivative of $1/x$ is $\ln |x|$.  So we have \begin{align*}
2 + \int_{-1}^0 \frac{1}{u} \,\mathrm{d}u + \int_{0}^1 \frac{1}{u} \,\mathrm{d}u &= 2 + \Bigl. \ln |u| \Bigr|_{-1}^0 + \Bigl. \ln |u| \Bigr|_{0}^1  \\
    &= 2 + (\lim_{u \rightarrow 0^-}\ln |u| - \ln 1) + (\ln 1 - \lim_{u \rightarrow 0^+} \ln |u|)  \text{.}  
\end{align*}
Since the first limit does not exist, the integral from which it comes does not converge and so the original integral does not converge.  The value of that integral does not exist.  Similarly, the second limit does not exist, the integral from which it comes does not converge, and the original integral does not converge.
As noted in comments, the Cauchy Principal Value of this integral is computed by using the fact that $\frac{1}{u}$ is an odd function to say that the integral $\int_{-a}^a \frac{1}{u} \,\mathrm{d}u = 0$ for all $a > 0$.  We have the case $a = 1$ above.  If we had been asked to compute a Cauchy Principal Value, we would have 
$$  \mathrm{PV}\int_0^2 \frac{x^2 - x + 1}{x-1} \,\mathrm{d}x = \cdots = 2  \text{.}  $$
