Spivak Calculus problem with inductive proof of polynomial property Ok so I have been trying to do this proof of what seems to be a version of Factor theorem(I am now well versed in math so please forgive me if I am wrong).
Problem goes like this:


Prove that for any polynomial function f and any number a,there is polynomial g(x) such that f(x) = (x-a)g(x) + b .Proof is possible by induction on degree of polynomial


Proof for degree one is trivial.Now if we assume it is true for degree k we can proceed to prove for k+1.My proof for k+1 goes like this:
$f(x) = c_0 + c_1x + ... c_{k+1}x^{k+1} $ which is of degree k+1
Then we can assume that :
$f(x) - c_{k+1}x^{k+1} = (x-a)g(x) + b $    which is of degree k
Now my issue is that from this form I can not get the form required.Also proof from the answer book is not of much help.It goes like this:


Assume the preposition is true for degree k and we have:
    $$f(x) = a_{k+1}x^{k+1} + ... + a_1x + a_0 $$
Now polynomial $$h(x) = f(x) - a_{k+1}(x-a) $$ is of degree $\leq k$ so we can write:
$$ f(x) - a_{k+1}(x-1) = (x-a)g(x) + b $$ or
    $$f(x)=(x-a)[g(x) + a_{k+1}] + b $$


My questions are :
1)How is h(x) of degree $\leq k $ when f(x) is k+1,should we not substract $a_{k+1}x^{k+1}$ to get lesser degree
2)How can we from first resulting form obtain the second one,since as far as I see in first form g(x) should be of degree k-1 ,and in second it should be k unless b or $a_{k+1}$ is of degree k+1 or k respectively
Please help .I have spent hours trying to figure this proof out,still does not make sense.
Problem can be found in Spivak Calculus vol.1 chapter 3 problem 7(a)
 A: First, the answer as written is wrong; as you observe, the degree will only be reduced if we subtract the thing you recommended. 
{In what follows, I'm using $c_i$ as the $i$th coefficient rather than $a_i$.}
But if you instead wrote
$$
f(x)−c_{k+1}(x^{k+1} - a x^{k})
$$
you'd still have a degree-$k$ polynomial, and could by induction write
$$
f(x)−c_{k+1}(x^{k+1} - a x^{k}) =(x−a)g(x)+b
$$
where $g$ is a degree-$(k-1)$ polynomial. 
Now moving things to the other side, you get
$$
f(x) = c_{k+1}(x^{k+1} - a x^{k}) + (x−a)g(x)+b \\
= c_{k+1}x^k (x- a) + (x−a)g(x)+b \\
$$
You can now combine the first two terms, and you're on your way!
A: Or you can go the calculus route disregarding the hint and write for $u(t)=f(a+t(x-a))$
$$u(1)-u(0)=\int_0^1 u'(t)\,dt=\int_0^1 f'(a+t(x-a))(x-a)\,dt,$$
that is,
$$f(x)=f(a)+(x-a)\int_0^1 f'(a+t(x-a))\,dt.$$
Then note that the integrand is polynomial in $x$ of degree $\deg(f)-1$ and that as a linear property this remains invariant under integration.
A: Observe that since $f(x)$ is a polynomial, it is defined over the entire real line $\mathbb{R}$.
Furthermore, the slope of the line running through the points $x \in \mathbb{R}$ and $a \in \mathbb{R}$ with $x \not = a$ is
$$g(x;a) = \frac{\mathrm{rise}}{\mathrm{run}} = \frac{f(x) - f(a)}{x - a}.$$
For fixed $a$, let $f(a) = b$.
Then $(x-a)g(x) = f(x) - b$ and
$$f(x) = (x-a)g(x) + b.$$
Finally, note that although $g(x) = \infty$ at $x = a$,
$$f(a) = (a - a)g(a) + b = b$$
and is therefore consistent with the fact that the domain of $f$ is $\mathbb{R}$.
