Adding and Subtracting Polynomials Calculator

Add or subtract two polynomials and collect the like terms.

Use letters, brackets and whole powers.

Use letters, brackets and whole powers.

Try

Result

You entered3x2+2x−1−x2−5x+43x^{2} + 2x - 1 - x^{2} - 5x + 4

2x2+7x−5\displaystyle 2x^{2} + 7x - 5

Degree

2\displaystyle 2

Number of terms

3\displaystyle 3
Show the work
  1. Subtracting a polynomial

    Subtracting a polynomial is the same as adding its opposite, so every sign inside the second polynomial changes.

    −(x2−5x+4)=−x2+5x−4-\left(x^{2} - 5x + 4\right) = -x^{2} + 5x - 4
  2. Collect like terms

    Like terms have the same letters with the same powers, so their coefficients can be added. Add the numbers in front of each group of like terms.

    Using ax+bx=(a+b)xax + bx = \left(a + b\right)x

    3x2−x2=(3−1)x2=2x22x+5x=(2+5)x=7x−1−4=−5\begin{gathered} 3x^{2} - x^{2} = \left(3 - 1\right)x^{2} = 2x^{2} \\ 2x + 5x = \left(2 + 5\right)x = 7x \\ -1 - 4 = -5 \end{gathered}
  3. Result

    So the difference is 2x2+7x−52x^{2} + 7x - 5.

Worked examples