Evaluate Piecewise Function Values
Question:
If
$$
f(x)=
\begin{cases}
x^2, & x<0 \\
x, & 0\le x<1 \\
\frac{1}{x}, & x>1
\end{cases}
$$
Find:
(i) \(f\left(\frac12\right)\)
(ii) \(f(-2)\)
(iii) \(f(1)\)
(iv) \(f(\sqrt3)\)
(v) \(f(\sqrt{-3})\)
(i) \(f\left(\frac12\right)\)
(ii) \(f(-2)\)
(iii) \(f(1)\)
(iv) \(f(\sqrt3)\)
(v) \(f(\sqrt{-3})\)
Solution
(i) Find \(f\left(\frac12\right)\)
Since $$ 0\le \frac12 <1 $$ use \(f(x)=x\).
$$ f\left(\frac12\right)=\frac12 $$
(ii) Find \(f(-2)\)
Since $$ -2<0 $$ use \(f(x)=x^2\).
$$ f(-2)=(-2)^2=4 $$
(iii) Find \(f(1)\)
The function is not defined at \(x=1\).
Therefore, $$ f(1)\text{ is not defined} $$
(iv) Find \(f(\sqrt3)\)
Since $$ \sqrt3>1 $$ use $$ f(x)=\frac1x $$
$$ f(\sqrt3)=\frac1{\sqrt3} $$
(v) Find \(f(\sqrt{-3})\)
$$ \sqrt{-3} $$ is not a real number.
Therefore, $$ f(\sqrt{-3}) $$ is not defined in \(\mathbb R\).