From integrating $\int\frac{1}{\sqrt{(t-a)(b-t)}} dt$ in two different ways, I have found two different functions:

1. $-\sin^{-1}\left (\frac{2t-a-b}{a-b} \right )$
2. $2 \tan^{-1}\left (\sqrt{\frac{t-a}{b-t}} \right )$

The question asks me to prove using trigonometry that these are equal results. I've plotted both of these in Desmos and they are the same except that 1 is always $\frac{\pi}{2}$ less than 2 (which the additive constant from the integral could account for), but I'm having difficulty proving that they are equal by trigonometry. I know I could show that they have the same derivative, and so they must be the same up to an additive constant, but I'm wondering how to prove it purely through trigonometry.

I've tried using the inverse tangent addition formula on 2, but it's still not leading anywhere - I think the $\pm \frac{\pi}{2}$ difference is causing the problem, and I don't know how to include it.

Any ideas on how to show the equality of 1) and 2)?