a, \(f\left(-2\right)=\left|-2-1\right|+2=\left|-3\right|+2=3+2=5\)
\(f\left(\frac{1}{2}\right)=\left|\frac{1}{2}-1\right|+2=\left|-\frac{1}{2}\right|+2=\frac{1}{2}+2=2\frac{1}{2}\)
b, Để \(f\left(x\right)=3\) thì:
\(\left|x-1\right|+2=3\\ \Rightarrow\left|x-1\right|=1\\ \Rightarrow\left[{}\begin{matrix}x-1=1\\x-1=-1\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}x=2\\x=0\end{matrix}\right.\)
Vậy tại \(x\in\left\{0;2\right\}\) thì \(f\left(x\right)=3\)
Ta có: \(f\left(x\right)=\left|x-1\right|+2\)
a) Thay \(x=-2\) vào \(f\left(x\right)\) ta được:
\(f\left(-2\right)=\left|\left(-2\right)-1\right|+2\)
\(f\left(-2\right)=3+2\)
\(f\left(-2\right)=5.\)
+ Thay \(x=\frac{1}{2}\) vào \(f\left(x\right)\) ta được:
\(f\left(x\right)=\left|\frac{1}{2}-1\right|+2\)
\(f\left(x\right)=\frac{1}{2}+2\)
\(f\left(x\right)=\frac{5}{2}.\)
b) Để \(f\left(x\right)=3.\)
\(\Rightarrow\left|x-1\right|+2=3\)
\(\Rightarrow\left|x-1\right|=3-2\)
\(\Rightarrow\left|x-1\right|=1\)
\(\Rightarrow\left[{}\begin{matrix}x-1=1\\x-1=-1\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}x=1+1\\x=\left(-1\right)+1\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}x=2\\x=0\end{matrix}\right.\)
Vậy \(x\in\left\{2;0\right\}\) thì \(f\left(x\right)=3.\)
Chúc bạn học tốt!