Continuity

Let $f\left(x\right)= \begin{cases} \dfrac{1-\sin^3 x}{3 \cos^2 x} & \text{if } x < \dfrac{\pi}{2} \\ & \\ a & \text{if } x = \dfrac{\pi}{2} \\ & \\ \dfrac{b\left(1-\sin x\right)}{\left(\pi - 2x\right)^2} & \text{if } x > \dfrac{\pi}{2} \end{cases}$
If $f\left(x\right)$ be a continuous function at $x=\dfrac{\pi}{2}$, find a and b.


$\begin{aligned} \lim\limits_{x \to \frac{\pi}{2}^-} f\left(x\right) & = \lim\limits_{x \to \frac{\pi}{2}^-} \; \dfrac{1-\sin^3 x}{3\cos^2 x} \\ & = \lim\limits_{x \to \frac{\pi}{2}^-} \; \dfrac{\left(1-\sin x\right)\left(1+\sin x + \sin^2 x\right)}{3 \left(1-\sin^2 x\right)} \\ & = \lim\limits_{x \to \frac{\pi}{2}^-} \; \dfrac{\left(1-\sin x\right)\left(1+\sin x + \sin^2 x\right)}{3 \left(1+\sin x\right)\left(1-\sin x\right)} \\ & = \lim\limits_{x \to \frac{\pi}{2}^-} \; \dfrac{1+\sin x + \sin^2 x}{3 \left(1+\sin x\right)} \\ & = \dfrac{1+1+1^2}{3\left(1+1\right)} = \dfrac{1}{2} \end{aligned}$

$\lim\limits_{x \to \frac{\pi}{2}^+} f\left(x\right) = \lim\limits_{x \to \frac{\pi}{2}^+} \; \dfrac{b\left(1-\sin x\right)}{\left(\pi - 2x\right)^2}$

Let $x = \dfrac{\pi}{2}+h$

Then, as $x \to \dfrac{\pi}{2}, \; h \to 0$

$\begin{aligned} \therefore \; \lim\limits_{x \to \frac{\pi}{2}^+}f\left(x\right) & = b \;\lim\limits_{h \to 0} \; \dfrac{1-\sin \left(\dfrac{\pi}{2}+h\right)}{\left[\pi - 2\left(\dfrac{\pi}{2}+h\right)\right]^2} \\ & = b\; \lim\limits_{h \to 0} \; \dfrac{1-\cos h}{4h^2} \;\; \left[\text{Note: }\sin \left(\dfrac{\pi}{2}+\theta\right)=\cos \theta\right] \\ & = b \;\lim\limits_{h \to 0} \; \dfrac{2 \sin^2 \left(\dfrac{h}{2}\right)}{4h^2} \;\; \left[\text{Note: }1-\cos 2 \theta = 2 \sin^2 \theta\right] \\ & = \dfrac{b}{2} \; \lim\limits_{h \to 0} \; \left[\dfrac{\sin \left(\dfrac{h}{2}\right)}{\dfrac{h}{2}}\right]^2 \times \dfrac{1}{4} \\ & = \dfrac{b}{2} \times 1^2 \times \dfrac{1}{4} = \dfrac{b}{8} \end{aligned}$

Since $f\left(x\right)$ is continuous at $x=\dfrac{\pi}{2}$

$\implies$ $\lim\limits_{x \to \frac{\pi}{2}^-}f\left(x\right)=f\left(\dfrac{\pi}{2}\right)=\lim\limits_{x \to \frac{\pi}{2}^+}f\left(x\right)$

i.e. $\dfrac{1}{2} = a = \dfrac{b}{8}$

$\implies$ $a=\dfrac{1}{2}$ and $b=4$