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.
Let $x=2+h.$ As $h\to0,$ using the asymptotic notation $\sim$ and the fact that $\lim_{t\to0}\frac{\tan t-\tan0}{t-0}=\tan'(0)=1:$ $$x^3-2x-4=10h+6h^2+h^3\sim 10h$$and $$\tan\frac{\pi x}4=-\frac1{\tan\frac{\pi h}4}\sim-\frac4{\pi h}.$$ The limit of the product is therefore $-\frac{40}{\pi}.$