Let \(f(x) = \left\{ \begin{array}{cl} -x + 3 & \text{if } x \le 0, \\ 2x - 5 & \text{if } x > 0. \end{array} \right.\)How many solutions does the equation f(f(x)) = 4 have?
Working backwards:
1) Looking at the inner f(x): When will f(x) = 4?
--- If x <= 0: -x + 3 = 4 ---> -x = 1 ---> x = -1
--- If x > 0: 2x - 5 = 4 ---> 2x = 9 ---> x = 4.5
2) Looking at the outer f(x): When will f(x) = -1?
--- If x <= 0: -x + 3 = -1 ---> -x = -4 ---> x = 4 (Impossible! x must be <= 0)
--- If x > 0: 2x - 5 = -1 ---> 2x = 4 ---> x = 2 (First answer!)
--- If x <= 0: -x + 3 = 4.5 ---> -x = 1.5 ---> x = -1.5 (Second answer!)
--- If x > 0: 2x - 5 = 4.5 ---> 2x = 9.5 ---> x = 4.75 (Third answer!)
Check: f(f(2)) = f(-1) = 4
f(f(-1.5)) = f(4.5) = 4
f(f(4.75)) = f(4.5) = 4