Find [tex]$f(4)$[/tex] for the piecewise function.

[tex]\[
f(x) = \left\{
\begin{array}{ll}
-2x + 1 & \text{if } x \leq 1 \\
-x + 2 & \text{if } x \ \textgreater \ 1
\end{array}
\right.
\][/tex]

[tex]\[
f(4) = [?]
\][/tex]



Answer :

To find the value of the piecewise function [tex]\( f(x) \)[/tex] at [tex]\( x = 4 \)[/tex], we need to determine which piece of the function to use based on the value of [tex]\( x \)[/tex].

The piecewise function [tex]\( f(x) \)[/tex] is defined as follows:
[tex]\[ f(x) = \begin{cases} -2x + 1 & \text{if } x \leq 1 \\ -x + 2 & \text{if } x > 1 \end{cases} \][/tex]

Since [tex]\( x = 4 \)[/tex] is greater than 1, we use the second piece of the function:
[tex]\[ f(x) = -x + 2 \quad \text{for } x > 1 \][/tex]

Next, we substitute [tex]\( x = 4 \)[/tex] into this equation:
[tex]\[ f(4) = -4 + 2 \][/tex]

Perform the calculation:
[tex]\[ -4 + 2 = -2 \][/tex]

Therefore, the value of the function [tex]\( f(4) \)[/tex] is:
[tex]\[ f(4) = -2 \][/tex]