### Instruction: Let \[g(x) = \left\{ \begin{aligned} 3x+6 & \quad \text{ if } x < 0 \\ 2x - 13 & \quad \text{ if } x \ge 0 \end{aligned} \right.\]Find all solutions to the equation $g(x) = 3.$.### Response: I notice that $g(x)$ is a piecewise function, which means it has different rules for different values of $x.$
To find all solutions, I need to check both cases: when $x < 0$ and when $x \ge 0.$
Let me start with the case $x < 0.$
In this case, $g(x) = 3x + 6,$ so I need to solve $3x + 6 = 3.$
Subtracting 6 from both sides, I get $3x = -3.$
Dividing by 3, I get $x = -1.$
This is one solution, but I need to check if it satisfies the condition $x < 0.$
It does, so I can keep it.
Now let me move on to the case $x \ge 0.$
In this case, $g(x) = 2x - 13,$ so I need to solve $2x - 13 = 3.$
Adding 13 to both sides, I get $2x = 16.$
Dividing by 2, I get $x = 8.$
This is another solution, but I need to check if it satisfies the condition $x \ge 0.$
It does, so I can keep it too.
I have found two solutions, and I don't think there are any more, because the function $g(x)$ is linear in each piece and can only cross the horizontal line $y = 3$ at most once in each piece.