Why is the difference between these two functions a constant?
$$f(x)=\frac{2x^2-x}{x^2-x+1}$$ $$g(x)=\frac{x-2}{x^2-x+1}$$
Since the denominators are equal and the numerators differ in degree I would never have thought the difference of these functions would be a constant.
Of course I can calculate it is true: the difference is $2$, but my intuition is still completely off here. So, who can provide some intuitive explanation of what is going on here? Perhaps using a graph of some kind that shows what's special in this particular case?
Thanks!
BACKGROUND: The background of this question is that I tried to find this integral:
$$\int\frac{x dx}{(x^2-x+1)^2}$$
As a solution I found:
$$\frac{2}{3\sqrt{3}}\arctan\left(\frac{2x-1}{\sqrt{3}}\right)+\frac{2x^2-x}{3\left(x^2-x+1\right)}+C$$
Whereas my calculusbook gave as the solution:
$$\frac{2}{3\sqrt{3}}\arctan\left(\frac{2x-1}{\sqrt{3}}\right)+\frac{x-2}{3\left(x^2-x+1\right)}+C$$
I thought I made a mistake but as it turned out, their difference was constant, so both are valid solutions.



It is just a bit of clever disguise. Take any polynomial $p(x)$ with leading term $a_n x^n$.
Now consider $$\frac{p(x)}{p(x)}$$ This is clearly the constant $1$ (except at zeroes of $p(x)$).
Now separate the leading term: $$\frac{a_n x^n}{p(x)} + \frac{p(x) - a_n x^n}{p(x)}$$
and re-write to create the difference:
$$\frac{a_n x^n}{p(x)} - \frac{a_n x^n - p(x)}{p(x)}$$
Obviously the same thing and hence obviously still $1$ but the first has a degree $n$ polynomial as its numerator and the second a degree $n - 1$ or less polynomial.
Similarly, you could split $p(x)$ in many other ways.