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^{5} - 4 x^{4} - 10 x^{3} + 48 x^{2} - 17 x - 26}{x^{2} - 3 x - 2}$$$ using long division.

Write the problem in the special format:

$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrr}\phantom{x^{3}}&\phantom{- x^{2}}&\phantom{- 11 x}&\phantom{+13}&\phantom{- 17 x}&\phantom{-26}\end{array}&\\x^{2}- 3 x-2&\phantom{-}\enclose{longdiv}{\begin{array}{cccccc}x^{5}&- 4 x^{4}&- 10 x^{3}&+48 x^{2}&- 17 x&-26\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\begin{array}{rrrrrr}\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^{5}}{x^{2}}=x^{3}$$$.

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

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

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


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrr}\color{Chocolate}{x^{3}}&\phantom{- x^{2}}&\phantom{- 11 x}&\phantom{+13}&\phantom{- 17 x}&\phantom{-26}\end{array}&\\\color{Magenta}{x^{2}}- 3 x-2&\phantom{-}\enclose{longdiv}{\begin{array}{cccccc}\color{Chocolate}{x^{5}}&- 4 x^{4}&- 10 x^{3}&+48 x^{2}&- 17 x&-26\end{array}}&\frac{\color{Chocolate}{x^{5}}}{\color{Magenta}{x^{2}}}=\color{Chocolate}{x^{3}}\\\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\begin{array}{rrrrrr}-\phantom{x^{5}}&\phantom{- 4 x^{4}}&\phantom{- 10 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}x^{5}&- 3 x^{4}&- 2 x^{3}\\\hline\phantom{\enclose{longdiv}{}}&- x^{4}&- 8 x^{3}&+48 x^{2}&- 17 x&-26\end{array}&\begin{array}{c}\phantom{x^{5}- 4 x^{4}- 10 x^{3}+48 x^{2}- 17 x-26}\\\color{Chocolate}{x^{3}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=x^{5}- 3 x^{4}- 2 x^{3}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\end{array}\end{array}$$$

Step 2

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

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

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

Subtract the remainder from the obtained result: $$$\left(- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26\right)-\left(- x^{4}+3 x^{3}+2 x^{2}\right)=- 11 x^{3}+46 x^{2}- 17 x-26$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrr}x^{3}&\color{DarkCyan}{- x^{2}}&\phantom{- 11 x}&\phantom{+13}&\phantom{- 17 x}&\phantom{-26}\end{array}&\\\color{Magenta}{x^{2}}- 3 x-2&\phantom{-}\enclose{longdiv}{\begin{array}{cccccc}x^{5}&- 4 x^{4}&- 10 x^{3}&+48 x^{2}&- 17 x&-26\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\begin{array}{rrrrrr}-\phantom{x^{5}}&\phantom{- 4 x^{4}}&\phantom{- 10 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}x^{5}&- 3 x^{4}&- 2 x^{3}\\\hline\phantom{\enclose{longdiv}{}}&\color{DarkCyan}{- x^{4}}&- 8 x^{3}&+48 x^{2}&- 17 x&-26\\&-\phantom{- x^{4}}&\phantom{- 8 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&- x^{4}&+3 x^{3}&+2 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&- 11 x^{3}&+46 x^{2}&- 17 x&-26\end{array}&\begin{array}{c}\phantom{x^{5}- 4 x^{4}- 10 x^{3}+48 x^{2}- 17 x-26}\\\phantom{\color{Chocolate}{x^{3}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=x^{5}- 3 x^{4}- 2 x^{3}}\\\frac{\color{DarkCyan}{- x^{4}}}{\color{Magenta}{x^{2}}}=\color{DarkCyan}{- x^{2}}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\\\color{DarkCyan}{- x^{2}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- x^{4}+3 x^{3}+2 x^{2}\\\phantom{- 11 x^{3}+46 x^{2}- 17 x-26}\end{array}\end{array}$$$

Step 3

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

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

Multiply it by the divisor: $$$- 11 x\left(x^{2}- 3 x-2\right)=- 11 x^{3}+33 x^{2}+22 x$$$.

Subtract the remainder from the obtained result: $$$\left(- 11 x^{3}+46 x^{2}- 17 x-26\right)-\left(- 11 x^{3}+33 x^{2}+22 x\right)=13 x^{2}- 39 x-26$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrr}x^{3}&- x^{2}&\color{GoldenRod}{- 11 x}&\phantom{+13}&\phantom{- 17 x}&\phantom{-26}\end{array}&\\\color{Magenta}{x^{2}}- 3 x-2&\phantom{-}\enclose{longdiv}{\begin{array}{cccccc}x^{5}&- 4 x^{4}&- 10 x^{3}&+48 x^{2}&- 17 x&-26\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\begin{array}{rrrrrr}-\phantom{x^{5}}&\phantom{- 4 x^{4}}&\phantom{- 10 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}x^{5}&- 3 x^{4}&- 2 x^{3}\\\hline\phantom{\enclose{longdiv}{}}&- x^{4}&- 8 x^{3}&+48 x^{2}&- 17 x&-26\\&-\phantom{- x^{4}}&\phantom{- 8 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&- x^{4}&+3 x^{3}&+2 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&\color{GoldenRod}{- 11 x^{3}}&+46 x^{2}&- 17 x&-26\\&&-\phantom{- 11 x^{3}}&\phantom{+46 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&&- 11 x^{3}&+33 x^{2}&+22 x\\\hline\phantom{\enclose{longdiv}{}}&&&13 x^{2}&- 39 x&-26\end{array}&\begin{array}{c}\phantom{x^{5}- 4 x^{4}- 10 x^{3}+48 x^{2}- 17 x-26}\\\phantom{\color{Chocolate}{x^{3}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=x^{5}- 3 x^{4}- 2 x^{3}}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\\\phantom{\color{DarkCyan}{- x^{2}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- x^{4}+3 x^{3}+2 x^{2}}\\\frac{\color{GoldenRod}{- 11 x^{3}}}{\color{Magenta}{x^{2}}}=\color{GoldenRod}{- 11 x}\\\phantom{- 11 x^{3}+46 x^{2}- 17 x-26}\\\color{GoldenRod}{- 11 x}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- 11 x^{3}+33 x^{2}+22 x\\\phantom{13 x^{2}- 39 x-26}\end{array}\end{array}$$$

Step 4

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

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

Multiply it by the divisor: $$$13\left(x^{2}- 3 x-2\right)=13 x^{2}- 39 x-26$$$.

Subtract the remainder from the obtained result: $$$\left(13 x^{2}- 39 x-26\right)-\left(13 x^{2}- 39 x-26\right)=$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrr}x^{3}&- x^{2}&- 11 x&\color{Fuchsia}{+13}&\phantom{- 17 x}&\phantom{-26}\end{array}&\\\color{Magenta}{x^{2}}- 3 x-2&\phantom{-}\enclose{longdiv}{\begin{array}{cccccc}x^{5}&- 4 x^{4}&- 10 x^{3}&+48 x^{2}&- 17 x&-26\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\begin{array}{rrrrrr}-\phantom{x^{5}}&\phantom{- 4 x^{4}}&\phantom{- 10 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}x^{5}&- 3 x^{4}&- 2 x^{3}\\\hline\phantom{\enclose{longdiv}{}}&- x^{4}&- 8 x^{3}&+48 x^{2}&- 17 x&-26\\&-\phantom{- x^{4}}&\phantom{- 8 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&- x^{4}&+3 x^{3}&+2 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&- 11 x^{3}&+46 x^{2}&- 17 x&-26\\&&-\phantom{- 11 x^{3}}&\phantom{+46 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&&- 11 x^{3}&+33 x^{2}&+22 x\\\hline\phantom{\enclose{longdiv}{}}&&&\color{Fuchsia}{13 x^{2}}&- 39 x&-26\\&&&-\phantom{13 x^{2}}&\phantom{- 39 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&&&13 x^{2}&- 39 x&-26\\\hline\phantom{\enclose{longdiv}{}}&&&&&0\end{array}&\begin{array}{c}\phantom{x^{5}- 4 x^{4}- 10 x^{3}+48 x^{2}- 17 x-26}\\\phantom{\color{Chocolate}{x^{3}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=x^{5}- 3 x^{4}- 2 x^{3}}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\\\phantom{\color{DarkCyan}{- x^{2}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- x^{4}+3 x^{3}+2 x^{2}}\\\phantom{- 11 x^{3}+46 x^{2}- 17 x-26}\\\phantom{- 11 x^{3}+46 x^{2}- 17 x-26}\\\phantom{\color{GoldenRod}{- 11 x}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- 11 x^{3}+33 x^{2}+22 x}\\\frac{\color{Fuchsia}{13 x^{2}}}{\color{Magenta}{x^{2}}}=\color{Fuchsia}{13}\\\phantom{13 x^{2}- 39 x-26}\\\color{Fuchsia}{13}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=13 x^{2}- 39 x-26\\\phantom{0}\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}}- 3 x-2}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrrr}\color{Chocolate}{x^{3}}&\color{DarkCyan}{- x^{2}}&\color{GoldenRod}{- 11 x}&\color{Fuchsia}{+13}&\phantom{- 17 x}&\phantom{-26}\end{array}&Hints\\\color{Magenta}{x^{2}}- 3 x-2&\phantom{-}\enclose{longdiv}{\begin{array}{cccccc}\color{Chocolate}{x^{5}}&- 4 x^{4}&- 10 x^{3}&+48 x^{2}&- 17 x&-26\end{array}}&\frac{\color{Chocolate}{x^{5}}}{\color{Magenta}{x^{2}}}=\color{Chocolate}{x^{3}}\\\phantom{\color{Magenta}{x^{2}}- 3 x-2}&\begin{array}{rrrrrr}-\phantom{x^{5}}&\phantom{- 4 x^{4}}&\phantom{- 10 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}x^{5}&- 3 x^{4}&- 2 x^{3}\\\hline\phantom{\enclose{longdiv}{}}&\color{DarkCyan}{- x^{4}}&- 8 x^{3}&+48 x^{2}&- 17 x&-26\\&-\phantom{- x^{4}}&\phantom{- 8 x^{3}}&\phantom{+48 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&- x^{4}&+3 x^{3}&+2 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&&\color{GoldenRod}{- 11 x^{3}}&+46 x^{2}&- 17 x&-26\\&&-\phantom{- 11 x^{3}}&\phantom{+46 x^{2}}&\phantom{- 17 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&&- 11 x^{3}&+33 x^{2}&+22 x\\\hline\phantom{\enclose{longdiv}{}}&&&\color{Fuchsia}{13 x^{2}}&- 39 x&-26\\&&&-\phantom{13 x^{2}}&\phantom{- 39 x}&\phantom{-26}\\\phantom{\enclose{longdiv}{}}&&&13 x^{2}&- 39 x&-26\\\hline\phantom{\enclose{longdiv}{}}&&&&&0\end{array}&\begin{array}{c}\phantom{x^{5}- 4 x^{4}- 10 x^{3}+48 x^{2}- 17 x-26}\\\color{Chocolate}{x^{3}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=x^{5}- 3 x^{4}- 2 x^{3}\\\frac{\color{DarkCyan}{- x^{4}}}{\color{Magenta}{x^{2}}}=\color{DarkCyan}{- x^{2}}\\\phantom{- x^{4}- 8 x^{3}+48 x^{2}- 17 x-26}\\\color{DarkCyan}{- x^{2}}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- x^{4}+3 x^{3}+2 x^{2}\\\frac{\color{GoldenRod}{- 11 x^{3}}}{\color{Magenta}{x^{2}}}=\color{GoldenRod}{- 11 x}\\\phantom{- 11 x^{3}+46 x^{2}- 17 x-26}\\\color{GoldenRod}{- 11 x}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=- 11 x^{3}+33 x^{2}+22 x\\\frac{\color{Fuchsia}{13 x^{2}}}{\color{Magenta}{x^{2}}}=\color{Fuchsia}{13}\\\phantom{13 x^{2}- 39 x-26}\\\color{Fuchsia}{13}\left(\color{Magenta}{x^{2}}- 3 x-2\right)=13 x^{2}- 39 x-26\\\phantom{0}\end{array}\end{array}$$$

Therefore, $$$\frac{x^{5} - 4 x^{4} - 10 x^{3} + 48 x^{2} - 17 x - 26}{x^{2} - 3 x - 2}=x^{3} - x^{2} - 11 x + 13+\frac{0}{x^{2} - 3 x - 2}=x^{3} - x^{2} - 11 x + 13$$$

Answer: $$$\frac{x^{5} - 4 x^{4} - 10 x^{3} + 48 x^{2} - 17 x - 26}{x^{2} - 3 x - 2}=x^{3} - x^{2} - 11 x + 13+\frac{0}{x^{2} - 3 x - 2}=x^{3} - x^{2} - 11 x + 13$$$