Polynomial Long Division Calculator

Perform the long division of polynomials step by step

The calculator will perform the long division of polynomials, with steps shown.

Related calculators: Synthetic Division Calculator, Long Division Calculator

Divide (dividend):

By (divisor):

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Solution

Your input: find $$$\frac{x^{10} - 8 x^{8} + 7 x^{4} + 8 x^{3} - 12 x^{2} - 15 x - 5}{x^{2} - 1}$$$ using long division.

Write the problem in the special format (missed terms are written with zero coefficients):

$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}\phantom{x^{8}}&\phantom{- 7 x^{6}}&\phantom{- 7 x^{4}}&\phantom{+8 x}&\phantom{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&\\x^{2}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}x^{10}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}\end{array}&\begin{array}{c}\end{array}\end{array}$$$

Step 1

Divide the leading term of the dividend by the leading term of the divisor: $$$\frac{x^{10}}{x^{2}}=x^{8}$$$.

Write down the calculated result in the upper part of the table.

Multiply it by the divisor: $$$x^{8}\left(x^{2}-1\right)=x^{10}- x^{8}$$$.

Subtract the dividend from the obtained result: $$$\left(x^{10}- 8 x^{8}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5\right)-\left(x^{10}- x^{8}\right)=- 7 x^{8}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}\color{BlueViolet}{x^{8}}&\phantom{- 7 x^{6}}&\phantom{- 7 x^{4}}&\phantom{+8 x}&\phantom{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&\\\color{Magenta}{x^{2}}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}\color{BlueViolet}{x^{10}}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\frac{\color{BlueViolet}{x^{10}}}{\color{Magenta}{x^{2}}}=\color{BlueViolet}{x^{8}}\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}-\phantom{x^{10}}&\phantom{+0 x^{9}}&\phantom{- 8 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}x^{10}&+0 x^{9}&- x^{8}\\\hline\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}&\begin{array}{c}\phantom{x^{10}+0 x^{9}- 8 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\color{BlueViolet}{x^{8}}\left(\color{Magenta}{x^{2}}-1\right)=x^{10}- x^{8}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\end{array}\end{array}$$$

Step 2

Divide the leading term of the obtained remainder by the leading term of the divisor: $$$\frac{- 7 x^{8}}{x^{2}}=- 7 x^{6}$$$.

Write down the calculated result in the upper part of the table.

Multiply it by the divisor: $$$- 7 x^{6}\left(x^{2}-1\right)=- 7 x^{8}+7 x^{6}$$$.

Subtract the remainder from the obtained result: $$$\left(- 7 x^{8}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5\right)-\left(- 7 x^{8}+7 x^{6}\right)=- 7 x^{6}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}x^{8}&\color{DarkMagenta}{- 7 x^{6}}&\phantom{- 7 x^{4}}&\phantom{+8 x}&\phantom{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&\\\color{Magenta}{x^{2}}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}x^{10}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}-\phantom{x^{10}}&\phantom{+0 x^{9}}&\phantom{- 8 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}x^{10}&+0 x^{9}&- x^{8}\\\hline\phantom{\enclose{longdiv}{}}&&\color{DarkMagenta}{- 7 x^{8}}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&-\phantom{- 7 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+7 x^{6}\\\hline\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}&\begin{array}{c}\phantom{x^{10}+0 x^{9}- 8 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{BlueViolet}{x^{8}}\left(\color{Magenta}{x^{2}}-1\right)=x^{10}- x^{8}}\\\frac{\color{DarkMagenta}{- 7 x^{8}}}{\color{Magenta}{x^{2}}}=\color{DarkMagenta}{- 7 x^{6}}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\color{DarkMagenta}{- 7 x^{6}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{8}+7 x^{6}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\end{array}\end{array}$$$

Step 3

Divide the leading term of the obtained remainder by the leading term of the divisor: $$$\frac{- 7 x^{6}}{x^{2}}=- 7 x^{4}$$$.

Write down the calculated result in the upper part of the table.

Multiply it by the divisor: $$$- 7 x^{4}\left(x^{2}-1\right)=- 7 x^{6}+7 x^{4}$$$.

Subtract the remainder from the obtained result: $$$\left(- 7 x^{6}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5\right)-\left(- 7 x^{6}+7 x^{4}\right)=8 x^{3}- 12 x^{2}- 15 x-5$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}x^{8}&- 7 x^{6}&\color{DarkBlue}{- 7 x^{4}}&\phantom{+8 x}&\phantom{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&\\\color{Magenta}{x^{2}}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}x^{10}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}-\phantom{x^{10}}&\phantom{+0 x^{9}}&\phantom{- 8 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}x^{10}&+0 x^{9}&- x^{8}\\\hline\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&-\phantom{- 7 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+7 x^{6}\\\hline\phantom{\enclose{longdiv}{}}&&&&\color{DarkBlue}{- 7 x^{6}}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&&&-\phantom{- 7 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&0&8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}&\begin{array}{c}\phantom{x^{10}+0 x^{9}- 8 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{BlueViolet}{x^{8}}\left(\color{Magenta}{x^{2}}-1\right)=x^{10}- x^{8}}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{DarkMagenta}{- 7 x^{6}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{8}+7 x^{6}}\\\frac{\color{DarkBlue}{- 7 x^{6}}}{\color{Magenta}{x^{2}}}=\color{DarkBlue}{- 7 x^{4}}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\color{DarkBlue}{- 7 x^{4}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{6}+7 x^{4}\\\phantom{08 x^{3}- 12 x^{2}- 15 x-5}\end{array}\end{array}$$$

Step 4

Divide the leading term of the obtained remainder by the leading term of the divisor: $$$\frac{0}{x^{2}}=8 x$$$.

Write down the calculated result in the upper part of the table.

Multiply it by the divisor: $$$8 x\left(x^{2}-1\right)=8 x^{4}- 8 x^{2}$$$.

Subtract the remainder from the obtained result: $$$\left(08 x^{3}- 12 x^{2}- 15 x-5\right)-\left(8 x^{4}- 8 x^{2}\right)=- 8 x^{4}+8 x^{3}- 4 x^{2}- 15 x-5$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}x^{8}&- 7 x^{6}&- 7 x^{4}&\color{Peru}{+8 x}&\phantom{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&\\\color{Magenta}{x^{2}}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}x^{10}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}-\phantom{x^{10}}&\phantom{+0 x^{9}}&\phantom{- 8 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}x^{10}&+0 x^{9}&- x^{8}\\\hline\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&-\phantom{- 7 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+7 x^{6}\\\hline\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&&&-\phantom{- 7 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&0&\color{Peru}{8 x^{3}}&- 12 x^{2}&- 15 x&-5\\&&&&&&-\phantom{0}&\phantom{8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&&&8 x^{4}&+0 x^{3}&- 8 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&- 8 x^{4}&+8 x^{3}&- 4 x^{2}&- 15 x&-5\end{array}&\begin{array}{c}\phantom{x^{10}+0 x^{9}- 8 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{BlueViolet}{x^{8}}\left(\color{Magenta}{x^{2}}-1\right)=x^{10}- x^{8}}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{DarkMagenta}{- 7 x^{6}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{8}+7 x^{6}}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{DarkBlue}{- 7 x^{4}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{6}+7 x^{4}}\\\frac{\color{Peru}{0}}{\color{Magenta}{x^{2}}}=\color{Peru}{8 x}\\\phantom{08 x^{3}- 12 x^{2}- 15 x-5}\\\color{Peru}{8 x}\left(\color{Magenta}{x^{2}}-1\right)=8 x^{4}- 8 x^{2}\\\phantom{- 8 x^{4}+8 x^{3}- 4 x^{2}- 15 x-5}\end{array}\end{array}$$$

Step 5

Divide the leading term of the obtained remainder by the leading term of the divisor: $$$\frac{- 8 x^{4}}{x^{2}}=-12$$$.

Write down the calculated result in the upper part of the table.

Multiply it by the divisor: $$$-12\left(x^{2}-1\right)=- 12 x^{4}+12 x^{2}$$$.

Subtract the remainder from the obtained result: $$$\left(- 8 x^{4}+8 x^{3}- 4 x^{2}- 15 x-5\right)-\left(- 12 x^{4}+12 x^{2}\right)=4 x^{4}+8 x^{3}- 16 x^{2}- 15 x-5$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}x^{8}&- 7 x^{6}&- 7 x^{4}&+8 x&\color{DeepPink}{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&\\\color{Magenta}{x^{2}}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}x^{10}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}-\phantom{x^{10}}&\phantom{+0 x^{9}}&\phantom{- 8 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}x^{10}&+0 x^{9}&- x^{8}\\\hline\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&-\phantom{- 7 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+7 x^{6}\\\hline\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&&&-\phantom{- 7 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&0&8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&&&&&-\phantom{0}&\phantom{8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&&&8 x^{4}&+0 x^{3}&- 8 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&\color{DeepPink}{- 8 x^{4}}&+8 x^{3}&- 4 x^{2}&- 15 x&-5\\&&&&&&-\phantom{- 8 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 4 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&&&- 12 x^{4}&+0 x^{3}&+12 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&\color{OrangeRed}{4 x^{4}}&\color{OrangeRed}{+8 x^{3}}&\color{OrangeRed}{- 16 x^{2}}&\color{OrangeRed}{- 15 x}&\color{OrangeRed}{-5}\end{array}&\begin{array}{c}\phantom{x^{10}+0 x^{9}- 8 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{BlueViolet}{x^{8}}\left(\color{Magenta}{x^{2}}-1\right)=x^{10}- x^{8}}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{DarkMagenta}{- 7 x^{6}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{8}+7 x^{6}}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{DarkBlue}{- 7 x^{4}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{6}+7 x^{4}}\\\phantom{08 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{08 x^{3}- 12 x^{2}- 15 x-5}\\\phantom{\color{Peru}{8 x}\left(\color{Magenta}{x^{2}}-1\right)=8 x^{4}- 8 x^{2}}\\\frac{\color{DeepPink}{- 8 x^{4}}}{\color{Magenta}{x^{2}}}=\color{DeepPink}{-12}\\\phantom{- 8 x^{4}+8 x^{3}- 4 x^{2}- 15 x-5}\\\color{DeepPink}{-12}\left(\color{Magenta}{x^{2}}-1\right)=- 12 x^{4}+12 x^{2}\\\phantom{4 x^{4}+8 x^{3}- 16 x^{2}- 15 x-5}\end{array}\end{array}$$$

Since the degree of the remainder is less than the degree of the divisor, then we are done.

The resulting table is shown once more:

$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}-1}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrrrrrrr}\color{BlueViolet}{x^{8}}&\color{DarkMagenta}{- 7 x^{6}}&\color{DarkBlue}{- 7 x^{4}}&\color{Peru}{+8 x}&\color{DeepPink}{-12}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\end{array}&Hints\\\color{Magenta}{x^{2}}-1&\phantom{-}\enclose{longdiv}{\begin{array}{ccccccccccc}\color{BlueViolet}{x^{10}}&+0 x^{9}&- 8 x^{8}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\end{array}}&\frac{\color{BlueViolet}{x^{10}}}{\color{Magenta}{x^{2}}}=\color{BlueViolet}{x^{8}}\\\phantom{\color{Magenta}{x^{2}}-1}&\begin{array}{rrrrrrrrrrr}-\phantom{x^{10}}&\phantom{+0 x^{9}}&\phantom{- 8 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}x^{10}&+0 x^{9}&- x^{8}\\\hline\phantom{\enclose{longdiv}{}}&&\color{DarkMagenta}{- 7 x^{8}}&+0 x^{7}&+0 x^{6}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&-\phantom{- 7 x^{8}}&\phantom{+0 x^{7}}&\phantom{+0 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&- 7 x^{8}&+0 x^{7}&+7 x^{6}\\\hline\phantom{\enclose{longdiv}{}}&&&&\color{DarkBlue}{- 7 x^{6}}&+0 x^{5}&+7 x^{4}&+8 x^{3}&- 12 x^{2}&- 15 x&-5\\&&&&-\phantom{- 7 x^{6}}&\phantom{+0 x^{5}}&\phantom{+7 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&- 7 x^{6}&+0 x^{5}&+7 x^{4}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&0&\color{Peru}{8 x^{3}}&- 12 x^{2}&- 15 x&-5\\&&&&&&-\phantom{0}&\phantom{8 x^{3}}&\phantom{- 12 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&&&8 x^{4}&+0 x^{3}&- 8 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&\color{DeepPink}{- 8 x^{4}}&+8 x^{3}&- 4 x^{2}&- 15 x&-5\\&&&&&&-\phantom{- 8 x^{4}}&\phantom{+8 x^{3}}&\phantom{- 4 x^{2}}&\phantom{- 15 x}&\phantom{-5}\\\phantom{\enclose{longdiv}{}}&&&&&&- 12 x^{4}&+0 x^{3}&+12 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&&&&&\color{OrangeRed}{4 x^{4}}&\color{OrangeRed}{+8 x^{3}}&\color{OrangeRed}{- 16 x^{2}}&\color{OrangeRed}{- 15 x}&\color{OrangeRed}{-5}\end{array}&\begin{array}{c}\phantom{x^{10}+0 x^{9}- 8 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\color{BlueViolet}{x^{8}}\left(\color{Magenta}{x^{2}}-1\right)=x^{10}- x^{8}\\\frac{\color{DarkMagenta}{- 7 x^{8}}}{\color{Magenta}{x^{2}}}=\color{DarkMagenta}{- 7 x^{6}}\\\phantom{- 7 x^{8}+0 x^{7}+0 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\color{DarkMagenta}{- 7 x^{6}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{8}+7 x^{6}\\\frac{\color{DarkBlue}{- 7 x^{6}}}{\color{Magenta}{x^{2}}}=\color{DarkBlue}{- 7 x^{4}}\\\phantom{- 7 x^{6}+0 x^{5}+7 x^{4}+8 x^{3}- 12 x^{2}- 15 x-5}\\\color{DarkBlue}{- 7 x^{4}}\left(\color{Magenta}{x^{2}}-1\right)=- 7 x^{6}+7 x^{4}\\\frac{\color{Peru}{0}}{\color{Magenta}{x^{2}}}=\color{Peru}{8 x}\\\phantom{08 x^{3}- 12 x^{2}- 15 x-5}\\\color{Peru}{8 x}\left(\color{Magenta}{x^{2}}-1\right)=8 x^{4}- 8 x^{2}\\\frac{\color{DeepPink}{- 8 x^{4}}}{\color{Magenta}{x^{2}}}=\color{DeepPink}{-12}\\\phantom{- 8 x^{4}+8 x^{3}- 4 x^{2}- 15 x-5}\\\color{DeepPink}{-12}\left(\color{Magenta}{x^{2}}-1\right)=- 12 x^{4}+12 x^{2}\\\phantom{4 x^{4}+8 x^{3}- 16 x^{2}- 15 x-5}\end{array}\end{array}$$$

Therefore, $$$\frac{x^{10} - 8 x^{8} + 7 x^{4} + 8 x^{3} - 12 x^{2} - 15 x - 5}{x^{2} - 1}=x^{8} - 7 x^{6} - 7 x^{4} + 8 x - 12+\frac{- 7 x - 17}{x^{2} - 1}$$$

Answer: $$$\frac{x^{10} - 8 x^{8} + 7 x^{4} + 8 x^{3} - 12 x^{2} - 15 x - 5}{x^{2} - 1}=x^{8} - 7 x^{6} - 7 x^{4} + 8 x - 12+\frac{- 7 x - 17}{x^{2} - 1}$$$