I need to solve:
$$\int \sqrt{x^2-3} \, dx.$$
So I use the substitution:
$$x=\frac{\sqrt 3}{\cos(t)}$$
$$dx= \frac{\sqrt 3 \sin(t) \, dt}{\cos^2(t)} $$
and I get
$$3\int \frac{\sqrt{\frac1 {\cos^2(t)}-1}\cdot\sin(t) \, dt}{\cos^2(t)}. $$
So I get
$$3\int \frac{\sin(t)\tan(x)\,dx}{\cos^2(x)},$$ that is $(\sin(t)\sin(t)/\cos(t))/\cos^2(t)$ and finally I have
$$3\int \frac{\sin^2(t)\,dt}{\cos^3(t)}$$
Substitute $\sin(t)=s$, so $\cos(t) \, dt=ds$. The integral becomes
$$3 \int \frac{s^2\,ds}{(1-s^2)^2};$$ $$dt= \frac{ds}{\cos t}$$
So problem is I don't know how do I get from this $\sqrt{(1/\cos^2(t))-1} = \tan(t);$
It was stupid question idk how I didn't saw that nvm, after that use partial integration $u=s$, $du=ds$, $v=1/(1-s^2)$ and i get $s/2(1-s^2)-1/2$ integral of $ds/(1-s^2)$ and the solution is $3/2(s/1-s^2-1/2\ln(1+s/1-s)$
Hint. As you have suggested, the change of variable $$ x=\frac{\sqrt{3}}{\cos t},\quad dx=\frac{\sqrt{3}\sin t}{\cos^2 t}\:dt, $$ gives $$ \begin{align} \int \sqrt{x^2-3}\:dx&=\sqrt{3}\int\sqrt{\frac3{\cos^2 t}-3}\:\cdot \frac{\sin t}{\cos^2 t}\:dt \\\\&=3\int\sqrt{\frac{1-\cos^2 t}{\cos^2 t}}\:\cdot \frac{\sin t}{\cos^2 t}\:dt \\\\&=3\int \frac{\sin^2 t}{\cos^3 t}\:dt \\\\&=3\int \frac{\sin^2 t\: \cos t}{(1-\sin^2 t)^2}\:dt \\\\&=3\int \frac{s^2}{(1-s^2)^2}\:ds \end{align} $$ can you take it from here?