Adding and subtracting polynomials
Two polynomials each describe part of a quantity. How do you get one polynomial for the whole, or for the difference between them?
Where you are 10 in Polynomials
When you reach for it
A quantity is often built from parts, and each part is a polynomial. A school club prints T-shirts: what it takes in and what it spends both depend on the number of shirts, and its profit is one minus the other. A triangular frame has three sides, each a polynomial in a length x, and the timber it takes is their sum. Rather than work out each part every time you want a number, you can combine the polynomials once and get a single polynomial for the whole thing.
Adding and subtracting polynomials is that combining. It is the same move as combining like terms, applied across two polynomials at once, with one extra piece of care for subtraction. The words term, degree, standard form and leading coefficient are used as in Degree, terms and standard form.
The procedure
Like terms, and why only they combine
Two terms are like terms when they have the same variables raised to the same powers; only the coefficients may differ. So 5x^2 and -3x^2 are like terms, and so are 4a^2b and a^2b. But x^2 and x are not, and neither are a^2b and ab^2: the same letters, different powers on them.
Like terms combine because of the distributive property, read backwards:
Both terms count copies of the same thing, x^2, so you add the counts. Unlike terms have no common thing to count. Picture them as pieces: x^2 is a square of side x, x is a strip x long and 1 wide, and 1 is a unit square.
Three squares and four strips are 3x^2 + 4x, and that is as short as it gets. Calling it 7x^2 would turn four strips into squares, and calling it 7x^3 adds a dimension that is not there. A number shows the same thing. At x = 3,
so neither shortcut has the right value. Different powers of x grow at different rates, which is why each stays in its own term.
Adding
To add two polynomials, drop the brackets and combine like terms. Brackets after a plus sign can go without changing anything, because adding a sum is adding each of its parts (the associative property). The commutative property then lets you reorder the terms so that like terms sit together:
The answer is written in standard form, highest power first, which makes it easy to compare.
Columns. The same addition can be set out like a column sum of numbers, with like terms stacked above each other. If a power is missing from one polynomial, write it with coefficient 0 so the columns stay lined up, the job a zero does in 407. Each column is then a like-term addition of its own. Example 2 does this.
Subtracting
Subtracting a polynomial means subtracting every term of it. The minus sign in front of a bracket is -1 multiplying the whole bracket, and by the distributive property -1 multiplies each term inside:
Every sign inside flips. So subtracting a polynomial is adding its opposite, just as 8 - 5 = 8 + (-5) in integer subtraction:
Only the first term of the second polynomial sits right after the minus sign, so it is tempting to change that one and leave the rest. Writing the opposite of each term before combining anything keeps all of them honest. In columns, change the sign of every term in the bottom row, then add.
The order matters. “Subtract P from Q” means Q - P, and P - Q is the opposite of Q - P: every coefficient has the other sign.
Several variables
Nothing changes when a polynomial has more than one variable, except that “the same powers” means the same power on each variable. In
no two terms are alike: a^2b has a twice and b once, ab^2 has a once and b twice, and ab has each once. Writing the letters of a term in alphabetical order (a^2b, never ba^2) makes like terms easy to spot.
What the result is
The sum or difference of two polynomials is again a polynomial. Combining like terms only adds or subtracts coefficients; it never changes an exponent, so every term of the result is still a number times the variables raised to whole-number powers. A set is closed under an operation when doing that operation to members of the set always gives another member. So polynomials are closed under addition and subtraction, just as the integers are closed under subtraction while the whole numbers are not (3 - 5 is not a whole number).
The degree of the result is at most the larger of the two degrees, because no new exponent appears. It can be less: when the two leading terms are opposites (in a sum) or equal (in a difference), they cancel and the degree drops.
Two polynomials of degree 3 give one of degree 2.
Checking with a number
Two equal polynomials give the same value at every number. So pick a number, substitute it into the original problem and into your answer, and compare. For the subtraction above at x = 2: (8 + 10 - 1) - (4 - 6 + 6) = 17 - 4 = 13, and 4 + 16 - 7 = 13. They agree.
Choose the number with some care. x = 0 tests only the constant terms, and x = 1 makes every power of x equal to 1, so it cannot tell x^2 from x. A number like 2 or 3 is a better test. A disagreement proves the answer wrong; agreement at one number is good evidence, not a proof.
Worked examples
Adding two polynomials
Add (5x^2 - 4x + 7) + (2x^2 + 8x - 10), and check the result at x = 2.
SolutionThe plus sign lets the brackets go. Gather like terms, then add their coefficients:
Check at x = 2. The first polynomial gives 20 - 8 + 7 = 19, the second 8 + 16 - 10 = 14, and 19 + 14 = 33. The answer gives 28 + 8 - 3 = 33. They agree.
Adding in columns, with a missing power
Add 4x^3 - 2x + 9 and x^3 + 6x^2 - 5x - 1.
SolutionThe first polynomial has no x^2 term. Write it as 0x^2 so that the x terms and the constants line up, then add down each column:
The sum is 5x^3 + 6x^2 - 7x + 8. Without the 0x^2 placeholder, the -2x would sit under the 6x^2 and a column would add unlike terms.
Subtracting, and a degree that drops
(a) Simplify (6y^2 - 4y + 3) - (2y^2 - 9y + 8).
(b) Simplify (5x^3 - x^2 + 2) - (5x^3 + 3x^2 - 4x + 2), and give the degree of the result.
Solution(a) The minus sign multiplies every term of the second bracket by -1, so each sign flips, to -2y^2, +9y and -8:
Check at y = 2: (24 - 8 + 3) - (8 - 18 + 8) = 19 - (-2) = 21, and 16 + 10 - 5 = 21.
(b) Flip every sign in the second bracket and combine:
The x^3 terms cancel, and so do the constants. Both polynomials had degree 3; the difference has degree 2. Check at x = 2: (40 - 4 + 2) - (40 + 12 - 8 + 2) = 38 - 46 = -8, and -16 + 8 = -8.
Several variables
Simplify (3a^2b - ab^2 + 4ab) - (a^2b - 5ab^2 + 4ab - 2).
SolutionSubtracting the second polynomial means adding the opposite of each of its terms: -a^2b, +5ab^2, -4ab and +2. Then match terms by the power on each letter:
The ab terms cancel. The a^2b and ab^2 terms stay apart, since a and b carry different powers in them.
To check, use two different numbers, say a = 2 and b = 3; taking a = b would make a^2b and ab^2 equal and hide a mix-up between them. The first polynomial is 36 - 18 + 24 = 42, the second 12 - 90 + 24 - 2 = -56, and 42 - (-56) = 98. The answer gives 24 + 72 + 2 = 98.
Profit from revenue and cost
A school T-shirt printing club (the numbers are made up) finds that for n shirts in a term its revenue, the money it takes in, is R = 14n - 0.02n^2 dollars, since bigger orders get a discount. Its cost is C = 0.01n^2 + 5n + 120 dollars. Find a polynomial for the profit P = R - C, and use it for n = 100.
SolutionThe whole cost is subtracted, so every one of its terms changes sign:
At n = 100, P = -0.03(10\,000) + 900 - 120 = 480 dollars.
Check by working the parts separately: R = 1400 - 200 = 1200 and C = 100 + 500 + 120 = 720, so the profit is 1200 - 720 = 480 dollars. Every term is in dollars, so they may be added and subtracted, and the one polynomial now gives the profit for any number of shirts.
The missing side of a frame
A workshop builds a family of triangular timber frames, sized by a length x in decimeters. For a given x, a frame uses 15x + 7 decimeters of timber in all, its bottom edge is 4x + 2 decimeters and its right edge is 6x - 1 decimeters. Find the third side.
The three sides add up to the total, so the third side is what must be added to the two known sides to make it: the total minus both of them. Subtract each whole polynomial:
The minus sign in front of (6x - 1) reaches the -1 too, which becomes +1. The third side is 5x + 6 decimeters. Adding the three sides back gives 15x + 7, as it should. At x = 5 the sides are 22, 29 and 31 decimeters, and 22 + 29 + 31 = 82 = 75 + 7.
Every term here is a length: 4x is four times the length x, and 2 is two decimeters. That is why all of them may be added and subtracted.
Boundaries
- Only like terms combine. The variables and the power on each one must all match: x^2y and xy^2 do not combine, and neither do x^3 and x^2.
- The minus sign reaches every term only through a bracket. In Q - (x^2 - 3x + 6) all three terms change sign; in Q - x^2 - 3x + 6 only x^2 and 3x are subtracted, and that is a different expression.
- Order matters in subtraction. P - Q = -(Q - P). Addition is commutative; subtraction is not.
- The degree of the result can fall, even all the way: (x^2 + 1) - (x^2 + 1) = 0, the zero polynomial. Two polynomials of degree n have a sum of degree at most n, not always n.
- Closure is about polynomials. Their exponents are whole numbers. In \displaystyle 2\sqrt{x} + 3\sqrt{x} like terms still combine, to \displaystyle 5\sqrt{x}, but it is not a polynomial and the closure result says nothing about it.
- A check at one number cannot prove an answer right. x^2 and x agree at x = 0 and at x = 1, so a check at either would pass x where x^2 is correct. Two polynomials of degree at most n that agree at n + 1 different numbers are equal, though, so enough checks do settle it.
Where this goes next
Adding and subtracting is the first of the operations on polynomials. Multiplying comes next, then multiplying two binomials and the special products, and each of those ends by combining like terms exactly as here, the pattern already met in Distribute, then combine. When polynomials are seen as functions, adding them is adding functions, written (f + g)(x) = f(x) + g(x). The same moves add and subtract complex numbers, with the real parts as one kind of like term and the multiples of i as another (Adding, subtracting and multiplying complex numbers).
Exercises
Adding
- (3x^2 + 5x - 4) + (x^2 - 2x + 9)
- (7m^3 - 2m + 1) + (-4m^3 + m^2 + 6m - 8)
- Add in columns, with a 0 for any missing power: (2t^4 - 3t^2 + t) + (t^4 + 5t^3 - 2t - 6)
Subtracting
- (9y^2 - 3y + 2) - (4y^2 + 5y - 7)
- (x^3 - 6x + 4) - (-2x^3 + x^2 - 6x + 10)
- Subtract 3p^2 - p + 5 from 8p^2 + 2p - 1.
- Simplify (4n^2 + 3n - 1) - (4n^2 - 2n + 7) and give the degree of the result.
Several variables
- (5a^2b + 3ab - 2b^2) + (-a^2b + 4ab^2 - 3ab)
- (x^2 - 3xy + 2y^2) - (4x^2 + xy - y^2)
- (2u^3v - uv + 7) - (2u^3v + 5uv^3 - uv)
Combining and checking
- (2x^2 - 5x + 1) + (x^2 + 4) - (3x^2 - x - 2)
- Use a check at x = 2 to show that the equation (5x^2 - 2x + 3) - (x^2 - 4x - 1) = 4x^2 - 6x + 2 is wrong, then find the correct result.
Problems
- What must be added to 3x^2 - 2x + 5 to get 5x^2 + x - 1?
- The next year the T-shirt club (numbers made up) has revenue R = 16n - 0.03n^2 dollars and cost C = 0.02n^2 + 6n + 150 dollars for n shirts. Find the profit polynomial and the profit on 80 shirts.
- Another triangular frame, with x a length in decimeters, has sides 2x + 3, 3x - 1 and x + 4 decimeters. Find the timber it uses as a polynomial, and its value for x = 5.
- Give two polynomials of degree 3 whose difference has degree 1.
Reasoning
- Explain why 2x^2 + 5x cannot be written as the single term 7x^2, once with the pieces in the figure and once with a number.
- Explain why P - Q and Q - P are always opposites, and why P - Q is the zero polynomial exactly when P and Q have the same coefficient on every term.
Answers
- 4x^2 + 3x + 5. 3x^2 + x^2 = 4x^2, 5x - 2x = 3x, -4 + 9 = 5.
- 3m^3 + m^2 + 4m - 7. 7m^3 - 4m^3 = 3m^3; the m^2 comes only from the second; -2m + 6m = 4m; 1 - 8 = -7.
- 3t^4 + 5t^3 - 3t^2 - t - 6. The rows are 2t^4 + 0t^3 - 3t^2 + t + 0 and t^4 + 5t^3 + 0t^2 - 2t - 6; add each column.
- 5y^2 - 8y + 9. Flip the signs: 9y^2 - 3y + 2 - 4y^2 - 5y + 7.
- 3x^3 - x^2 - 6. Flip the signs: x^3 - 6x + 4 + 2x^3 - x^2 + 6x - 10; the x terms cancel.
- 5p^2 + 3p - 6. “Subtract from” puts 8p^2 + 2p - 1 first: 8p^2 + 2p - 1 - 3p^2 + p - 5.
- 5n - 8, degree 1. The n^2 terms cancel: 4n^2 + 3n - 1 - 4n^2 + 2n - 7.
- 4a^2b + 4ab^2 - 2b^2. 5a^2b - a^2b = 4a^2b; the ab terms cancel; 4ab^2 and -2b^2 have no partners.
- -3x^2 - 4xy + 3y^2. Flip the signs: x^2 - 3xy + 2y^2 - 4x^2 - xy + y^2.
- -5uv^3 + 7. Flip the signs: 2u^3v - uv + 7 - 2u^3v - 5uv^3 + uv; the u^3v and uv terms cancel, and uv^3 is not like u^3v.
- -4x + 7. x^2 terms: 2 + 1 - 3 = 0; x terms: -5x + x = -4x; constants: 1 + 4 + 2 = 7.
- At x = 2 the left side is (20 - 4 + 3) - (4 - 8 - 1) = 19 - (-5) = 24, but the right side gives 16 - 12 + 2 = 6, so the equation is wrong. The correct result is 4x^2 + 2x + 4, from 5x^2 - 2x + 3 - x^2 + 4x + 1; at x = 2 it gives 24.
- 2x^2 + 3x - 6. The missing piece is (5x^2 + x - 1) - (3x^2 - 2x + 5).
- P = -0.05n^2 + 10n - 150, and the profit on 80 shirts is 330 dollars. P = 16n - 0.03n^2 - 0.02n^2 - 6n - 150; at n = 80, -320 + 800 - 150 = 330.
- 6x + 6 decimeters, which is 36 decimeters for x = 5. Check: the sides are 13, 14 and 9, and 13 + 14 + 9 = 36.
- Many pairs work. One is 2x^3 + x^2 + 4x and 2x^3 + x^2 + x - 5, both of degree 3, whose difference is 3x + 5. Any pair works with the same x^3 and x^2 coefficients and different x coefficients.
- In pieces, 2x^2 + 5x is two x by x squares and five x by 1 strips, while 7x^2 is seven squares. A strip has area x and a square x^2, which differ unless x is 0 or 1, so five strips are not five squares. With a number, at x = 4: 2(16) + 5(4) = 52, but 7(16) = 112.
- Each coefficient of P - Q is the coefficient of P minus that of Q, and each coefficient of Q - P is the same subtraction the other way round, so it has the opposite sign. Hence Q - P = -(P - Q). A difference of two numbers is 0 exactly when they are equal, so every coefficient of P - Q is 0 exactly when P and Q match term by term.