Find a polynomial of degree at most 7 which leaves remainders –1 and 1 upon division by $(x-1)^4$ and $(x+1)^4$ respectively 
A polynomial of degree at most 7 is such that leaves remainders –1 and 1 upon division by $(x-1)^4$ and $(x+1)^4$ respectively. Find the sum of roots of this polynomial.

Now as we have to find sum , I thinks it's pointing towards using viete. From remainder theorem , we get $f(x) = g_1(x)(x-1)^4-1$ and $f(x) = g_2(x)(x+1)^4+1$ where $g_{1,2}(x)$ is a polynomial of degree atmost 3 . But from this point , I get no more ideas. Like assuming a cubic for g(x) and then using binomial on $(x-1)^4$ is to too long and doesn't get me anywhere. Please help
The above approach is followed Here but there it's manageable because the powers are small, so is there no alternate elegant way ??
 A: We want that
$$\bigl[f(x)):=\bigr]\qquad a(x)(x-1)^4-1 =b(x)(x+1)^4+1$$
for certain polynomials
$$a(x)=\sum_{k=0}^3a_k x^k,\quad b(x)=\sum_{k=0}^3b_k x^k\ .$$
Put the coefficients of the degree $7$ polynomial $$\phi(x):=\bigl(a(x)(x-1)^4-1\bigr)-\bigl(b(x)(x+1)^4+1\bigr)$$
to $0$. This determines the $a_k$ and the $b_k$. You obtain
$$a(x)=1+{29x\over16}+{5x^2\over4}+{5x^3\over16},\qquad b(x)=-a(-x)\ .$$ This leads to the unique solution of your problem, namely
$$f(x)=a(x)(x-1)^4-1={x\over16}(-35+35x^2-21x^4+5x^6)\ .$$
A: From $f(x) = g_1(x)(x-1)^4-1$ we get $f'(x)=(g_1'(x)(x-1)+4g_1(x))(x-1)^3$, and so 
$$f'(x)=g(x)(x-1)^3$$ 
for some polynomial $g(x)$. Similary from the $f(x) = g_2(x)(x+1)^4+1$ we obtain 
$$f'(x)=h(x)(x+1)^3$$ for some polynomial $h(x)$. 
Having $f(x)$ seventh degree polynomial, that makes $f'(x)$ a sixth degree polynomial, and so we have 
$$f'(x)=K(x-1)^3(x+1)^3=K(x^6-3x^4+3x^2-1)$$
for some $K \in \mathbb{Q}$. So, by integrating, 
$$
f(x)=K\left(\frac{1}{7}x^7-\frac{3}{5}x^5+x^3-x\right)+L,
$$
for some $K,L \in \mathbb{Q}$. 
Finally, by Vieta's formula, sum of the roots of $f(x)$ is just $0$. 
Note that it is also straightforward to derive the constants by using $f(1)=-1$ and $f(-1)=1$, however for finding the sum of roots, this is not necessary.
