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

-
Can you post what you have done? –  Davis Yoshida Mar 8 at 4:36
@RecklessReckoner wrong? I think this guy is very much right. wolframalpha.com/input/… –  Sabyasachi Mar 8 at 4:49
yes, you are very much right. either the book is wrong, has a typo in either the question or answer, or you have misread the question. The limit you posted is equal to $e$ –  Sabyasachi Mar 8 at 4:53
@RecklessReckoner i could not understand what you actually mentioned here –  mahavir Mar 8 at 12:52

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$$

-

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.

-
I like this solution best. –  Sabyasachi Mar 8 at 4:55

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$ !

-

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).

-
how it became , please explain –  mahavir Mar 8 at 5:22
@mahavir. You have done a very good job by yourself and you have received very good answers. I just added this direct calculation since I love Taylor series, in particular at points where part of the function is not defined. Do not give more interest to my answer than it is worth. At least, it shows how behaves the expression when $x$ approaches $\pi/2$. Cheers. –  Claude Leibovici Mar 8 at 5:29
anyway thanks a lot for this post but i am eager to know how did you do this using Taylor's series, if you will it will be appreciable –  mahavir Mar 8 at 12:48
@mahavir. I add details to my answer. –  Claude Leibovici Mar 8 at 15:35