# Reasoning behind the trigonometric substitution for $\sqrt{\frac{x-\alpha}{\beta-x}}$ and $\sqrt{(x-\alpha)(\beta-x)}$

In my book, under the topic "Evaluation of Integrals by using Trigonometric Substitutions", it is given, in order to simplify integrals containing the expressions $$\sqrt{\frac{x-\alpha}{\beta-x}}$$ and $$\sqrt{(x-\alpha)(\beta-x)}$$, the substitution $$x=\alpha\cos^2\theta+\beta\sin^2\theta$$ must be used. If I remember this form and the substitution, then it definitely helps simplify the integrand. The first expression gets simplified to $$\tan\theta$$ and the second to $$\sin\theta\cos\theta(\alpha-\beta)$$.

I understand that if we do this kind of substitution we greatly simplify the expression. But how do we determine what to substitute in the first place or in other words, if I forget the substitution, is there any way to determine which substitution works well to simplify the integrand? How did the author figure out this substitution is the best fit for this kind of expression? Was it a guess or is there any mathematical reasoning behind it?

• This is a prescription that is understandable and it adds to your experience. Certain things may not occur to one on one's own. Commented Dec 19, 2019 at 7:46
• Please what's the book? Commented Dec 19, 2019 at 8:32
• @Allawonder, Mathematics - Class XII Volume-1, by Dr. R.D.Sharma. This book is used by CBSE high school students in India. This is not an advanced textbook. Commented Dec 19, 2019 at 8:57
• In the "Reprint 2017" edition I have, this is from page 19.74. However the expression given in my book is $\sqrt{(x-\alpha)(x-\beta)}$ instead of $\sqrt{(x-\alpha)(\beta-x)}$. I felt there was a mistake in my book as the substitution led to a complicated (invalid except when $\alpha=\beta$) formula. I made a significant change in the context and that's why I didn't refer the name of the book in the question. Commented Dec 19, 2019 at 9:19

In the first place, one notices that the expression can be "normalized" by means of a linear transform that maps $$\alpha,\beta$$ to $$-1,1$$, giving the expressions

$$\sqrt{1-x^2}\text{ and }\sqrt{\frac{1+x}{1-x}}=\frac{1+x}{\sqrt{1-x^2}}.$$

Then the substitution $$x=\cos\theta$$ comes naturally. We could stop here.

Coming back to the unscaled originals, we have

$$x=\frac{\alpha+\beta+(\beta-\alpha)\cos\theta}2$$

which is also

$$x=\frac{(\alpha+\beta)(\cos^2\frac\theta2+\sin^2\frac\theta2)+(\beta-\alpha)(\cos^2\frac\theta2-\sin^2\frac\theta2)}2=\alpha\sin^2\frac\theta2+\beta\cos^2\frac\theta2.$$

• Thank you for your answer. Unfortunately, I realised that my mathematical knowledge isn't sufficient enough to understand your answer as I haven't learnt about "normalisation", "unscaled originals", etc. I'm sorry for not accepting your answer now, but I'll try to learn them and accept in future. Commented Dec 19, 2019 at 9:02
• @M.GuruVishnu: you don't need to know these two terms (which are common language) and I doubt there is an etc. Look at the formulas, they are elementary.
– user65203
Commented Dec 19, 2019 at 9:55
• Yves: I feel that this answer skips through too many steps to be comprehensible to a beginning calculus student, although it does make for a more elegant treatment for someone more experienced (+1 for that). In particular the OP probably does not get what you mean by mapping $\alpha,\beta$ to $-1,1$ (or how exactly this is accomplished), or in what sense the implicit substitutions used are scalings of the original (or perhaps even what the word "scaling" means), or indeed what a linear transform is. Commented Dec 19, 2019 at 10:13
• @YiFan: I don't expect a guy asking about general substitutions in integrals to ignore this.
– user65203
Commented Dec 19, 2019 at 10:14
• My impression is that the OP is just a curious student who saw a substitution arising magically in their book, and wanted to see a justification for why the substitution worked. Although of course my impression could be wrong. Commented Dec 19, 2019 at 10:17

The following is intended as an elaboration of Yves Daoust's excellent answer. Given the form $$\sqrt{\frac{x-\alpha}{\beta-x}}$$ to be integrated, let's see what happens under the substitution $$x=au+b$$ (this is what is meant by a linear transform). We get the expression $$\sqrt{\frac{au+(b-\alpha)}{-au+(\beta-b)}}=\sqrt{\frac{u+(b-\alpha)/a}{-u+(\beta-b)/a}}.$$ In particular, if we choose the constants $$a,b$$ such that $$b-\alpha=a$$ and $$\beta-b=a$$, this transforms the integrand into $$\sqrt{\frac{1+u}{1-u}}=\frac{1+u}{\sqrt{1-u^2}}.$$ At this point, it becomes natural to substitute $$u=\cos\theta$$, since the Pythagorean identity $$\sin^2\theta+\cos^2\theta=1$$ now implies that the denominator $$\sqrt{1-u^2}$$ simply becomes $$\sin\theta$$, which simplifies the integrand greatly. Similarly, substituting $$x=au+b$$ into the integrand of the form $$\sqrt{(x-\alpha)(\beta-x)}$$ provides us with $$\sqrt{(-b^2+(\alpha+\beta)b-\alpha\beta)+u(2ab+a\alpha+a\beta)-a^2u^2}$$ which is the same as $$a\sqrt{(-b^2+(\alpha+\beta)b-\alpha\beta)/a^2+u(2b+\alpha+\beta)/a-u^2}.$$ In substance this is just $$\sqrt{A+Bu-u^2}$$ for constants $$A,B$$, which after completing the square further becomes something that looks like $$\sqrt{1-v^2}$$ for an appropriate choice of $$v$$. Again, this makes the substitution $$v=\cos\theta$$ natural.

In both cases, if you work carefully through each step in the calculation you will find that it all amounts to the substitution $$x=\frac{\alpha+\beta+(\beta-\alpha)\cos\theta}{2},$$ which as Yves shows can also be written as $$x=\alpha\sin^2\frac\theta2+\beta\cos^2\frac\theta2.$$ (Note that the fact that the argument of the functions is off by a factor of $$2$$ from your substitution should not bother you, since it is just a constant and does not affect the efficiency of the substitution.)

First, your question is commendable. I also believe it is better to remember the rationale behind a substitution than to memorise mindlessly.

Secondly, you say that the substitution blah-blah must be used. I would have said instead may be used -- there may be some other substitution that one could use, that is.

Now, about your main question. The main thing to note about these expressions is that they involve the square root of a negative quadratic expression, that is, something of the form $$\sqrt{-ax^2+bx+c},$$ with $$a>0.$$ For the quotient, see this by rationalising either the numerator or the denominator. Well, one may always deal instead with the case with $$a=1$$ since otherwise one can factor out the modulus of the leading coefficient, still staying in the real domain.

Once you observe that we're dealing with an integral involving $$\sqrt{c+bx-x^2},$$ then the usual sine substitution should jump to mind. Well, to see this, complete squares to get $$\sqrt{A-\left(x-\frac b2\right)^2},$$ where $$A=\frac{b^2}{4}+c.$$ Necessarily, we must take only nonnegative values of $$A$$ to stay in the real domain. Then it's easy to see that this is easily simplified by the sine substitution. To see this even more obviously, factor out the $$A$$ to get some constant multiple of $$\sqrt{1-y^2},$$ with $$y=\left(\frac{x}{\sqrt A}-\frac{b}{2\sqrt A}\right).$$

Then this is crystal clear.

• Thank you for your answer. I tried to apply your answer to $\sqrt{(x-\alpha)(\beta-x)}=\sqrt{-x^2+(\alpha+\beta)x-\alpha\beta}$. After completing the squares I got: $$\sqrt{-\left(x-\frac{\alpha+\beta}2\right)^2+\frac{\alpha^2+\beta^2}{2}}$$ Then pulling out $\sqrt{\frac{\alpha^2+\beta^2}2}$, $$\sqrt{\frac{\alpha^2+\beta^2}2}\sqrt{1-\frac{\left(x-\frac{\alpha+\beta}2\right)^2}{\frac{\alpha^2+\beta^2}{2}}}$$ Could you please tell what to do next. When I equated the second term in second square root in the final expression to $\sin^2\theta$, I didn't get $x=\alpha\cos^2\theta+\beta\sin^2\theta$. Commented Dec 19, 2019 at 10:00
• @M.GuruVishnu You did not complete the square properly. In particular, the second term should be $$\alpha\beta+\left(\frac{\alpha+\beta}{2}\right)^2.$$ This is not equal to $$\frac{\alpha^2+\beta^2}{2}.$$ Commented Dec 19, 2019 at 10:57
• I obtained the second term as a result of the following: $$\color{red}{-}\alpha\beta+\left(\frac{\alpha+\beta}{2}\right)^2=\frac{\alpha^2+\beta^2}{2}$$I think I'm correct regarding this step. Commented Dec 19, 2019 at 11:40
• @M.GuruVishnu Oh, indeed, the correct expression is $$\left(\frac{\alpha+\beta}{2}\right)^2-\alpha\beta,$$ but this simplifies to $$\left(\frac{\alpha-\beta}{2}\right)^2$$ instead. Commented Dec 19, 2019 at 11:56
• Yes. Both of us made mistakes! I think I need to check my calculations again, plugging this in the original expression, I obtain a highly invalid expression: $$\sqrt{-\left(x-\frac{\alpha+\beta}2\right)^2-\left(\frac{\alpha-\beta}{2}\right)^2}$$ Commented Dec 19, 2019 at 12:07