Why are the limits different? Consider $\lim_{ x \to -\infty} \sqrt{x^2-x+1}+x$ 
Rationalising, one will get, $\lim_{x \to -\infty} \frac{1-x}{\sqrt{x^2-x+1}-x}$, which after taking x common and cancelling out gives $-\infty$.
Now, replace $x$ by $-x$, so the limit becomes, $\lim_{x \to \infty} \frac{1+x}{\sqrt{x^2+x+1}+x}$, which evaluates to $1/2$. In the book, the answer given is $1/2$, I want to know, why did we use this change of variable to evaluate limit? and, why is the first method wrong?

\begin{align*}
\lim_{x \to -\infty} \left(\sqrt{x^2 - x + 1} + x\right) & = \lim_{x \to -\infty} \left(\sqrt{x^2 - x + 1} + x\right) \cdot \frac{\sqrt{x^2 - x + 1} - x}{\sqrt{x^2 - x + 1} - x}\\
& = \lim_{x \to -\infty} \frac{x^2 - x + 1 - x^2}{\sqrt{x^2 - x + 1} - x}\\
& = \lim_{x \to -\infty} \frac{-x + 1}{\sqrt{x^2 - x + 1} - x}\\
& = \lim_{x \to -\infty} \frac{-x + 1}{|x|\sqrt{1 - \frac{1}{x} + \frac{1}{x^2}} - x}\\
& = \lim_{x \to -\infty} \frac{-x + 1}{-x\sqrt{1 - \frac{1}{x} + \frac{1}{x^2}} - x}\\
& = \lim_{x \to -\infty} \frac{1 - \frac{1}{x}}{\sqrt{1 - \frac{1}{x} + \frac{1}{x^2}} + 1}\\
& = \frac{1}{2}
\end{align*}
where we have used the fact that $\sqrt{x^2} = |x| = -x$ if $x < 0$.
