<s>[INST] 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.
 [/INST] 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)
</s>