Find the remainder for $(x^5-x^4+x^3+2x^2-x+4)/(x^3+1)$ 
Find the remainder for $\dfrac{x^5-x^4+x^3+2x^2-x+4}{x^3+1}$  

I know exactly how to synthetically divide in the format of: $(x\pm a)$. But not $(x^n\pm a)$ (with an exponent). So if anyone can tell me if anything changes or if the steps are the exact same just with the remainder as $\dfrac{remainder}{x^n\pm a}$. And please do not solve the problem for me.  
Edit:
I think I've reached an answer. Long division confused me so I used expanded synthetic division and got: $x^2-x+1+\left(\dfrac{x^2+3}{x^3+1}\right)$. Can anyone verify my answer please.

It works like any standard division you've done. You start by taking the highest power of $x$ possible to substract to the numerator. In your case, your first term to be $x^2$. You keep on going until you are done, like any usual division. so for the first step you get
$$
\frac{x^5-x^4+x^3+2x^2-x+4}{x^3+1}=x^2+\frac{-x^4+x^3+x^2-x+4}{x^3+1}
$$
