1. **State the problem:** Find the derivative $\frac{dy}{dx}$ if $y = (\cos x)^{\sin x}$ using logarithmic differentiation.
2. **Take the natural logarithm of both sides:**
$$\ln y = \ln \left((\cos x)^{\sin x}\right)$$
Using the logarithm power rule:
$$\ln y = \sin x \cdot \ln (\cos x)$$
3. **Differentiate both sides with respect to $x$:**
Using implicit differentiation on the left and product rule on the right:
$$\frac{1}{y} \frac{dy}{dx} = \frac{d}{dx} (\sin x \cdot \ln (\cos x))$$
4. **Apply the product rule:**
$$\frac{d}{dx} (\sin x \cdot \ln (\cos x)) = \cos x \cdot \ln (\cos x) + \sin x \cdot \frac{d}{dx} (\ln (\cos x))$$
5. **Differentiate $\ln (\cos x)$:**
$$\frac{d}{dx} (\ln (\cos x)) = \frac{1}{\cos x} \cdot (-\sin x) = -\tan x$$
6. **Substitute back:**
$$\frac{1}{y} \frac{dy}{dx} = \cos x \ln (\cos x) - \sin x \tan x$$
7. **Multiply both sides by $y$ to solve for $\frac{dy}{dx}$:**
$$\frac{dy}{dx} = y \left(\cos x \ln (\cos x) - \sin x \tan x\right)$$
8. **Recall that $y = (\cos x)^{\sin x}$:**
$$\frac{dy}{dx} = (\cos x)^{\sin x} \left(\cos x \ln (\cos x) - \sin x \tan x\right)$$
**Final answer:**
$$\boxed{\frac{dy}{dx} = (\cos x)^{\sin x} \left(\cos x \ln (\cos x) - \sin x \tan x\right)}$$
Logarithmic Derivative E4997E
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.