easy way to calculate the limit $\lim_{x \to 0 } \frac{\cos{x}- (\cos{x})^{\cos{x}}}{1-\cos{x}+\log{\cos{x}}}$ I have been trying to use L'Hôpital over this, but its getting too long, is there a short and elegant solution for this?
The Limit approaches 2 according to wolfram.
 A: $$\lim_{x \to 0 } \frac{\cos(x)- (\cos(x))^{\cos(x)}}{1-\cos(x)+\log{\cos(
x)}}=\lim_{t \to 1 }\frac{t-t^t}{1-t+\log (t)}$$
$$t^t=1+(t-1)+(t-1)^2+\frac{1}{2} (t-1)^3+O\left((t-1)^4\right)$$
$$\log(t)=(t-1)-\frac{1}{2} (t-1)^2+\frac{1}{3} (t-1)^3+O\left((t-1)^4\right)$$
$$\frac{t-t^t}{1-t+\log (t)}=\frac{-(t-1)^2-\frac{1}{2} (t-1)^3+O\left((t-1)^4\right)} {-\frac{1}{2} (t-1)^2+\frac{1}{3} (t-1)^3+O\left((t-1)^4\right) }$$
$$\frac{t-t^t}{1-t+\log (t)}=2+\frac{7 }{3}(t-1)+O\left((t-1)^2\right)$$
A: Start with $$\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{24}+O(x^6) \\
\log(\cos(x))=-\frac{x^2}{2}-\frac{x^4}{12}+O(x^6) \\
\cos(x)\log(\cos(x))=-\frac{x^2}{2}+\frac{x^4}{6}+O(x^6)$$
Then $$\cos(x)-e^{\cos(x)\log(\cos(x))}=1-\frac{x^2}{2}+\frac{x^4}{24}+O(x^6)-\left\{1+\cos(x)\log(\cos(x))+\frac{(\cos(x)\log(\cos(x)))^2}{2}+O\left((\cos(x)\log(\cos(x)))^3\right)\right\}\\
=-\frac{x^2}{2}+\frac{x^4}{24}+O(x^6)-\left\{-\frac{x^2}{2}+\frac{x^4}{6}+O(x^6)+\frac{x^4}{8}+O(x^6)+O(x^6)\right\} \\
=-\frac{x^4}{4}+O(x^6) \,.$$
Similarly,
$$1-\cos(x)+\log(\cos(x))=1-\left\{1-\frac{x^2}{2}+\frac{x^4}{24}+O(x^6)\right\}+\left\{ -\frac{x^2}{2} - \frac{x^4}{12} + O(x^6) \right\}\\
=-\frac{x^4}{8}+O(x^6) \, .$$
A: Let $u=\cos x$. Then:
$\lim_{x \to 0} \frac{\cos x - \cos x^{\cos x}}{1-\cos x+\log(\cos x)}=
\lim_{u \to 1} \frac{u - u^{u}}{1-u+\log(u)}$. Applying De L'Hospital yields:
$\lim_{u \to 1} \frac{1 - u^{u}(1+\log(u))}{-1+1/u}=\lim_{u \to 1} \frac{u - u^{u+1}(1+\log(u))}{-u+1}$. Applying De L'Hospital a second time gives:
$\lim_{u \to 1} \frac{1 - u^{u}-(1+\log u)u^u(u+u\log(u)+1)}{-1}=\frac{1-1-2}{-1}=2$
A: How to solve
$$
\begin{align*}
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\cos(x) - \cos(x)^{\cos(x)}}{1 - \cos(x) + \log(\cos(x))}\\
\lim_{{x} \to {0}} f(x) &= \frac{\cos(0) - \cos(0)^{\cos(0)}}{1 - \cos(0) + \log(\cos(0))}\\
\lim_{{x} \to {0}} f(x) &= \frac{1 - 1^{1}}{1 - 1 + \log(1)}\\
\lim_{{x} \to {0}} f(x) &= \frac{0}{0} \quad\mid\quad \text{we have to use L'hospital rule}\\
\\
&\text{if we use the rule of L'hospital one time, we'll get the same situation aigan and aigan aka let's take the rule of L'hospital three
times}\\
\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\cos(x) - \cos(x)^{\cos(x)}}{1 - \cos(x) + \log(\cos(x))}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\frac{\mathrm{d^{3}}}{\mathrm{d}^{3}x} ~ (\cos(x) - \cos(x)^{\cos(x)})}{\frac{\mathrm{d^{3}}}{\mathrm{d}^{3}x} ~ (1 - \cos(x) + \log(\cos(x)))}\\
\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\frac{\mathrm{d}}{\mathrm{d}x} ~ (\cos(x) - \cos(x)^{\cos(x)})}{\frac{\mathrm{d}}{\mathrm{d}x} ~ (1 - \cos(x) + \log(\cos(x)))}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\cos(x) \cdot (\sin(x) + \log(\cos(x)) \cdot \sin(x))}{\cos(x) - \tan(x)}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\sin(x) - \cos(x)^{\cos(x)} \cdot -(\sin(x) + \log(\cos(x)) \cdot \sin(x))}{\cos(x) - \frac{\sin(x)}{\cos(x)}}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\cos(x) \cdot (-1 + \cos(x)^{\cos(x)} + \cos(x)^{\cos(x)} \cdot \log(\cos(x)))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \cos(x) \cdot \lim_{{x} \to {0}} \frac{-1 + \cos(x)^{\cos(x)} + \cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= \cos(0) \cdot \lim_{{x} \to {0}} \frac{-1 + \cos(x)^{\cos(x)} + \cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1 \cdot \lim_{{x} \to {0}} \frac{-1 + \cos(x)^{\cos(x)} + \cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{-1 + \cos(x)^{\cos(x)} + \cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{-1 + \cos(x)^{\cos(x)}}{\cos(x) - 1} + \lim_{{x} \to {0}} \frac{\cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1} \quad\mid\quad \text{since both the numerator and denominator appraoch to 0 } \frac{-1 + \cos(x)^{\cos(x)}}{\cos(x) - 1} \text{ is our canditate}\\
\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\frac{\mathrm{d}}{\mathrm{d}x} ~ (-1 + \cos(x)^{\cos(x)})}{\frac{\mathrm{d}}{\mathrm{d}x} ~ (\cos(x) - 1)}\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \cos(x)^{\cos(x)} \cdot (\log(\cos(x)) + 1) + \lim_{{x} \to {0}} \frac{\cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= \cos(0)^{\cos(0)} \cdot (\log(\cos(0)) + 1) + \lim_{{x} \to {0}} \frac{\cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1^1 \cdot (\log(1) + 1) + \lim_{{x} \to {0}} \frac{\cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1 \cdot (0 + 1) + \lim_{{x} \to {0}} \frac{\cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1 + \lim_{{x} \to {0}} \frac{\cos(x)^{\cos(x)} \cdot \log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1 + \lim_{{x} \to {0}} \cos(x)^{\cos(x)} \cdot \lim_{{x} \to {0}} \frac{\log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1 + 1^{\cos(x)} \cdot 1 \frac{\log(\cos(x))}{\cos(x) - 1}\\
\lim_{{x} \to {0}} f(x) &= 1 + 1^{\cos(x)} \frac{\log(\cos(x))}{\cos(x) - 1}\\
\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\frac{\mathrm{d}}{\mathrm{d}x} ~ \log(\cos(x)))}{\frac{\mathrm{d}}{\mathrm{d}x} ~ (\cos(x) - 1)} + 1\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{-\tan(x)}{-\sin(x)} + 1\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\tan(x)}{\sin(x)} + 1\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{\frac{\sin(x)}{\cos(x)}}{\sin(x)} + 1\\
\lim_{{x} \to {0}} f(x) &= \lim_{{x} \to {0}} \frac{1}{\cos(x)} + 1\\
\lim_{{x} \to {0}} f(x) &= \frac{1}{\cos(0)} + 1\\
\lim_{{x} \to {0}} f(x) &= \frac{1}{1} + 1\\
\lim_{{x} \to {0}} f(x) &= 1 + 1\\
\lim_{{x} \to {0}} f(x) &= 2\\
\end{align*}
$$
Are there still questions?^^
