Find the value of 'a' for which the function f defined by
$f(x)=\left\{\begin{array}{ll}a \sin \frac{\pi}{2}(x+1), & x \leq 0 \\ \frac{\tan x-\sin x}{x^{3}}, & x>0\end{array}\right.$ is continuous at $x=0$
Given: $f(x)=\left\{\begin{array}{l}a \sin \frac{\pi}{2}(x+1), x \leq 0 \\ \frac{\tan x-\sin x}{x^{3}}, x>0\end{array}\right.$
We have
$(\mathrm{LHL}$ at $x=0)=\lim _{x \rightarrow 0^{-}} f(x)=\lim _{h \rightarrow 0} f(0-h)=\lim _{h \rightarrow 0} f(-h)=\lim _{h \rightarrow 0} a \sin \frac{\pi}{2}(-h+1)=a \sin \frac{\pi}{2}=a$
(RHL at $x=0$ ) $=\lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} f(0+h)=\lim _{h \rightarrow 0} f(h)=\lim _{h \rightarrow 0} \frac{\tan h-\sin h}{h^{3}}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} \frac{\frac{\frac{\sin h}{\cos h}-\sin h}{h^{3}}}{h}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} \frac{\frac{\sin h}{\cos h}(1-\cos h)}{h^{3}}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} \frac{(1-\cos h) \tan h}{h^{3}}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\lim _{h \rightarrow 0} \frac{2 \sin ^{2} \frac{h}{2} \tan h}{4 \frac{h^{2}}{4} \times h}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\frac{2}{4} \lim _{h \rightarrow 0} \frac{\sin ^{2} \frac{h}{2} \tan h}{\frac{h^{2}}{4} \times h}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\frac{1}{2} \lim _{h \rightarrow 0}\left(\frac{\sin \frac{h}{2}}{\frac{h}{2}}\right)^{2} \lim _{h \rightarrow 0} \frac{\tan h}{h}$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\frac{1}{2} \times 1 \times 1$
$\Rightarrow \lim _{x \rightarrow 0^{+}} f(x)=\frac{1}{2}$
If $f(x)$ is continuous at $x=0$, then
$\lim _{x \rightarrow 0^{-}} f(x)=\lim _{x \rightarrow 0^{+}} f(x)$
$\Rightarrow a=\frac{1}{2}$