# Adding and Subtracting Polynomials

The addition and subtraction of two polynomials are fundamental mathematical operations frequently occurring in various applications. These operations involve the combination of two polynomials to create a new polynomial.

## Adding polynomials

When we add two polynomials of the same degree \(n\), the result is also a polynomial of the same degree. For instance, let \(P(x)\) and \(Q(x)\) be two polynomials of degree \(n\). Their sum, represented as \(P(x)+Q(x)\), is also a polynomial of degree \(n\). To obtain the sum, we add the coefficients of the corresponding terms.

\[ \begin{align*} P(x) + Q(x) &= (ax^n + bx^{n-1} + \ldots + z) + (px^n + qx^{n-1} + \ldots + w) \\[0.6em] &= (a+p)x^n + (b+q)x^{n-1} + \ldots + (z+w) \end{align*} \]

The implementation of this rule in practice is quite simple and easy to apply.

## Example 1

Calculate the sum of two polynomials \(P(x) + (Q(x)\):

\[ P(x) = x^2 + 3x-1 \] \[ Q(x) = 2x^2-x+5 \]

Their sum is given by:

\[ P(x) + Q(x) = \left( x^2 + 3x-1 \right) + (2x^2-x + 5) \]

Let us proceed with the simplification of the given expression by eliminating the parentheses and grouping the terms that share the same degree.

\begin{align*} P(x) + Q(x) &= x^2 + 3x-1 + 2x^2-x + 5 \\[0.6em] &= (x^2 + 2x^2) + (3x-x) + (-1 + 5) \\[0.6em] &= 3x^2 + 2x + 4 \end{align*}

Hence, the resultant of the two polynomials \(P(x) + Q(x)\) of degree \(n = 2\) can be expressed by a polynomial of the same degre \(n\), in this example equal to \(3x^2 + 2x + 4 \)

## Subtracting polynomials

When we subtract two polynomials of the same degree \(n\), the result may be a polynomial of degree less than or equal to \(n\). For instance, let \(P(x)\) and \(Q(x)\) be two polynomials of degree \(n\). Their difference, represented as \(P(x)-Q(x)\), can results in a polynomial of degree \(\leq n\). To obtain the subtraction, we subtract the coefficients of the corresponding terms.

\begin{align*} P(x)-Q(x) &= (ax^n + bx^{n-1} + \ldots + z)-(px^n + qx^{n-1} + \ldots + w) \\[0.6em] &= (a-p)x^n + (b-q)x^{n-1} + \ldots + (z-w) \end{align*}

## Example 2

Calculate the subtraction of two polynomials \(P(x)-Q(x)\):

\[ P(x) = 2x^2 + 3x-1 \] \[ Q(x) = 2x^2-x + 5 \]

Their difference is given by:

\[ P(x)-Q(x) = \left( 2x^2 + 3x-1 \right)-\left( 2x^2-x + 5 \right) \]

Let us proceed with the simplification of the given expression by eliminating the parentheses and grouping the terms that share the same degree.

\begin{align*} P(x)-Q(x) &= 2x^2 + 3x-1- 2x^2 + x-5 \\[0.6em] &= (2x^2-2x^2) + (3x + x) + (-1-5) \\[0.6em] &= 4x-6 \end{align*}

In this case, subtracting the monomials of degree \(n=2\) from the polynomial produces a first-degree \(n-1\) polynomial: \(4x-6\).

In more general terms, we can use the same principle to add or subtract two polynomials \(P(x) + Q(x) \) where \(P(x\) has degree \(n\) and \(Q(x)\) degree \(m\) and \(n\) is different from \(m\).

## Example 3

For example, calculate the sum of two polynomials \(P(x) + Q(x) \) where \(P(Q)\) is a polynomial of degree \(2\) and \(Q(x)\) of degree \(4\).

\[ P(x) = x^2 + 3-1 \] \[ Q(x) = 2x^4 – x + 5\]

Their sum is given by:

\[ P(x) + Q(x) = \left( x^2 + 3x-1 \right) + \left(2x^4-x + 5\right) \]

Let us proceed with the simplification of the given expression by eliminating the parentheses and grouping the terms that share the same degree.

\begin{align*} P(x) + Q(x) &= x^2 + 3x-1 + 2x^4 – x + 5 \\[0.6em] &= (x^2) + (2x^4) + (3x-x) + (-1 + 5) \\[0.6em] &= 2x^4 + x^2 + 2x + 4 \end{align*}

In this case, the sum results in a fourth-degree polynomial \(2x^4 + x^2 + 2x + 4\), reflecting the degree of \(Q\), which is the higher-degree polynomial.