If the function $f(x)= \begin{cases}-2 \sin x & \text {, if } x \leq \frac{-\pi}{2} \\ A \sin x+B & , \text…
If the function $f(x)= \begin{cases}-2 \sin x & \text {, if } x \leq \frac{-\pi}{2} \\ A \sin x+B & , \text { if } \frac{-\pi}{2} \lt x \lt \frac{\pi}{2} \\ \cos x & , \text { if } x \geq \frac{\pi}{2}\end{cases}$ is continuous everywhere, then the values of A and B are respectively