Problem

Graph the following piecewise defined function and evaluate the function at the indicated values:
\[
f(x)=\left\{\begin{array}{ll}
3 x-1 & \text { if } x< -2 \\
x^{2}+1 & \text { if }-2 \leq x \leq 2 \\
-x+5 & \text { if } x> 2
\end{array}\right.
\]
- $f(0)$
- $f(-4)$
- $f(5)$

Answer

Expert–verified
Hide Steps
Answer

\(f(5) = \boxed{0}\)

Steps

Step 1 :Define the function in Python.

Step 2 :Plot the function using matplotlib.

Step 3 :Evaluate the function at the given points.

Step 4 :The function is a combination of a linear function, a quadratic function, and another linear function, each defined for different intervals of x.

Step 5 :The function evaluations are as follows:

Step 6 :\(f(0) = \boxed{1}\)

Step 7 :\(f(-4) = \boxed{-11}\)

Step 8 :\(f(5) = \boxed{0}\)

link_gpt