You can do long division - but let's adjust the signs first, because it is not comfortable with the divisor starting with a negative sign
rarr" "→ dividing by a negative changes the signs.
Take out a factor of -1−1 in the numerator and denominator:
(-3x^4+3x^2+2x+15)/(-x^3-x)−3x4+3x2+2x+15−x3−x
= (-(3x^4-3x^2-2x-15))/(-(x^3+x))" "larr (-/-) =+=−(3x4−3x2−2x−15)−(x3+x) ←(−−)=+
= (3x^4-3x^2-2x-15)/(x^3+x)=3x4−3x2−2x−15x3+x
Leave a space for the missing term in x^3x3
color(white)(mmmmmmmm.mmmm)3x" "larr (3x^4 div x^3 = 3x)mmmmmmmm.mmmm3x ←(3x4÷x3=3x)
x^3 +x |bar(3x^4" "-3x^2-2x-15)x3+x∣¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯3x4 −3x2−2x−15
Multiply 3x3x by both terms in the divisor:
color(white)(mmmmmmmm.mmmm)3xmmmmmmmm.mmmm3x
x^3 +x |bar(3x^4" "-3x^2-2x-15)x3+x∣¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯3x4 −3x2−2x−15
color(white)(mmm.m)ul(3x^4" "" "3x^2)color(white)(xxxxxxxxx)larr subtract
color(white)(mmmmmm.m)-6x^2-2x" "larr bring down next term
(3x^4-3x^2-2x-15) div(x^3+x)
= 3x " remainder "-6x^2 -2x
This can be written as:
3x + (-6x^2-2x)/(x^3+x)
3x +(-2x(x+1))/(x^2(x+1))" "larr factorise top and bottom
= 3x -2/x