y= (cos x)^x by using the logarithmic differentiation to find derivatived of function
y = (cos(x))^x take logs of both sides.
ln(y) = x.ln(cos(x)) differentiate using product rule.
(1/y).(dy/dx) = ln(cos(x)) + x.(-sin(x))/cos(x)
dy/dx = y[ln(cos(x)) - x.tan(x)]
dy/dx = (cos(x))^x.[ln(cos(x)) - x.tan(x)]