Find the limit $\lim_{x\to2}(x^3-2x-4)\tan\frac{\pi x}{4}$ Find the limit $$\lim_{x\to2}(x^3-2x-4)\tan\dfrac{\pi x}{4}$$
I can't even determine what type of indeterminate form we have. It's $0\times\text{undefined}$. We can see that $2$ is a root of the polynomial $x^3-2x-4$ and it factors as $(x-2)(x^2+2x+2)$. Additionally, when $x\to2$, $\tan\dfrac{\pi x}{4}\to\tan\dfrac{\pi}{2},$ which is not defined. How do we approach the problem and what's the intuition? I suppose somehow the limit $\lim_{f(x)\to0}\dfrac{\sin f(x)}{f(x)}=1$ may come in handy.

We have:
$$ (x^3-2x-4) \tan(x\pi/4) = \frac{\sin(x\pi/4)(x-2)(x^2+2x+2)}{\cos(x\pi/4)}$$
Let $u = x-2$, then:
$$ = \frac{u\sin((u+2)\pi/4)((u+2)^2+2(u+2)+2)}{\cos((u+2)\pi/4)} $$
Where $\sin((u+2)\pi/4) = \cos(u\pi/4)$ and $\cos((u+2)\pi/4) = -\sin(u\pi/4)$ using the addition formulas for sine and cosine. So:
$$ \frac{u\cos(u\pi/4)((u+2)^2+2(u+2)+2)}{-\sin(u\pi/4)} = \frac{u\pi/4 \cos(u\pi/4)((u+2)^2+2(u+2)+2)}{-\pi/4\sin(u\pi/4)} =$$
$$ = -4/\pi \cdot \frac{u\pi/4}{\sin(u\pi/4)} \cdot \cos(u\pi/4) \cdot ((u+2)^2+2(u+2)+2)$$
We let $u \rightarrow 0$. First factor tends to $1$, second factor to $1$, last factor tends to $10$, the limit is therefore $-\frac{40}{\pi}$
