Working through all the problems in Spivak's Calculus (3E) and hit a snag here.
Given $c, d \in R$, and distinct $x_1, ..., x_n \in R$, show that for any given $1 \leq i \leq n$ there exists a polynomial function $f$ of degree $2n-1$ such that $f(x_i) = c$, $f'(x_i) = d$, and $f$ has a double root at every other $x_j$.
Here's what I have so far:
In order for it to have a double root at those points, such a function must take the form $f(x) = (x - x_1)^2...(x-x_{i-1})^2(x-x_{i+1})^2...(x-{x_n})^2H(x)$
Where $H(x)$ is some polynomial. Furthermore, since the double roots already give it an order of $2n-2$, $H(x) = ax+b$.
So we have $f(x) = (x - x_1)^2...(x-x_{i-1})^2(x-x_{i+1})^2...(x-{x_n})^2(ax+b)$
Or $f(x) = g(x)(ax+b)$ to shorten it.
Now we end up with a system of equations with two unknowns $a$ and $b$:
$g(x_i)x_ia+g(x_i)b = c$
$(g'(x_i)x_i + g(x_i))a + g'(x_i)b = d$
The determinant of the coefficient matrix is just $(g(x_i))^2$, which is non-zero since its only roots are the other $x_j$, i.e. the matrix is invertible, so it has a unique solution. There's just one problem:
What if $c = g(x_i)$ and $d = g'(x_i)$? Then the solution is $(a,b) = (0, 1)$ and our polynomial $f$ has degree $2n-2$ instead of $2n-1$. Am I missing something or is this an error in Spivak? Also, is there a list of errors somewhere online? Tried looking online but couldn't find one.