Show that $2\cos(x)$ is equal to $2\cos(2x)\sec(x)+\sec(x)\tan(x)\sin(2x)$ This is from the derivative of $\dfrac{\sin(2x)}{\cos x}$
I tried to solve it and arrived with factoring the $\sec(x)$ but I still can't get it to $2\cos(x)$. Could you help me out, please? Thanks

Using Double angle formulae, $$\sec x\left(2\cos2x+\tan x\sin2x\right)$$
$$=\sec x\left[2(2\cos^2x-1)+\frac{\sin x}{\cos x}\cdot2\sin x\cos x\right]$$
$$=\sec x\left[4\cos^2x-2+2\sin^2x\right]$$
$$=\sec x\left[4\cos^2x-2(1-\sin^2x)\right]$$
$$=\sec x\left[2\cos^2x\right]=?$$
