According to wolfram the derivative of this is zero. This derivative though is part of a larger problem and I don't think it is possible for it to be zero. According to my own calculation the answer is $\sec(x) \tan(x) + 2\sin(x)$
Is this correct?
3 Answers
$\begingroup$You wrote it incorrectly and your answer is correct. What wolfram calculated was $(\sec (x))(-2\cos (x))$ which is actually $$\frac{1}{\cos (x)}\cdot\frac{-2\cos (x)}{1} =-2$$ And the derivative of $-2$ is $0$. When writing that equation in wolfram you need to pay careful attention to the brackets you use. As you would have now realized, $$\sec(x)-2\cos(x) \ne (\sec (x))(-2\cos (x))$$ There's no need for the extra brackets on the outside...This indicates multiplying the two terms.
$\endgroup$ $\begingroup$This derivative cannot possibly be zero. What you have is correct.
$\endgroup$ $\begingroup$$y=\sec(x)-2\cos(x)\\\implies \dfrac{dy}{dx}=\tan(x)\sec(x)+2\sin(x)\neq 0$.
Indeed you are right.
$\endgroup$