Let
\[f(n) = \left\{
\begin{array}{cl}
n^2-2 & \text{ if }n<0, \\
2n-20 & \text{ if }n \geq 0.
\end{array}
\right.\]
What is the positive difference between the two values of $a$ that satisfy the equation $f(-2)+f(2)+f(a)=0$?
f(-2) = (-2)^2 - 2 = 2
f(2) = 2(2) - 20 = -16
So
2 - 16 + f(a) = 0
-14 + f(a) = 0
f(a) = 14
In the first function f(a) = 14 so a^2 - 2 = 14 ⇒ a^2 = 16 ⇒ a = -4 (a must be < 0)
In the second function f(a) = 14 so 2a -20 = 14 ⇒ 2a = 34 ⇒ a = 17
The positive difference is 17 - - 4 = 21