Why 1/x is elementary function?
Recall that $\cot x=\tan(\pi/2-x)$, so $$ \frac{1}{x}=\cot\arctan x $$ More precisely, for $x>0$ you have $$ \arctan x+\arctan\frac{1}{x}=\frac{\pi}{2} $$ so $$ \frac{1}{x}=\tan\left(\frac{\pi}{2}-\arctan x\right)=\cot\arctan x $$ and, for $x<0$, $$ \arctan x+\arctan\frac{1}{x}=-\frac{\pi}{2} $$ so $$ \frac{1}{x}=\tan\left(-\frac{\pi}{2}-\arctan x\right)= -\cot(-\arctan x)=\cot\arctan x $$ The tangent and the cotangent are elementary, because so are the sine and the cosine.
The exponential function is elementary, because $e^x=2^{x/\!\log 2}$. Therefore also the natural logarithm is elementary. Thus $$ \frac{1}{\cos^2x}=\exp(-\log(\cos^2x)) $$ is elementary and $$ \tan x=\sin x\cos x\frac{1}{\cos^2x} $$ Similarly for the cotangent.