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:-


$$\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}}$$





$$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?

  • 2
    $\begingroup$ Does this answer your question? Getting different answers when integrating using different techniques. For this case I would suggest the third approach from there (differentiate). $\endgroup$ – Zacky Dec 26 '19 at 16:05
  • 1
    $\begingroup$ Have you read that posts? Both your approaches are correct and they only differ by a constant, which I would suggest to use when you deal with an indefinite integral. $\endgroup$ – Zacky Dec 26 '19 at 16:08
  • 1
    $\begingroup$ both approaches are correct, the difference is in a constant which appears to be ${3\pi}\over 4$ $\endgroup$ – roman Dec 26 '19 at 16:12
  • 3
    $\begingroup$ @Zacky, can you please reopen the question, what's your hurry? $\endgroup$ – user3290550 Dec 26 '19 at 16:13
  • 1
    $\begingroup$ @user3290550 : You wrote: "actually there should not be difference of a constant also, because whatever standard integrations I have used, those are exact". That is incorrect. Exact methods should yield things differing by a constant. "Constant" in this context means not depending on $x.$ If something does not depend on $x,$ then its derivative with respect to $x$ is $0.$ $\endgroup$ – Michael Hardy Dec 27 '19 at 7:15

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. $$


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


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$$

  • $\begingroup$ You are right, my bad. $\endgroup$ – Martin Argerami Dec 26 '19 at 22:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.