I'm trying to find the limit of the following function at $x=\frac{\pi}{4}$ and as $n$ approaches infinity: $$\frac{\ln(\tan x)-\tan^{n}x\lfloor\sin(\tan\frac{x}{2})\rfloor}{1+\tan^{n}x}.$$
The left-hand limit is $\ln(\tan x)$ as expected, but apparently the right-hand limit is $-\lfloor\sin(\tan\frac{x}{2})\rfloor$.
Now, since the $\tan^{n}x$ in the numerator, which approaches infinity, is multiplied with $0$ (since $\sin(\tan\frac{x}{2}$) lies between $0$ and $1$, and the floor function turns it to $0$), shouldn't it end up as $0$? And while the log value is a small positive value, the denominator approaches infinity, so shouldn't the final right hand limit come out as zero?
What's the error I'm making here?
On the interval $\left(\frac{\pi}{8},\frac{3\pi}{8}\right)$, we find that $\lfloor \sin(\tan(x/2))\rfloor=0$, so on that interval we have that
$$ \frac{\ln(\tan x)-\tan^{n}x\lfloor\sin(\tan\frac{x}{2})\rfloor}{1+\tan^{n}x}=\frac{\ln(\tan x)}{1+\tan^nx} $$
But this function is continuous on that interval, for any integer $n$ and equals $0$ when $x=\frac{\pi}{4}$.
So
$$ \lim_{n\to\infty}\lim_{x\to\pi/4}\frac{\ln(\tan x)-\tan^{n}x\lfloor\sin(\tan\frac{x}{2})\rfloor}{1+\tan^{n}x}=0 $$