Solution:
Concept: Factor theorem: (x−a) is a factor of a polynomial f(x) exactly when f(a)=0, that is, when the remainder on dividing by (x−a) is zero. Each given factor gives one equation in a and b; solve the two equations together.
Given: (x+2) and (x+3) are factors of f(x)=x3+ax+b.
Step 1 — Use the factor (x+2).
(x+2) is zero at x=−2, so f(−2)=0.
(−2)3+a(−2)+b−8−2a+b−2a+b=0=0=8…(1)
Step 2 — Use the factor (x+3).
(x+3) is zero at x=−3, so f(−3)=0.
(−3)3+a(−3)+b−27−3a+b−3a+b=0=0=27…(2)
Step 3 — Solve the two equations.
Subtracting equation (2) from equation (1) removes b.
(−2a+b)−(−3a+b)a=8−27=−19
Step 4 — Find b.
We put a=−19 in equation (1).
−2(−19)+b38+bb=8=8=−30
Check: With these values f(x)=x3−19x−30. Then f(−2) is −8+38−30 and f(−3) is −27+57−30; both work out to 0.
Watch out: (−2)3 is −8 and (−3)3 is −27: an odd power of a negative number is negative.
Therefore, a=−19 and b=−30.