I am looking at a worked out answer to a problem I got wrong. Part of the work shows this simplification:
$=2\cdot\csc(x)\cdot\sec(x)+2x\cdot−\csc(x)\cot(x)\cdot\sec(x)+2x\cdot\csc(x)\cdot\sec(x)\tan(x)$ $=2\csc(x)\sec(x)−2x\csc^2(x)+2x\sec^2(x)$
There's no explanation of how they got from the first expression to the second, and I can't figure it out.
Hint
Substitute $\tan(x)$ and $\cot(x)$ :
$$\tan(x)=\frac {\sec(x)}{\csc(x)} \text{, and }\cot(x)=\frac {\csc(x)}{\sec(x)}$$
Edit for Nope
$$\tan(x)=\frac {\sin(x)}{\cos(x)}=\frac 1 {\cos(x)}\sin(x)=\frac {sec(x)}{\csc(x)}$$
And then conclude for $\cot(x)$: $$\cot(x)=\frac 1 {\tan(x)}=\frac {csc(x)}{\sec(x)}$$