Let $a$ be a real number and
\[
f(x) =
\begin{cases}
-2\sin x, & x \le -\frac{\pi}{2} \\
1 + a\sin x, & -\frac{\pi}{2}<x \le \frac{\pi}{2}
\end{cases}
\]
If $f(x)$ is continuous, then the value of $a$ is:
Show Hint
For piecewise functions, check continuity at boundary points by equating LHS and RHS.