<s>[INST] 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?
 [/INST] 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$$
</s>