Differentiate the following function with respect to $x$: $(\cos x)^x \left[ \text{where } x \in \left(0, \frac{\pi}{2}\right) \right]$.
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → $(\cos x)^x [ \ln(\cos x) - x \tan x ]$ ##
Let $y = (\cos x)^x$.
Then, $y = e^{x \log_e \cos x}$.
On differentiating both sides with respect to $x$, we get:
$\frac{dy}{dx} = e^{x \log_e \cos x} \frac{d}{dx}(x \log_e \cos x)$
$⇒\frac{dy}{dx} = (\cos x)^x \left\{ \log_e \cos x \cdot \frac{d}{dx}(x) + x \cdot \frac{d}{dx}(\log_e \cos x) \right\}$
$⇒\frac{dy}{dx} = (\cos x)^x \left\{ \log_e \cos x + x \cdot \frac{1}{\cos x} \cdot (-\sin x) \right\}$
$⇒\frac{dy}{dx} = (\cos x)^x (\log_e \cos x - x \tan x)$