$\lim_{x \to + \frac{1}{2}} [ \tan(\pi x^2)+(2x-1)4^x+6x-4 ] \cot(x-\frac{1}{2})$ I've tried to solve this limit:
$\lim_{x \to + \frac{1}{2}}  \left [ \tan(\pi x^2)+(2x-1)4^x+6x-4 \right ] \cot(x-\frac{1}{2})$
the first parentesis should tend to $\frac{\sqrt{2}}{2}-1$ but I don't know how to procede.
The final result should be $2 \pi + 10$

To make life easier, let $x=y+\frac 12$ to make the expression
$$\left(\left(4^{y+1}+6\right) y+\tan \left(\frac{1}{4} \pi  (2
   y+1)^2\right)-1\right) \cot (y)$$ and now, compose series one piece at the time
$$4^{y+1}=4 e^{y \log(4)}=4+4 y \log (4)+2 y^2 \log ^2(4)++O\left(y^3\right)$$
Now,   after expansion of the argument, and using $\tan(a+b)=\cdots$
$$\tan \left(\frac{1}{4} \pi  (2y+1)^2\right)=1+2 \pi  y+2 \left(\pi +\pi ^2\right) y^2+O\left(y^3\right)$$
$$\left(4^{y+1}+6\right) y+\tan \left(\frac{1}{4} \pi  (2
   y+1)^2\right)-1=(10+2 \pi ) y+y^2 \left(2 \left(\pi +\pi ^2\right)+4 \log(4)\right)+O\left(y^3\right)$$
$$\cot(y)=\frac{1}{y}-\frac{y}{3}+O\left(y^3\right)$$ Make the product and the expression is
$$(10+2 \pi )+y \left(2 \pi\left(\pi +1\right)+8 \log (2)\right)+O\left(y^2\right)$$ which shows the limit and also how it is approached.
Edit for clarification about $\tan \left(\frac{1}{4} \pi  (2y+1)^2\right)$
$$\frac{1}{4} \pi  (2y+1)^2=\frac{\pi }{4}+\pi  y(y+1)=\frac{\pi }{4}+a$$
$$\tan \left(\frac{\pi }{4}+a\right)=\frac{1+\tan(a)}{1-\tan(a)}=\frac {1+a+\frac{a^3}{3}+\frac{2 a^5}{15}+O\left(a^7\right) } {1-a-\frac{a^3}{3}-\frac{2 a^5}{15}+O\left(a^7\right) }$$
Long division
$$\tan \left(\frac{\pi }{4}+a\right)=1+2 a+2 a^2+\frac{8 a^3}{3}+\frac{10 a^4}{3}+\frac{64 a^5}{15}+\frac{244
   a^6}{45}+O\left(a^7\right)$$ Now, replace $a=\pi  y(y+1)$
$$\tan \left(\frac{1}{4} \pi  (2y+1)^2\right)=1+2 \pi  y+2 \left(\pi +\pi ^2\right) y^2+O\left(y^3\right)$$
