We have to find the second derivative of y = -cos x*ln(sec x + tan x)

We use the product rule and the chain rule.

y' = -[cos x]'*ln(sec x + tan x) + (-cos x)*[ln(sec x + tan x)]'

=> sin x*ln(sec x + tan x) - cos x *(1/ (sec x + tan x))*(sec x* tan x + (sec x)^2)

=> sin x*ln(sec x + tan x) - cos x *sec x

y'' = [sin x*ln(sec x + tan x) - cos x *sec x]'

=> [sin x]'*ln(sec x + tan x) + sin x *[ln (sec x + tan x)]'- cos x *[sec x]' - [cos x]'* sec x

=> cos x*ln(sec x + tan x) + sin x*(1/ (sec x + tan x))*(sec x* tan x + (sec x)^2) - cos x *sec x* tan x + sin x *sec x

=> cos x*ln(sec x + tan x) + sin x*sec x - cos x *sec x* tan x + sin x *sec x

=> cos x*ln(sec x + tan x) + 2*sin x*sec x - cos x *sec x* tan x

**The required second derivative is cos x*ln(sec x + tan x) + 2*sin x*sec x - cos x *sec x* tan x**