a simple problem on limit made me confused I tried to solve this problem : $$\lim_{x \to \frac{\pi}{2}} (1+\cos x)^{\tan x}$$
if $y=(1+\cos x)^{\tan x} \implies \log y=\tan x \log(1+\cos x)$
$$\lim_{x \to \frac{\pi}{2}}\log y=\lim_{x \to \frac{\pi}{2}}[\tan x\log(1+\cos x)]=\lim_{x \to \frac{\pi}{2}}\frac{\log(1+\cos x)}{\cos x} \times \lim_{x \to \frac{\pi}{2}} \sin x$$$$=\lim_{x \to \frac{\pi}{2}} \frac{(-\sin x)}{(1+\cos x)(-\sin x)}=\lim_{x \to \frac{\pi}{2}} \frac{1}{1+\cos x}=1$$
$$\implies\log\lim_{x \to \frac{\pi}{2}}(1+\cos x)^{\tan x}=1$$
$$\implies\lim_{x \to \frac{\pi}{2}}(1+\cos x)^{\tan x}=e$$
I got answer $"e"$ but in my book it is $"e^{-1}"$. So I am confused whether I am right , please solve this, it will be definitely appreciable
 A: It is trivial to see that the limit, should it exist, must be at least $1$, since for any $0 < x < \pi/2$, we have $(1+\cos x)^{\tan x} > 1^{\tan x} = 1$.  Therefore, the book's answer of $1/e < 1$ cannot possibly be correct.
A: As $x \to \pi/2, (1 + \cos x)^{\tan x} = [(1 + \cos x)^ {(1/cosx)}]^{(\sin x)} \to e^{(\sin(\pi/2))} = e^1 = e $ !
A: you can let $y=\lim_{x \to \frac{\pi}{2}} (1+\cos x)^{\tan x}$ then
$$\ln y=\ln \lim_{x \to \frac{\pi}{2}} (1+\cos x)^{\tan x}
\\ \ln y= \lim_{x \to \frac{\pi}{2}} \ln(1+\cos x)^{\tan x}
\\ \ln y= \lim_{x \to \frac{\pi}{2}} \tan x\cdot\ln(1+\cos x)
\\ \ln y= \lim_{x \to \frac{\pi}{2}} \frac{\ln(1+\cos x)}{\cot x}
\\ \ln y= \lim_{x \to \frac{\pi}{2}} \frac{\frac{-\sin x}{(1+\cos x)}}{-\csc^2 x}
\\ \ln y= \lim_{x \to \frac{\pi}{2}} \frac{\sin^3 x}{(1+\cos x)}=1
\\ \implies y=e
$$
A: Built around $x=\frac{\pi }{2}$ , the Taylor series of $(1+\cos x)^{\tan x}$ is $$e+\frac{1}{2} e \left(x-\frac{\pi }{2}\right)-\frac{1}{24} e \left(x-\frac{\pi
   }{2}\right)^2-\frac{7}{48} e \left(x-\frac{\pi
   }{2}\right)^3+O\left(\left(x-\frac{\pi }{2}\right)^4\right)$$
This come from the fact that the Taylor series (built at $x=\frac{\pi }{2}$ are,  respectively for $(1+\cos x)$ and $\tan x$,
$$A=1-\left(x-\frac{\pi }{2}\right)+\frac{1}{6} \left(x-\frac{\pi
   }{2}\right)^3-\frac{1}{120} \left(x-\frac{\pi
   }{2}\right)^5+O\left(\left(x-\frac{\pi }{2}\right)^7\right)$$
$$B=-\frac{1}{x-\frac{\pi }{2}}+\frac{1}{3} \left(x-\frac{\pi }{2}\right)+\frac{1}{45}
   \left(x-\frac{\pi }{2}\right)^3+\frac{2}{945} \left(x-\frac{\pi
   }{2}\right)^5+O\left(\left(x-\frac{\pi }{2}\right)^7\right)$$ Now, compose the series for $A^B$ (using logarithms make things slightly easier).
