Answer
$y'=(cosx)^{x}[ln(cosx)-xtanx]$
Work Step by Step
Given: $y =(cosx)^{x}$
Taking logarithmic on both sides of the function
$y =(cosx)^{x}$
$lny=xln(cosx)$
Take implicit differentiation with respect to $x$.
Apply product rule of differentiation.
$\frac{d}{dx}(lny)=\frac{d}{dx}[xln(cosx)]$
$\frac{1}{y}\frac{d}{dx}(y)=x\frac{d}{dx}[ln(cosx)]+ln(cosx)\frac{d}{dx}(x)$
$\frac{d}{dx}(y)=y[x\times\frac{1}{cosx}\frac{d}{dx}(cosx)+ln(cosx)]$
$\frac{d}{dx}(y)=y[x\times\frac{1}{cosx}(-sinx)+ln(cosx)]$
Hence, $y'=(cosx)^{x}[ln(cosx)-xtanx]$