Question:
Differentiate the following w.r.t. x:
$\log \left(\cos e^{x}\right)$
Solution:
Let $y=\log \left(\cos e^{x}\right)$
By using the chain rule, we obtain
$\frac{d y}{d x}=\frac{d}{d x}\left[\log \left(\cos e^{x}\right)\right]$
$=\frac{1}{\cos e^{x}} \cdot \frac{d}{d x}\left(\cos e^{x}\right)$
$=\frac{1}{\cos e^{x}} \cdot\left(-\sin e^{x}\right) \cdot \frac{d}{d x}\left(e^{x}\right)$
$=\frac{-\sin e^{x}}{\cos e^{x}} \cdot e^{x}$
$=-e^{x} \tan e^{x}, e^{x} \neq(2 n+1) \frac{\pi}{2}, n \in \mathbf{N}$