So as the title states I have to show that the above function $f(x)=x\sec(x)$ is one-to-one on the interval $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$.
However, i'm not entirely sure how without testing every number between the given interval?
Any suggestion would be appreciated.
Computing the derivative of your function, we find $$ f'(x)=\frac{\cos x+x\sin x}{\cos^2 x} $$ which vanishes whenever $$ -x=\tan x $$ which by inspection occurs when $x=0$, and nowhere else, since $$ (\tan x+x)'=\sec^2x+1>0 $$ So we test on either side of $0$, the only place we could have the problem of $f'$ changing signs, for positive $x$, that $f'>0$ is clear. We check the convenient value $x=-\pi/4$ on the left to find $$ \cos(\pi/4)-\pi/4\sin(\pi/4)=\sqrt{2}/2(1-\frac{\pi}{4})>0 $$ so yes, it is indeed invertible.