The equation of the piecewise function [tex]\( f(x) \)[/tex] is given below. What is the value of [tex]\( f(-2) \)[/tex]?

[tex]\[ f(x) = \left\{\begin{aligned}
-x^2, & \quad x \ \textless \ -2 \\
3, & \quad -2 \leq x \ \textless \ 0 \\
x + 2, & \quad x \geq 0
\end{aligned}\right. \][/tex]

A. [tex]\( f(-2) = -6 \)[/tex]
B. [tex]\( f(-2) = -4 \)[/tex]
C. [tex]\( f(-2) = 0 \)[/tex]
D. [tex]\( f(-2) = 3 \)[/tex]



Answer :

To determine the value of [tex]\( f(-2) \)[/tex] for the given piecewise function, we follow these steps:

1. Identify the correct interval for the input value:
We need to find the value of [tex]\( f(x) \)[/tex] at [tex]\( x = -2 \)[/tex]. Look at the conditions of the piecewise function:
[tex]\[ f(x) = \begin{cases} -x^2, & x < -2 \\ 3, & -2 \leq x < 0 \\ x + 2, & x \geq 0 \end{cases} \][/tex]

2. Determine which part of the piecewise function applies:
Since [tex]\( x = -2 \)[/tex], we check which interval includes [tex]\(-2\)[/tex]:
- For [tex]\( x < -2 \)[/tex], the function is [tex]\( f(x) = -x^2 \)[/tex]. This interval does not include [tex]\(-2\)[/tex].
- For [tex]\(-2 \leq x < 0 \)[/tex], the function is [tex]\( f(x) = 3 \)[/tex]. This interval includes [tex]\(-2\)[/tex].

3. Find the corresponding output value:
Since [tex]\(-2\)[/tex] is in the interval [tex]\(-2 \leq x < 0\)[/tex], we use the function defined in this interval, which is [tex]\( f(x) = 3 \)[/tex].

Therefore, [tex]\( f(-2) = 3 \)[/tex].

Among the given choices:
- [tex]$f(-2) = -6$[/tex]
- [tex]$f(-2) = -4$[/tex]
- [tex]$f(-2) = 0$[/tex]
- [tex]$f(-2) = 3$[/tex]

The correct answer is [tex]\(\boxed{3}\)[/tex].