how is this solved? $\lim_{x→0} \frac{1}{x^2}\left(\left(\tan(x+\frac{\pi}{4})\right)^{\frac{1}{x}}−e^2\right)$ I know how to solve the trigonometric part of the limit, i.e $\left(\tan(x+\frac{\pi}{4})\right)^{1/x}$, which I think is $e^2$, I do not however, know how to carry forward the question with that.
Also, I am sincerely sorry for the upsetting format, i have no clue how to use mathjax. 

We use Taylor series around $0$:
$$
\tan \left( {x + \frac{\pi }{4}} \right) = 1 + 2x + 2x^2  + \frac{8}{3}x^3  +  \cdots .
$$
Hence, by using Taylor series for the logarithm and the exponential function,
\begin{align*}
\left( {\tan \left( {x + \frac{\pi }{4}} \right)} \right)^{\frac{1}{x}} &  = \exp \left( {\frac{1}{x}\log \tan \left( {x + \frac{\pi }{4}} \right)} \right) \\ & = \exp \left( {\frac{1}{x}\log \left( {1 + 2x + 2x^2  + \frac{8}{3}x^3  +  \cdots } \right)} \right)
\\ &
 = \exp \left( {\frac{1}{x}\left( {2x + \frac{4}{3}x^3  +  \cdots } \right)} \right) = e^2 \exp \left( {\frac{4}{3}x^2  +  \cdots } \right) \\ & = e^2 \left( {1 + \frac{4}{3}x^2  +  \cdots } \right).
\end{align*}
This yields the limit $\frac{4}{3}e^2$.
