You are probably going wrong
we have y = - log cosx = log ( cosx)^-1= log sec x
dy/dx = (1/sec x )( sec x tan x ) = tan x
remember differential of log ( f(x)) = (1/f(x) ) f'(x)
What you need is the product rule. So d/dx (f(g(x))) is f'(g) x g'(x). log'(f) is 1/f, d/dx(cos) is -sin,
so you have -sin/-cos , which is tan.
For more info, please visit:-
Maths Discovery