Evaluating $\int \sqrt{\frac{5-x}{x-2}}\,dx$ with two different methods and getting two different results I tried Evaluating $\int \sqrt{\dfrac{5-x}{x-2}}dx$ using two different methods and got two different results.
Getting two different answers when tried using two different methods:-
M-$1$:
$$\int \dfrac{5-x}{\sqrt{\left(5-x\right)\left(x-2\right)}}dx$$
$$\dfrac{1}{2}\int\dfrac{-2x+7}{\sqrt{\left(5-x\right)\left(x-2\right)}}dx+\dfrac{3}{2}\int\dfrac{dx}{\sqrt{\left(5-x\right)\left(x-2\right)}}$$
$$\sqrt{\left(5-x\right)\left(x-2\right)}+\dfrac{3}{2}\int\dfrac{dx}{\sqrt{-x^2+7x-10}}$$
$$\sqrt{\left(5-x\right)\left(x-2\right)}+\dfrac{3}{2}\int\dfrac{dx}{\sqrt{\left(\dfrac{3}{2}\right)^2-\left(x-\dfrac{7}{2}\right)^2}}$$
$$\sqrt{\left(5-x\right)\left(x-2\right)}+\dfrac{3}{2}\sin^{-1}\dfrac{x-\dfrac{7}{2}}{\dfrac{3}{2}}$$
$$\sqrt{\left(5-x\right)\left(x-2\right)}+\dfrac{3}{2}\sin^{-1}\dfrac{2x-7}{3}$$
M-$2$:
$$x=5\sin^2\theta+2\cos^2\theta$$
$$dx=\left(10\sin\theta\cos\theta-4\cos\theta\sin\theta\right) \, d\theta$$
$$\int \sqrt{\dfrac{5\cos^2\theta-2\cos^2\theta}{5\sin^2\theta-2\sin^2\theta}}\cdot6\sin\theta\cos\theta \,d\theta$$
$$6\int \cos^2\theta \,d\theta$$
$$\int 3\left(1+\cos2\theta\right) \,d\theta$$
$$3\left(\theta+\dfrac{\sin2\theta}{2}\right)$$
$$3\theta+\dfrac{3}{2}\sin2\theta$$
$$x=5\sin^2\theta+2-2\sin^2\theta$$
$$\sin^{-1}\sqrt{\dfrac{x-2}{3}}=\theta$$
$$\cos2\theta=1-2\sin^2\theta$$
$$\cos2\theta=1-2\cdot\dfrac{x-2}{3}$$
$$\cos2\theta=\dfrac{7-2x}{3}$$
$$3\sin^{-1}\sqrt{\dfrac{x-2}{3}}+\dfrac{3}{2}\cdot\dfrac{\sqrt{9-(49+4x^2-28x)}}{3}$$
$$3\sin^{-1}\sqrt{\dfrac{x-2}{3}}+\sqrt{\left(5-x\right)\left(x-2\right)}$$
In first and second method I am getting the different results of $\dfrac{3}{2}\sin^{-1}\dfrac{2x-7}{3}$ and $3\sin^{-1}\sqrt{\dfrac{x-2}{3}}$ respectively. I checked that these are not inter-convertible. Why am I getting this difference?
 A: Both your answers are correct. Your two functions differ by $3\pi/4$, so they have the same derivative. 
Let $b=\sqrt{\frac{x-2}3}$. For your integral to make sense you need $0\leq b\leq1$ (this comes from $2\leq x\leq5$). Let $a=\arcsin b$. Note $0\leq\arcsin b\leq \tfrac\pi2$, and so the sine is injective when applied to $2a-\tfrac\pi2$. Then
\begin{align}
\sin\left(2a-\tfrac\pi2\right)
&=-\cos(2a)=-(1-2\sin^2a)=2b^2-1.
\end{align}
So
\begin{align}
2\arcsin\sqrt{\frac{x-2}3}\ -\frac\pi2
&=2\arcsin b -\frac\pi2=2a-\frac\pi2\\ \ \\
&=\arcsin(2b^2-1)\\ \ \\
&=\arcsin\frac{2x-7}3.
\end{align}
Then, multiplying by $3/2$, 
$$
3\arcsin\sqrt{\frac{x-2}3}\ -\frac{3\pi}4=\frac32\,\arcsin\frac{2x-7}3.
$$
A: Shown below is that the two results differ by a constant 
$-\frac{3\pi}4$.
Define $f(x)$ as the difference of the two results
$$f(x)=\frac32\sin^{-1}\frac{2x-7}3-3\sin^{-1}\sqrt{\frac{x-2}3}$$
where $2<x\le5$. Then, evaluate 
$$f’(x) = \frac3{2\sqrt{(5-x)(x-2)}}- \frac3{2\sqrt{(5-x)(x-2)}}=0$$
Thus, $f(x)$ is a constant over $(2,5]$ and can be evaluated with
$$f(x)=f(5)=\frac32\cdot \sin^{-1} 1 -3\sin^{-1}1=-\frac{3\pi}4$$
