<s>[INST] Evaluating limit of the function at $\frac{\pi}{2}$ I'm trying to solve this
$$\lim_{x \to \frac{\pi}{2}} \frac{\cos{x}}{(x-\frac{\pi}{2})^3}$$
I have tried using the L'Hôpital's rule
But I'm stuck at
$$\lim_{x \to \frac{\pi}{2}} \frac{-\sin{x}}{3(x-\frac{\pi}{2})^2}$$
Since the above equation is not in the $\frac{0}{0}$ , $\frac{\infty}{\infty}$
or $\frac{anything}{\infty}$ form
Then I tried expanding the $\cos{x}$ as taylor series at $x=\frac{\pi}{2}$. Which on simplifying I am left with
$$ \lim_{x \to \frac{\pi}{2}} \frac{-1}{(x - \frac{\pi}{2})^2} + \frac{1}{6} - \frac{1}{120} (x - \frac{\pi}{2})^2 + \frac{(x - \frac{\pi}{2})^4}{5040} - ... $$
and I'm stuck again. How do I proceed ahead?
 [/INST] Since we have an indeterminate form of type $(0/0)$, we can apply the l'Hopital's rule:
$$\color{blue}{\lim_{x \to \frac{\pi}{2}} \frac{\cos{\left(x \right)}}{\left(x - \frac{\pi}{2}\right)^{3}}} = \color{magenta}{\lim_{x \to \frac{\pi}{2}} \frac{\frac{d}{dx}\left(\cos{\left(x \right)}\right)}{\frac{d}{dx}\left(\left(x - \frac{\pi}{2}\right)^{3}\right)}}$$
Hence we have:
$$\lim_{x \to \frac{\pi}{2}}\left(- \frac{\sin{\left(x \right)}}{3 \left(x - \frac{\pi}{2}\right)^{2}}\right)=\lim_{x \to \frac{\pi}{2}}\left(- \frac{4 \sin{\left(x \right)}}{3 \left(\pi - 2 x\right)^{2}}\right)$$
After if $x\to \pi/2$ we have $\text{limited function}/0\to +\infty$ being $3 \left(\pi - 2 x\right)^{2}\geq0$, but with minus sign we have:
$$\lim_{x \to \frac{\pi}{2}} \frac{\cos{\left(x \right)}}{\left(x - \frac{\pi}{2}\right)^{3}} = -\infty$$
</s>