Question:
Let a function $f: \mathbf{R} \rightarrow \mathbf{R}$ be defined as
$f(x)= \begin{cases}\sin x-e^{x} & \text { if } x \leq 0 \\ a+[-x] & \text { if } 0 Where $[x]$ is the greatest integer less than or equal to $\mathrm{x}$. If $f$ is continuous on $\mathbf{R}$, then $(\mathrm{a}+\mathrm{b})$ is equal to:
Correct Option: , 2
Solution:
Continuous at $x=0$
$\mathrm{f}\left(0^{+}\right)=\mathrm{f}\left(0^{-}\right) \Rightarrow \mathrm{a}-1=0-\mathrm{e}^{0}$
$\Rightarrow \mathrm{a}=0$
Continuous at $x=1$
$f\left(1^{+}\right)=f\left(1^{-}\right)$
$\Rightarrow 2(1)-b=a+(-1)$
$\Rightarrow b=2-a+1 \Rightarrow b=3$
$\therefore a+b=3$