Intuition for why the difference between $\frac{2x^2-x}{x^2-x+1}$ and $\frac{x-2}{x^2-x+1}$ is a constant?

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.


Would you be surprised that the difference of $\dfrac{2x^2+x+1}{x^2}$ and $\dfrac{x+1}{x^2}$ is $2$?


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.


I'm not sure anyone is speaking to your observation that the two numerators have different degrees.

Let's flip this around the other way:

\begin{align*} \frac{x-2}{x^2-x+1} + 2 &= \frac{x-2}{x^2-x+1} + 2\frac{x^2-x+1}{x^2-x+1} \\ &= \frac{2x^2 -x}{x^2-x+1} \text{.} \end{align*} That is, we started with a thing having a linear numerator and added a constant to it. But when we brought the constant to have a common denominator, it picked up a degree two factor. Then the addition was forced to produce a degree two sum.

To sum up, in the context of rational functions, when you add constants, you are adding polynomials having the degree of the denominator to the polynomials in the numerators. So constants effectively have "degree two in the numerator" in your example.