<s>[INST] Why is this way of doing $\lim_{x \to \frac{\pi}{2}} \frac{\tan(2*x)}{x - \frac{\pi}{2}}$ I did it this way :

$$\lim_{x \to \frac{\pi}{2}} \frac{\tan(2*x)}{x - \frac{\pi}{2}}$$
  now as $x \to \frac{\pi}{2}$, $\tan(2*x) \to \tan(\pi)$ and $x - \frac{\pi}{2} \to 0$
  As $\tan(\pi) = 0$ 
$$\therefore \tan(2*x) \to 0$$
$\therefore$ we can write 
  $$\lim_{x \to \frac{\pi}{2}} \frac{\tan(2*x)}{x - \frac{\pi}{2}}$$
  As
  $$\lim_{x \to 0} \frac{\tan(x)}{x} = 1$$

Which is incorrect answer.
My second attempt :

$$\lim_{x \to \frac{\pi}{2}} \frac{\tan(2*x)}{x - \frac{\pi}{2}}$$
  $$\lim_{x \to \frac{\pi}{2}} \frac{\sin(2*x)}{\cos(2*x)(x - \frac{\pi}{2})}$$
  $$\lim_{x \to \frac{\pi}{2}} \frac{\sin(2*x)}{(x - \frac{\pi}{2})} * \lim_{x \to \frac{\pi}{2}} (\frac{1}{\cos(2*x)})$$
  $$-\lim_{x \to \frac{\pi}{2}} \frac{\sin(2*x)}{(x - \frac{\pi}{2})}$$
  $$\lim_{x \to \frac{\pi}{2}} \frac{\sin(2*x)}{\color{red}{(\frac{\pi}{2} - x)}}$$
  $$\lim_{x \to \frac{\pi}{2}} \frac{2 * \sin(2*x)}{\pi - 2 *x}$$
  $$2 * \lim_{x \to \frac{\pi}{2}} \frac{\sin(\pi - 2*x)}{\pi - 2 *x} $$
  Because, $$\sin(x) = \sin(\pi - x)$$ 
  $$\therefore 2 * \lim_{x \to \frac{\pi}{2}} \frac{\sin(\pi - 2*x)}{\pi - 2 *x} = 2 $$

Which is correct and makes sense.
Now i did this question one more way 

$$\lim_{x \to \frac{\pi}{2}} \frac{\tan(2*x)}{x - \frac{\pi}{2}}$$
  $$\lim_{x \to \frac{\pi}{2}} \frac{2 * \tan(2*x)}{2x - \pi}$$
  $$2 * \lim_{x \to \frac{\pi}{2}} -\frac{\tan(\pi - 2*x)}{2*x - \pi}$$
  $$2 * \lim_{x \to \frac{\pi}{2}} \frac{\tan(\pi - 2*x)}{\pi-2*x}$$
  Now we observe that 
  now as $x \to \frac{\pi}{2}$, $\tan(\pi -2*x) \to 0$ and $\pi - 2*x \to 0$
  Thus we can write 
$$2 * \lim_{x \to \frac{\pi}{2}} \frac{\tan(\pi - 2*x)}{\pi-2*x} = 2 * \lim_{x \to 0} \frac{\tan(x)}{x} = 2$$ 

Which is also correct, Can anyone please tell me what is incorrect with 1 approach ? 
 [/INST] $$\dfrac{\tan2x}{x-\dfrac\pi2}=\dfrac{\tan2\left(x-\dfrac\pi2\right)}{x-\dfrac\pi2}=2\cdot\dfrac{\tan(2x-\pi)}{2x-\pi}$$
Actually we have $$\lim_{(h)\to0}\dfrac{\tan(h)}{(h)}=\lim_{h\to}\dfrac{\sin h}h\cdot\dfrac1{\lim_{h\to0}\cos h}=1$$
Observe that all the $h$ in parenthesis must be same.
</s>