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. 
 A: 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$.
A: $$\frac{\left(\tan\left(x+\frac{\pi}{4}\right)\right)^{\frac{1}{x}}-e^2}{x^2}=\frac{\left(\frac{1+\tan{x}}{1-\tan{x}}\right)^{\frac{1}{x}}-e^2}{x^2}=$$
$$=\frac{\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)^{\frac{1}{x}}-e^2}{x^2}=\frac{\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)^{\frac{1-\tan{x}}{2\tan{x}}\cdot\frac{2\tan{x}}{x(1-\tan{x})}}-e^2}{x^2}=$$
$$=\frac{e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{2\tan{x}}{x(1-\tan{x})}}-e^2}{x^2}=$$
$$=\frac{\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}}-e\right)\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}}+e\right)}{x^2}\rightarrow$$
$$\rightarrow\frac{2e^2\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}-1\right)}{x^2}=$$
$$=\frac{2e^2\left(e^{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}-1\right)}{ \frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}\cdot\frac{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}{x^2}\rightarrow $$
$$\rightarrow2e^2\cdot \frac{\frac{\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)}{\frac{2\tan{x}}{1-\tan{x}}}\cdot\frac{\tan{x}}{x(1-\tan{x})}-1}{x^2}=\frac{e^2\left(\ln\left(1+\frac{2\tan{x}}{1-\tan{x}}\right)-2x\right)}{x^3}=$$
$$=\frac{e^2(\ln(1+\tan{x})-\ln(1-\tan{x})-2x)}{x^3}\rightarrow$$
$$\rightarrow\frac{e^2\left(\frac{\frac{1}{\cos^2x}}{1+\tan{x}}+\frac{\frac{1}{\cos^2x}}{1-\tan{x}}-2\right)}{3x^2}=$$
$$=\frac{e^2\left(\frac{2}{\cos^2x(1-\tan^2{x})}-2\right)}{3x^2}=\frac{2e^2(1-\cos2x)}{3x^2\cos2x}=\frac{4e^2\sin^2x}{3x^2\cos2x}\rightarrow\frac{4e^2}{3}.$$
A: The expression under limit is of the form $$\frac{A-B} {x^2}$$ where both $A, B$ tend to $e^2$ and we can rewrite it as $$B\cdot\frac{\exp(\log A-\log B) - 1}{\log A-\log B} \cdot\frac{\log A - \log B} {x^2}$$ The first fraction tend to $1$ and hence the desired limit equals the limit of $$e^2\cdot\dfrac{\log\dfrac {1+\tan x} {1-\tan x} - 2x}{x^3} $$ This can be further rewritten as $$e^2\left(\dfrac{\log\dfrac{1+\tan x} {1-\tan x} - 2\tan x} {\tan^3x}\cdot\frac{\tan^3x}{x^3}+2\cdot\frac{\tan x - x} {x^3}\right)$$ Using $\tan x =t$ we can see that $$\log \frac{1+\tan x} {1-\tan x} =2t+\frac{2t^3}{3}+o(t^3)$$ and $$\tan x =x+\frac{x^3}{3}+o(x^3)$$ so that the desired limit is $e^2(2/3+2/3)=4e^2/3$. In the final step we could also have used L'Hospital's Rule and got the same answer with equal ease. 
