Let $f(x)=\left\{\begin{array}{ll}1+\sin x, & x<0 \\ x^2-x+1, & x \geq 0\end{array}\right.$. Then, which one of following is not correct?
Answer & explanation
Correct answer: option 2
We have,
$\lim\limits_{x \rightarrow 0^{-}} f(x)=\lim\limits_{x \rightarrow 0^{-}} 1+\sin x=1$
$\lim\limits_{x \rightarrow 0^{+}} f(x)=\lim\limits_{x \rightarrow 0^{+}} x^2-x+1=1$ and, $f(0)=1$
Clearly $\lim\limits_{x \rightarrow 0^{-}} f(x)=\lim\limits_{x \rightarrow 0^{+}} f(x)=f(0)$
So, f is continuous at $x=0$.
Also, (LHD at x = 0) = $\left\{\frac{d}{d x}(1+\sin x)\right\}_{\text {at } x=0}=1>0$
and, (RHD at x = 0) = $\left\{\frac{d}{d x}\left(x^2-x+1\right)\right\}_{\text {at } x=0}=-1<0$
Thus, f(x) in increasing in the left neighbourhood of $x=0$ and decreasing in the right neighbourhood. So, $f(x)$ has a local maximum at $x=0$.
Also, $f^{\prime}(x)=\cos x>0$ for $x \in(-\pi / 2,0)$
and, $f^{\prime}(x)=2 x-1<0$ for $x \in(0,1 / 2)$
Thus, $f(x)$ is increasing in $(-\pi / 2,0)$ and decreasing in $(0,1 / 2)$