How to divide ${2k^3+3k^2+k-2j^3+3j^2-j}$ with $(k+1-j)$? The question I had was calculating $$\displaystyle\frac{1}{k+1-j}\sum_{i=j}^k i^2$$ 
Because I didn't know how to do a variable change, I did
$$\frac{1}{k+1-j}\sum_{i=j}^k i^2 = \frac{1}{k+1-j}\left(\sum_{i=1}^k i^2 - \sum_{i=1}^{j-1} i^2\right) = \frac{2k^3+3k^2+k-2j^3+3j^2-j}{6(k+1-j)}$$ 
The solution given used variable change and was able to cancel out $(k+1-j)$ very easily. Finally the answer was $$\frac{2k^2 + 2j^2 + 2kj - j + k}{6}$$ I have verified that these two solutions are the same by multiplying the second one with $(k+1-j).$ 
My question is:  

How do you divide an expression like ${(2k^3+3k^2+k-2j^3+3j^2-j)}$ with $(k+1-j)$? Is it even worth it in this case to get the most simplified solution? 


You could use synthetic division fairly easily here.
First, we consider $2k^3+3k^2+k-2j^3+3j^2-j$ as a polynomial in $k,$ and write the $4$ coefficients $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\ & & & &\\\hline & & & &\end{array}$$ Next, we invert the coefficients of the divisor $k+1-j$ to get $-1k+j-1,$ and write the constant term in as $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & & &\\\hline & & & &\end{array}$$ We bring down the first term to get $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & & &\\\hline & 2 & & &\end{array}$$ Now, we multiply what we've just brought down by $j-1$ and write in the result as $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & 2j-2 & &\\\hline & 2 & & &\end{array}$$ Now, adding the numbers in that column gets us $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & 2j-2 & &\\\hline & 2 & 2j+1 & &\end{array}$$ Multiply that result by $j-1$ and write it in to get $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & 2j-2 & 2j^2-j-1 &\\\hline & 2 & 2j+1 & &\end{array}$$ Adding again gives us $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & 2j-2 & 2j^2-j-1 &\\\hline & 2 & 2j+1 & 2j^2-j &\end{array}$$ Multiplying again by $j-1$ and then adding once more, we get $$\begin{array}{c|cccc} & 2 & 3 & 1 &-2j^3+3j^2-j\\j-1 & & 2j-2 & 2j^2-j-1 & 2j^3-3j^2+j\\\hline & 2 & 2j+1 & 2j^2-j &0\end{array}$$ Translating back into terms of a polynomial in $k,$ this means that $$\frac{2k^3+3k^2+k-2j^3+3j^2-j}{k+1-j}=2k^2+(2j+1)k+2j^2-j+\frac{0}{k+1-j},$$ or more simply, $$\frac{2k^3+3k^2+k-2j^3+3j^2-j}{k+1-j}=2k^2+2j^2+2jk-j+k,$$ as desired.
