Factoring in the derivative of a rational function Given that
$$
f(x) = \frac{x}{1+x^2}
$$
I have to find
$$\frac{f(x) - f(a)}{x-a}$$
So some progressing shows that:
$$
\frac{\left(\frac{x}{1+x^2}\right) - \left(\frac{a}{1+a^2}\right)}{x-a} =
\frac{(x)(1+a^2)-(a)(1+x^2)}{(1+x^2)(1+a^2)}\cdot\frac{1}{x-a} =
\frac{x+xa^2-a-ax^2}{(1+x^2)(1+a^2)(x-a)}
$$
Now, is it possible to factor $x+xa^2-a-ax^2$? I can't seem to find a way, as for simplifying the whole thing. Is there any rule I can use, and I'm unable to see?
 A: $$\eqalign{x+xa^2-a-ax^2&= x-a+xa^2-ax^2 \\ & = x-a+x(a^2-ax) \\ &= x-a+x(a(a-x)) \\ &= x-a+x(-a(x-a)) \\ &=\color{blue}{x-a}-ax\color{blue}{(x-a)} \\ &=(x-a)(1-ax).\;\checkmark
}$$
Therefore you can conclude that: $$\eqalign{\require{cancel}\dfrac{f(x)-f(a)}{x-a}&=\dfrac{x+xa^2-a-ax^2}{(1+x^2)(1+a^2)(x-a)} \\ &=\dfrac{\color{red}{\cancel{\color{black}{(x-a)}}}(1-ax)}{(1+x^2)(1+a^2)\color{red}{\cancel{\color{black}{(x-a)}}}} \\ &= \dfrac{1-ax}{(1+x^2)(1+a^2)}.
}\tag{$x\neq a$}$$
A: Since $x-a$ is in the denominator, it makes sense to consider the possibility that $x-a$ is a factor of the numerator. (If you know the factor theorem, you can see this is the case, since the numerator equals zero when $x = a.)$ I see $x-a$ in the numerator, along with two other terms. Very little cleverness is needed at this point to write
$$x-a + xa^2 - ax^2 \; = \; x - a + ax(a-x)$$
$$ = \; (x-a) - ax(x-a) \; = \; (x-a)(1-ax)$$
A: By the quotient rule for the difference $\ f'(x)\, :=\, \dfrac{f(x)-f(a)}{x-a}$
$$\quad \begin{eqnarray} (g/h)'(x) &=\,\ & \dfrac{\color{#c00}{g'(x)} h(a) - g(a)\color{#0a0}{h'(x)}}{h(a)h(x)}\\ 
\begin{array}{l}\ g(x)=x\qquad\Rightarrow\,\color{#c00}{g'(x) = 1}\\ h(x) = 1+x^2\,\Rightarrow\,\color{#0a0}{h'(x) = x+a}\\\end{array}\ \Bigg\}\!\!\!\!\!&=& \dfrac{\color{#c00}1\cdot (1+a^2)\overset{\phantom{I^I}}-a(\color{#0a0}{x+a})}{(1+a^2)(1+x^2)}\ =\  \dfrac{1-ax}{(1+a^2)(1+x^2)}\end{eqnarray}$$
A: Hint: you can guess that something interesting is going to happen near $x = a$, which suggests looking to factor $x-a$.
Indeed, $x + xa^2 - a - ax^2 = (x-a) + xa(x-a)$.
A: Factor:
$$x+xa^2−a−ax^2=x-a-ax^2+xa^2=(x-a)-ax(x-a)=(1-ax)(x-a)$$
Thus, $$\frac{f(x)-f(a)}{x-a}=\frac{\frac{(1-ax)(x-a)}{(1+x^2)(1+a^2)}}{(x-a)}=\boxed{\frac{1-ax}{(1+x^2)(1+a^2)}}$$
