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{2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12}{x^{2} - 4 x - 12}$$$ using long division.

Write the problem in the special format:

$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrr}\phantom{2 x^{2}}&\phantom{+5 x}&\phantom{+29}&\phantom{+32 x}&\phantom{-12}\end{array}&\\x^{2}- 4 x-12&\phantom{-}\enclose{longdiv}{\begin{array}{ccccc}2 x^{4}&- 3 x^{3}&- 15 x^{2}&+32 x&-12\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\begin{array}{rrrrr}\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{2 x^{4}}{x^{2}}=2 x^{2}$$$.

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

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

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


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrr}\color{Red}{2 x^{2}}&\phantom{+5 x}&\phantom{+29}&\phantom{+32 x}&\phantom{-12}\end{array}&\\\color{Magenta}{x^{2}}- 4 x-12&\phantom{-}\enclose{longdiv}{\begin{array}{ccccc}\color{Red}{2 x^{4}}&- 3 x^{3}&- 15 x^{2}&+32 x&-12\end{array}}&\frac{\color{Red}{2 x^{4}}}{\color{Magenta}{x^{2}}}=\color{Red}{2 x^{2}}\\\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\begin{array}{rrrrr}-\phantom{2 x^{4}}&\phantom{- 3 x^{3}}&\phantom{- 15 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}2 x^{4}&- 8 x^{3}&- 24 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&5 x^{3}&+9 x^{2}&+32 x&-12\end{array}&\begin{array}{c}\phantom{2 x^{4}- 3 x^{3}- 15 x^{2}+32 x-12}\\\color{Red}{2 x^{2}}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=2 x^{4}- 8 x^{3}- 24 x^{2}\\\phantom{5 x^{3}+9 x^{2}+32 x-12}\end{array}\end{array}$$$

Step 2

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

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

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

Subtract the remainder from the obtained result: $$$\left(5 x^{3}+9 x^{2}+32 x-12\right)-\left(5 x^{3}- 20 x^{2}- 60 x\right)=29 x^{2}+92 x-12$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrr}2 x^{2}&\color{DeepPink}{+5 x}&\phantom{+29}&\phantom{+32 x}&\phantom{-12}\end{array}&\\\color{Magenta}{x^{2}}- 4 x-12&\phantom{-}\enclose{longdiv}{\begin{array}{ccccc}2 x^{4}&- 3 x^{3}&- 15 x^{2}&+32 x&-12\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\begin{array}{rrrrr}-\phantom{2 x^{4}}&\phantom{- 3 x^{3}}&\phantom{- 15 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}2 x^{4}&- 8 x^{3}&- 24 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&\color{DeepPink}{5 x^{3}}&+9 x^{2}&+32 x&-12\\&-\phantom{5 x^{3}}&\phantom{+9 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}&5 x^{3}&- 20 x^{2}&- 60 x\\\hline\phantom{\enclose{longdiv}{}}&&29 x^{2}&+92 x&-12\end{array}&\begin{array}{c}\phantom{2 x^{4}- 3 x^{3}- 15 x^{2}+32 x-12}\\\phantom{\color{Red}{2 x^{2}}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=2 x^{4}- 8 x^{3}- 24 x^{2}}\\\frac{\color{DeepPink}{5 x^{3}}}{\color{Magenta}{x^{2}}}=\color{DeepPink}{5 x}\\\phantom{5 x^{3}+9 x^{2}+32 x-12}\\\color{DeepPink}{5 x}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=5 x^{3}- 20 x^{2}- 60 x\\\phantom{29 x^{2}+92 x-12}\end{array}\end{array}$$$

Step 3

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

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

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

Subtract the remainder from the obtained result: $$$\left(29 x^{2}+92 x-12\right)-\left(29 x^{2}- 116 x-348\right)=208 x+336$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrr}2 x^{2}&+5 x&\color{Crimson}{+29}&\phantom{+32 x}&\phantom{-12}\end{array}&\\\color{Magenta}{x^{2}}- 4 x-12&\phantom{-}\enclose{longdiv}{\begin{array}{ccccc}2 x^{4}&- 3 x^{3}&- 15 x^{2}&+32 x&-12\end{array}}&\\\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\begin{array}{rrrrr}-\phantom{2 x^{4}}&\phantom{- 3 x^{3}}&\phantom{- 15 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}2 x^{4}&- 8 x^{3}&- 24 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&5 x^{3}&+9 x^{2}&+32 x&-12\\&-\phantom{5 x^{3}}&\phantom{+9 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}&5 x^{3}&- 20 x^{2}&- 60 x\\\hline\phantom{\enclose{longdiv}{}}&&\color{Crimson}{29 x^{2}}&+92 x&-12\\&&-\phantom{29 x^{2}}&\phantom{+92 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}&&29 x^{2}&- 116 x&-348\\\hline\phantom{\enclose{longdiv}{}}&&&\color{OrangeRed}{208 x}&\color{OrangeRed}{+336}\end{array}&\begin{array}{c}\phantom{2 x^{4}- 3 x^{3}- 15 x^{2}+32 x-12}\\\phantom{\color{Red}{2 x^{2}}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=2 x^{4}- 8 x^{3}- 24 x^{2}}\\\phantom{5 x^{3}+9 x^{2}+32 x-12}\\\phantom{5 x^{3}+9 x^{2}+32 x-12}\\\phantom{\color{DeepPink}{5 x}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=5 x^{3}- 20 x^{2}- 60 x}\\\frac{\color{Crimson}{29 x^{2}}}{\color{Magenta}{x^{2}}}=\color{Crimson}{29}\\\phantom{29 x^{2}+92 x-12}\\\color{Crimson}{29}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=29 x^{2}- 116 x-348\\\phantom{208 x+336}\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}}- 4 x-12}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrrr}\color{Red}{2 x^{2}}&\color{DeepPink}{+5 x}&\color{Crimson}{+29}&\phantom{+32 x}&\phantom{-12}\end{array}&Hints\\\color{Magenta}{x^{2}}- 4 x-12&\phantom{-}\enclose{longdiv}{\begin{array}{ccccc}\color{Red}{2 x^{4}}&- 3 x^{3}&- 15 x^{2}&+32 x&-12\end{array}}&\frac{\color{Red}{2 x^{4}}}{\color{Magenta}{x^{2}}}=\color{Red}{2 x^{2}}\\\phantom{\color{Magenta}{x^{2}}- 4 x-12}&\begin{array}{rrrrr}-\phantom{2 x^{4}}&\phantom{- 3 x^{3}}&\phantom{- 15 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}2 x^{4}&- 8 x^{3}&- 24 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&\color{DeepPink}{5 x^{3}}&+9 x^{2}&+32 x&-12\\&-\phantom{5 x^{3}}&\phantom{+9 x^{2}}&\phantom{+32 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}&5 x^{3}&- 20 x^{2}&- 60 x\\\hline\phantom{\enclose{longdiv}{}}&&\color{Crimson}{29 x^{2}}&+92 x&-12\\&&-\phantom{29 x^{2}}&\phantom{+92 x}&\phantom{-12}\\\phantom{\enclose{longdiv}{}}&&29 x^{2}&- 116 x&-348\\\hline\phantom{\enclose{longdiv}{}}&&&\color{OrangeRed}{208 x}&\color{OrangeRed}{+336}\end{array}&\begin{array}{c}\phantom{2 x^{4}- 3 x^{3}- 15 x^{2}+32 x-12}\\\color{Red}{2 x^{2}}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=2 x^{4}- 8 x^{3}- 24 x^{2}\\\frac{\color{DeepPink}{5 x^{3}}}{\color{Magenta}{x^{2}}}=\color{DeepPink}{5 x}\\\phantom{5 x^{3}+9 x^{2}+32 x-12}\\\color{DeepPink}{5 x}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=5 x^{3}- 20 x^{2}- 60 x\\\frac{\color{Crimson}{29 x^{2}}}{\color{Magenta}{x^{2}}}=\color{Crimson}{29}\\\phantom{29 x^{2}+92 x-12}\\\color{Crimson}{29}\left(\color{Magenta}{x^{2}}- 4 x-12\right)=29 x^{2}- 116 x-348\\\phantom{208 x+336}\end{array}\end{array}$$$

Therefore, $$$\frac{2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12}{x^{2} - 4 x - 12}=2 x^{2} + 5 x + 29+\frac{208 x + 336}{x^{2} - 4 x - 12}$$$

Answer: $$$\frac{2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12}{x^{2} - 4 x - 12}=2 x^{2} + 5 x + 29+\frac{208 x + 336}{x^{2} - 4 x - 12}$$$