# Limit evaluation $\lim_{x\to \pi/2}\cos(x)^{2x-\pi}$

I need to solve the following limit:

$$\lim_{x\to \pi/2}\cos(x)^{2x-\pi}$$

I attempted to use natural logarithm:

$$\lim_{x\to \pi/2} (2x-\pi)(\ln(\cos x))=$$ $$\lim_{x\to\pi/2} (2x\ln(\cos x)-\pi\ln(\cos x))=$$ $$2\times\lim_{x\to \pi/2} \frac{\ln(\cos x)}{x^{-1}}-\pi\times\lim_{x\to \pi/2}\ln(\cos x))=$$

Applying LH twice to the first term gives

$$2\times\lim_{x\to \pi/2} \frac{2x\cos x}{-\sin x}-\pi\times\lim_{x\to \pi/2}\ln(\cos x))=0-\pi\infty=-\infty$$

And $$e^{-\infty}=0$$

However, for some reason, the correct result is $$1$$. Where's the flaw in my approach and what's the correct solution?

• I think $o$ is the right result. – Dr. Sonnhard Graubner Nov 11 '19 at 19:11
• 1 is the correct result (in this case 0^0 happens to be 1) – Alex Nov 11 '19 at 19:15
• @Dr.SonnhardGraubner try to use wolfram alpha or whatever, 0 is not correct – Kamran Poladov Nov 11 '19 at 19:19

## 5 Answers

Note that we need to consider $$x\to \frac \pi 2^-$$ in order to have $$\cos x\to 0^+$$.

That’s a nice approach, from here we can use that

$$(2x-\pi)(\ln(\cos x))= \frac{2x-\pi}{\cos x}(\cos x)\ln(\cos x)\to 0$$

indeed by standard limits

$$\cos x\ln(\cos x)\to 0$$

$$\frac{2x-\pi}{\cos x}= -2\frac{\frac{\pi}2-x}{\sin\left(\frac{\pi}2-x\right)}\to -2$$

• how did you figure $(cosx)(lncosx)$? – Kamran Poladov Nov 11 '19 at 19:24
• We have that as $x\to 0$ by standard limits $x\log x\to 0$. – user Nov 11 '19 at 19:31
• We can prove it for example by l’Hospital using that $$x\log x=\frac{\log x}{\frac1x}$$ – user Nov 11 '19 at 19:35
• Yes, I got it, tnx – Kamran Poladov Nov 11 '19 at 19:36

Here is a slick way to interpret this:

$$\begin{eqnarray*} \lim_{x\to\frac{\pi}{2}} \cos(x)^{2x - \pi} & = & \lim_{x\to \frac{\pi}{2}}\operatorname{Re}\left[\left (e^{ix}\right )^{2x-\pi} \right ] \\ & =&\operatorname{Re}\left [\lim_{x\to \frac{\pi}{2}} e^{2ix^2 - i\pi x}\right ] \\ & = &\operatorname{Re}\left [ e^{2i\frac{\pi^2}{4} - i\frac{\pi^2}{2}} \right ] \\ & = &\operatorname{Re}\left [e^0\right ] \\ & = & 1. \end{eqnarray*}$$

• Fancy. Even though I'm just a first-year undergrad student and, technically, didn't cover this, I liked that – Kamran Poladov Nov 11 '19 at 19:17

That is not an indefinite form, L'Hospital doesn't apply.

By substitution $$y=\pi/2-x$$, we are to compute $$\lim_{y\rightarrow 0^{+}}\left(\cos(\pi/2-y)\right)^{-2y}=\lim_{y\rightarrow 0^{+}}(\sin y)^{-2y}$$.

While $$\log(\sin y)^{y}=y\log((\sin y/y)\cdot y)=y\log(\sin y/y)+y\log y\rightarrow 0\cdot\log 1+0=0$$, so $$(\sin y)^{y}\rightarrow 1$$.

Note that $$y\log y\rightarrow 0$$ can be done by L'Hopital or $$|y\log y|=y\log(1/y)\leq Cy\cdot(1/y)^{1/2}$$ for small $$y>0$$.

• $0^0$ is not indefinite?? – Bernard Nov 11 '19 at 19:32
• Actually how OP did L'Hopital to $\log(\cos x)/x$ when $x\rightarrow\pi/2$? The denominator is not zero. – user284331 Nov 11 '19 at 19:42

I think that answer is 1. You can use the the second remarkable limit lim(1+x)^(1/x) x->0 then we can convert function so lim(1+(cosx-1))^(1/(cos(x)-1))(cosx-1)(2x-pi)= e^(lim (cos(x)-1)*(2x-pi)) x->pi/2 => lim (-sin^2(x))(2x-pi)/(cosx+1) x->pi/2 => e^0=1

First, observe this limit can make sense only if $$x\nearrow \frac\pi2$$, because $$\cos x$$ has to be positive. So, set $$u=\frac\pi2-x\enspace (u\searrow 0)$$.

Finding the limit amounts to finding the limit of the log: $$(2x-\pi)\ln(\cos x)=-2u\ln\Bigl(\cos\bigl(\tfrac\pi 2-u\bigr)\Bigr)=-2u\ln(\sin u).$$ Now, $$\sin u\sim_0 u$$, so $$\;-2u\ln(\sin u)\sim_{u\to0^+}-2u\ln u\to 0$$, by a standard high-school limit. Therefore, by continuity og the exponential function, the required limit is equal to $$1$$.