Let,
\(f(x) = \left\{ \begin{array}{cl} ax+3 & \text{ if }x>0, \\ ab & \text{ if }x=0, \\ bx+c & \text{ if }x<0. \end{array} \right.\)
If $f(2)=5$, $f(0)=5$, and $f(-2)=-10$, and $a$, $b$, and $c$ are nonnegative integers, then what is $a+b+c$?
For f(2)=5, 2 is greater than 0 so it's substituted into the equation ax+3 to get 2a+3=5.
For f(0)=5, 0 is directly equal to 0 so it's substituted into the equation ab to get ab=5.
For f(-2)=-10, -10 is less than 0 so it's substituted into the equation bx+c to get -2b+c=-10.
We have a system of equations now:
2a+3=5
ab=5
-2b+c=-10
From the first equation, 2a+3=5, a=1.
We substitute the value of a into ab=5, and get b=5.
Finally, from the last equation, -2b+c=-10, c=0.
So a+b+c=6.