Let \(f(x) = \left\{ \begin{array}{cl} 2x + 7 & \text{if } x < -2, \\ -x^2 - x + 1 & \text{if } x \ge -2. \end{array} \right.\)Find the sum of all values of x such that f(x)=-5.
2x + 7 = -5
2x = -12
x = -6
-x^2 - x + 1 = -5 multiply through by -1
x^2 + x - 1 = 5
x^2 + x - 6 = 0 factor
(x + 3) ( x - 2) = 0
Set each factor to 0 and solve for x and we get x = -3 (out of the domain for the function) or x = 2
So...the sum of the x values such that f(x) = -5 ⇒ -6 + 2 = -4