I'm reading this answer of The logic behind partial fraction decomposition, I think my question is too basic and not directly related to the answer so I don't comment there. I don't understand why:

\begin{align} f(x) - \frac{c_r}{x - r} = \frac{1}{x - r} \left( \frac{P(x)}{R(x)} - \frac{P(r)}{R(r)} \right). \end{align} The expression in parentheses approaches $$0$$ as $$x \to r$$, and in fact it is a rational function whose numerator is divisible by $$x - r$$, so we can actually divide by $$x - r$$.

Why $$\left( \frac{P(x)}{R(x)} - \frac{P(r)}{R(r)} \right)$$ is divisible by $$x-r$$?

What I understand a little about the partial fraction is that it's because something forms a vector space so the $$f(x)$$ can be expressed/decomposed like that, but I'm not sure.

I'm not clear what the difficulty is. So, let's work through the algebra first.

Recall (first paragraph of the answer you cite), $$f(x) = P(x)/Q(x)$$ and $$Q(x) = (x-r)R(x)$$ and also (second paragraph) $$c_r = P(r)/R(r)$$. So, \begin{align*} f(x) - \frac{c_r}{x-r} &= \frac{P(x)}{Q(x)} - \frac{c_r}{x-r} \\ &= \frac{P(x)}{(x-r)R(x)} - \frac{c_r}{x-r} \\ &= \frac{P(x)}{(x-r)R(x)} - \frac{P(r)}{(x-r)R(r)} \\ &= \frac{1}{x-r} \cdot \frac{P(x)}{R(x)} - \frac{1}{x-r} \cdot \frac{P(r)}{R(r)} \\ &= \frac{1}{x-r} \left( \frac{P(x)}{R(x)} - \frac{P(r)}{R(r)} \right) \text{.} \end{align*}

So, perhaps the hiccup isn't the algebra, but is in why $$f$$, $$Q$$, and $$c_r$$ have the specified values?

Your comments make me think we should cover why the facts I "recall" above are true.

• $$f(x) = P(x)/Q(x)$$: The Question introduced the fraction $$P(x)/Q(x)$$ and here we give it a name. It is given that $$P$$ and $$Q$$ are polynomials. So if $$P$$ is nonconstant, it has (complex) zeroes and likewise, non-constant $$Q$$ has zeroes.
• Let $$n$$ be the degree of $$Q$$ and $$r_1, r_2, r_3, \dots, r_n$$ be the roots of $$Q$$ (with repetitions, if $$Q$$ has any repeated root). Then it is a standard fact that $$Q(x) = a(x-r_1)(x-r_2)(x-r_3)\cdots (x-r_n)$$ for some constant $$a$$.
You might be concerned that $$Q$$ has some other factorization that doesn't include $$x-r$$. But we know $$Q$$ is zero at $$r$$. The only way a product of things can be zero is when one (or more) of them are zero. So, any factorization of $$Q$$ includes a factor of $$x-r$$.
• We have already assumed that $$P$$ and $$Q$$ have no common factors. Why? If $$P$$ and $$Q$$ have common factors, we can "cancel" them, in matched pairs, one from $$P$$ and one from $$Q$$, until $$P$$ and $$Q$$ have no common factors. The effect of those common factors is to poke a hole in our graph.
As an example, if $$(x-s)^3(x-t)$$ is a common factor of $$P$$ and $$Q$$, then we work with $$P'(x)$$ and $$Q'(x)$$ where $$P'(x) = \frac{P(x)}{(x-s)^3(x-t)}$$ and $$Q'(x) = \frac{Q(x)}{(x-s)^3(x-t)}$$, so $$\frac{P(x)}{Q(x)} = \frac{(x-s)^3(x-t)P'(x)}{(x-s)^3(x-t)Q'(x)} = \frac{P'(x)}{Q'(x)}$$ is an identity.
(Note that being an identity means that the expressions all agree wherever they are all defined. $$P'$$ and $$Q'$$ are undefined at $$s$$ and $$t$$. In fact, $$f = \frac{P}{Q}$$ is undefined at the zeroes of $$Q$$ because division by zero is undefined. When we factor the common factors of $$P$$ and $$Q$$ out, we get a new, simpler expression, but the zeroes of $$Q$$ are still not in the domain of $$f$$, so they are "holes" in the graph of $$f$$. The coordinates of these holes are found by evaluating the cancelled fraction at the $$x$$-coordiante of the hole, $$\left(s, \frac{P'(s)}{Q'(s)}\right)$$ and $$\left(t, \frac{P'(t)}{Q'(t)}\right)$$. When we graph $$P'(x)/Q'(x)$$ it goes through these points. The graph of $$P(x)/Q(x)$$ is the same, except we delete those two points.)
• Having said all the above about cancelling common factors, it should be clear that $$\left(r, \frac{P(r)}{Q(r)} \right)$$ are the coordinates of a hole in the graph of $$f$$, so setting $$c_r = \frac{P(r)}{Q(r)}$$ is the right thing to do.
• But why the part in the parentheses is divisible by $x-r$? I'm not very good at math so may be apparent but I didn't see it... – user7813604 Dec 21 '18 at 1:54
• @user7813604 The part inside the parentheses must be divisible by $x-r$ because we assumed that $f$ had a simple pole at $r$, and on the LHS we have removed it by subtracting off just that pole scaled appropriately by the value $c_r=P(r)/R(r)$ (notice the typo in this answer, and compare to the post you linked to in the OP). – DeficientMathDude Dec 21 '18 at 2:31
• @user7813604 Alternatively, you can say that the part inside the parentheses must be divisible by $x-r$ because it is a rational function that goes to $0$ at $r$; if the numerator doesn't go to $0$ then the entire expression can't go to $0$, and the numerator going to $0$ by definition means that the numerator is divisible by the monomial $(x-r)$. – DeficientMathDude Dec 21 '18 at 2:35
• @DeficientMathDude: Thanks! What I really want to know is your second comment, I wanted to ask about why the fact that "a rational function that goes to 0 at r" means "the numerator is divisible by the monomial (x-r)". Because I don't think in my current level I am able to understand the "simple pole at r" since I don't know about complex analysis (I want to avoid it). – user7813604 Dec 21 '18 at 3:30
• @DeficientMathDude : Thanks for catching the typo. Fixed in all three places. – Eric Towers Dec 21 '18 at 18:06