<s>[INST] 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? 

 [/INST] Try to write the polynomial in $k$ as a polynomial in $m=k+1$.
$2k^3+3k^2+k=\big[2(k+1)^3-2-6k-6k^2\big]+\big[3(k+1)^2-3-6k\big]+(k+1)-1\\=2(k+1)^3+3(k+1)^2+(k+1)-6(1+2k+k^2)\\=2m^3-3m^2+m$
Therefore, $2m^3-3m^2+m-2j^3+3j^2-j=2(m^3-j^3)-3(m^2-j^2)+m-j\\=(m-j)\big[2(m^2+j^2+mj)-3(m+j)+1\big]$
Divide by $k+1-j=m-j$ and back-substitute $m$ to get,
$$2(m^2+j^2+mj)-3(m+j)+1=2k^2+2j^2+2kj+k-j$$
</s>