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.
 A: Standard synthetic division only works with a divisor in the form: $\left(x ± a\right)$. 
There are two approaches for dividing polynomials not in the above specified format.


*

*Polynomial long division. The link contains a complete example of the method, as you requested.

*Expanded Synthetic Division
A comprehensive understanding of the workings of synthetic division would have led you to the conclusion that it wouldn't work in formats other than the one specified above. I suggest you investigate the reason synthetic division works.
A: All you have to do is do long division; alternatively, you can subtract appropriate multiples of $x^3+1$ and replace the dividend by the difference until you get a term that is of degree strictly smaller than $3$. (In other words, do polynomial long division analytically instead of synthetically).
For instance, suppose we were trying to find the remainder of dividing 
$$2x^5 - 3x^2 + 1$$
by
$$x^2-2.$$
This is the same as the remainder of dividing
$$2x^5 - 3x^2 + 1 - p(x)(x^2-2)$$
by $p(x)$, for any polynomial $p(x)$.
Multiplying $x^2-2$ by $2x^3$ we get $2x^5 - 4x^3$. We can subtract this from $2x^5 - 3x^2+1$ we get
$$2x^5 - 3x^2 + 1 - (2x^5-4x^3) = 4x^3 - 3x^2 + 1.$$
So the remainder when dividing $2x^5-3x^2+1$ by $x^2-2$ is the same as the remainder when dividing $4x^3-3x^2+1$ by $x^2-2$.
Now, multiplying $x^2-2$ by $4x$ we get $4x^3 - 8x$; subtracting it from $4x^3-3x^2+1$ we get
$$4x^3-3x^2+1 - (4x^3 - 8x) = -3x^2 + 8x + 1.$$
So the remainder of dividing $4x^3-3x^2+1$ by $x^2-2$ is the same as the remainder of dividing $-3x^2+8x+1$ by $x^2-2$. Multiplying $x^2-2$ by $-3$ we get $-3x^2+6$; subtracting it from $-3x^2+8x+1$ we get:
$$-3x^2+8x+1 -(-3x^2+6) = 8x -5.$$
So the remainder of dividing $-3x^2+8x+1$ by $x^2-2$ is the same as the remainder of dividing $8x-5$ by $x^2-2$. But the remainder of dividing $8x-5$ by $x^2-2$ is just $8x-5$ (already of degree smaller than $2$).
So the remainder in the original division is $8x-5$.
(This is just, as I noted above, polynomial long division done in the discourse manner rather than synthetically)
A: 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}
$$
