Polynomial Long Division Calculator

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

Write the problem in the special format:

$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x}-7}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrr}\phantom{x^{2}}&\phantom{- 5 x}&\phantom{+3}&\phantom{-17}\end{array}&\\x-7&\phantom{-}\enclose{longdiv}{\begin{array}{cccc}x^{3}&- 12 x^{2}&+38 x&-17\end{array}}&\\\phantom{\color{Magenta}{x}-7}&\begin{array}{rrrr}\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^{3}}{x}=x^{2}$$$.

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

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

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


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x}-7}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrr}\color{Fuchsia}{x^{2}}&\phantom{- 5 x}&\phantom{+3}&\phantom{-17}\end{array}&\\\color{Magenta}{x}-7&\phantom{-}\enclose{longdiv}{\begin{array}{cccc}\color{Fuchsia}{x^{3}}&- 12 x^{2}&+38 x&-17\end{array}}&\frac{\color{Fuchsia}{x^{3}}}{\color{Magenta}{x}}=\color{Fuchsia}{x^{2}}\\\phantom{\color{Magenta}{x}-7}&\begin{array}{rrrr}-\phantom{x^{3}}&\phantom{- 12 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}x^{3}&- 7 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&- 5 x^{2}&+38 x&-17\end{array}&\begin{array}{c}\phantom{x^{3}- 12 x^{2}+38 x-17}\\\color{Fuchsia}{x^{2}}\left(\color{Magenta}{x}-7\right)=x^{3}- 7 x^{2}\\\phantom{- 5 x^{2}+38 x-17}\end{array}\end{array}$$$

Step 2

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

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

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

Subtract the remainder from the obtained result: $$$\left(- 5 x^{2}+38 x-17\right)-\left(- 5 x^{2}+35 x\right)=3 x-17$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x}-7}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrr}x^{2}&\color{DarkBlue}{- 5 x}&\phantom{+3}&\phantom{-17}\end{array}&\\\color{Magenta}{x}-7&\phantom{-}\enclose{longdiv}{\begin{array}{cccc}x^{3}&- 12 x^{2}&+38 x&-17\end{array}}&\\\phantom{\color{Magenta}{x}-7}&\begin{array}{rrrr}-\phantom{x^{3}}&\phantom{- 12 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}x^{3}&- 7 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&\color{DarkBlue}{- 5 x^{2}}&+38 x&-17\\&-\phantom{- 5 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}&- 5 x^{2}&+35 x\\\hline\phantom{\enclose{longdiv}{}}&&3 x&-17\end{array}&\begin{array}{c}\phantom{x^{3}- 12 x^{2}+38 x-17}\\\phantom{\color{Fuchsia}{x^{2}}\left(\color{Magenta}{x}-7\right)=x^{3}- 7 x^{2}}\\\frac{\color{DarkBlue}{- 5 x^{2}}}{\color{Magenta}{x}}=\color{DarkBlue}{- 5 x}\\\phantom{- 5 x^{2}+38 x-17}\\\color{DarkBlue}{- 5 x}\left(\color{Magenta}{x}-7\right)=- 5 x^{2}+35 x\\\phantom{3 x-17}\end{array}\end{array}$$$

Step 3

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

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

Multiply it by the divisor: $$$3\left(x-7\right)=3 x-21$$$.

Subtract the remainder from the obtained result: $$$\left(3 x-17\right)-\left(3 x-21\right)=4$$$.


$$$\require{enclose}\begin{array}{rlc}\phantom{\color{Magenta}{x}-7}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrr}x^{2}&- 5 x&\color{OrangeRed}{+3}&\phantom{-17}\end{array}&\\\color{Magenta}{x}-7&\phantom{-}\enclose{longdiv}{\begin{array}{cccc}x^{3}&- 12 x^{2}&+38 x&-17\end{array}}&\\\phantom{\color{Magenta}{x}-7}&\begin{array}{rrrr}-\phantom{x^{3}}&\phantom{- 12 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}x^{3}&- 7 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&- 5 x^{2}&+38 x&-17\\&-\phantom{- 5 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}&- 5 x^{2}&+35 x\\\hline\phantom{\enclose{longdiv}{}}&&\color{OrangeRed}{3 x}&-17\\&&-\phantom{3 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}&&3 x&-21\\\hline\phantom{\enclose{longdiv}{}}&&&\color{Purple}{4}\end{array}&\begin{array}{c}\phantom{x^{3}- 12 x^{2}+38 x-17}\\\phantom{\color{Fuchsia}{x^{2}}\left(\color{Magenta}{x}-7\right)=x^{3}- 7 x^{2}}\\\phantom{- 5 x^{2}+38 x-17}\\\phantom{- 5 x^{2}+38 x-17}\\\phantom{\color{DarkBlue}{- 5 x}\left(\color{Magenta}{x}-7\right)=- 5 x^{2}+35 x}\\\frac{\color{OrangeRed}{3 x}}{\color{Magenta}{x}}=\color{OrangeRed}{3}\\\phantom{3 x-17}\\\color{OrangeRed}{3}\left(\color{Magenta}{x}-7\right)=3 x-21\\\phantom{4}\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}-7}&\phantom{\enclose{longdiv}{}-}\begin{array}{rrrr}\color{Fuchsia}{x^{2}}&\color{DarkBlue}{- 5 x}&\color{OrangeRed}{+3}&\phantom{-17}\end{array}&Hints\\\color{Magenta}{x}-7&\phantom{-}\enclose{longdiv}{\begin{array}{cccc}\color{Fuchsia}{x^{3}}&- 12 x^{2}&+38 x&-17\end{array}}&\frac{\color{Fuchsia}{x^{3}}}{\color{Magenta}{x}}=\color{Fuchsia}{x^{2}}\\\phantom{\color{Magenta}{x}-7}&\begin{array}{rrrr}-\phantom{x^{3}}&\phantom{- 12 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}x^{3}&- 7 x^{2}\\\hline\phantom{\enclose{longdiv}{}}&\color{DarkBlue}{- 5 x^{2}}&+38 x&-17\\&-\phantom{- 5 x^{2}}&\phantom{+38 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}&- 5 x^{2}&+35 x\\\hline\phantom{\enclose{longdiv}{}}&&\color{OrangeRed}{3 x}&-17\\&&-\phantom{3 x}&\phantom{-17}\\\phantom{\enclose{longdiv}{}}&&3 x&-21\\\hline\phantom{\enclose{longdiv}{}}&&&\color{Purple}{4}\end{array}&\begin{array}{c}\phantom{x^{3}- 12 x^{2}+38 x-17}\\\color{Fuchsia}{x^{2}}\left(\color{Magenta}{x}-7\right)=x^{3}- 7 x^{2}\\\frac{\color{DarkBlue}{- 5 x^{2}}}{\color{Magenta}{x}}=\color{DarkBlue}{- 5 x}\\\phantom{- 5 x^{2}+38 x-17}\\\color{DarkBlue}{- 5 x}\left(\color{Magenta}{x}-7\right)=- 5 x^{2}+35 x\\\frac{\color{OrangeRed}{3 x}}{\color{Magenta}{x}}=\color{OrangeRed}{3}\\\phantom{3 x-17}\\\color{OrangeRed}{3}\left(\color{Magenta}{x}-7\right)=3 x-21\\\phantom{4}\end{array}\end{array}$$$

Therefore, $$$\frac{x^{3} - 12 x^{2} + 38 x - 17}{x - 7}=x^{2} - 5 x + 3+\frac{4}{x - 7}$$$

Answer: $$$\frac{x^{3} - 12 x^{2} + 38 x - 17}{x - 7}=x^{2} - 5 x + 3+\frac{4}{x - 7}$$$