Differentiation using l´Hopital I need to use L´Hopital's rule with this functions:
$$\lim_{x\rightarrow\frac{\pi}{2}} (1-\sin(x))^{\cos(x)}$$
$$\lim_{x\rightarrow\frac{\pi}{4}} (\tan(x))^{\tan(2x)}$$
I take the exponent down using the properties of logarithms and then make the denominator like: $\lim_{x\rightarrow\frac{\pi}{2}} \frac{\cos(x)}{\frac{1}{\ln(1-\sin(x))}}$ but I still get stuck.

Without using L'Hospital:
$$\begin{align}1) \ \lim_{x\rightarrow\frac{\pi}{2}} (1-\sin(x))^{\cos(x)}&=\lim_{x\rightarrow\frac{\pi}{2}} (1-\sin(x))^{\cos(x)}\cdot 1=\\
&=\lim_{x\rightarrow\frac{\pi}{2}} (1-\sin(x))^{\cos(x)}\cdot \lim_{x\rightarrow\frac{\pi}{2}} (1+\sin(x))^{\cos(x)}=\\
&=\lim_{x\rightarrow\frac{\pi}{2}} (1-\sin^2(x))^{\cos(x)}=\\
&=\lim_{x\rightarrow\frac{\pi}{2}} (\cos^2(x))^{\cos(x)}\stackrel{(1)}=\\
&=1.\\
2) \ \lim_{x\rightarrow\frac{\pi}{4}} (\tan(x))^{\tan(2x)}&=\lim_{x\rightarrow\frac{\pi}{4}} (1+\tan(x)-1)^{\frac{2\tan(x)}{(1-\tan x)(1+\tan x)}}=\\
&=\lim_{x\rightarrow\frac{\pi}{4}} (1+\tan(x)-1)^{-\frac{1}{\tan x-1}}\stackrel{(2)}=\\
&=e^{-1}.\end{align}$$
Note: 
$$\begin{align}\lim_\limits{x\to 0} x^x&=1 \quad (1)\\
\lim_\limits{x\to 0} (1+x)^{1/x}&=e \quad (2) \end{align}$$
