<s>[INST] Am confused by integral from Apostol I have been attempting to solve the following Integral from Apostol "Calculus" Volume 1, Section 6.22, Question 46. The integral is
$$
\int \sqrt{(x-a)(b-x)}\, dx,\,\,\, a\neq b
$$
Points to Note:


*

*The answer in the back of the book is $\frac{2(b-a)}{|b-a|}\arcsin{\sqrt{\frac{x-a}{b-a}}} + C$

*This problem occurs before the section on partial fractions so I am trying to formulate a solution that does not involve partial fractions


My attempts to solve this problem have been as follows:


*

*I first observed that
$$
(x -a)(b-x) = \left(\frac{a-b}{2} \right)^2 - \left(x - \left(\frac{a+b}{2}\right)\right)^2
$$
which would imply
$$
\int \sqrt{(x-a)(b-x)}\, dx = \int \sqrt{\left(\frac{a-b}{2} \right)^2 - \left(x - \left(\frac{a+b}{2}\right)\right)^2}\, dx
$$
Setting $y = x - \frac{a+b}{2}$ would imply $dy = dx$ which would mean
$$
\int \sqrt{\left(\frac{a-b}{2} \right)^2 - \left(x - \left(\frac{a+b}{2}\right)\right)^2}\, dx = \int \sqrt{\left(\frac{a-b}{2} \right)^2 - y^2}\, dy
$$
Setting $y = \frac{a-b}{2}\sin u$ would mean $dy = \frac{a-b}{2}\cos u\, du$ as well as $u = \arcsin\frac{2y}{a-b}$ and so
$$
\int \sqrt{\left(\frac{a-b}{2} \right)^2 - y^2}\, dy = \int\sqrt{\left(\frac{a-b}{2}\right)^2 - \left(\frac{a-b}{2}\right)^2\sin^2 u}\, \cdot \frac{a-b}{2} \cos u\, du
$$
$$
= \int \sqrt{\left(\frac{a-b}{2}\right)^2\cdot\left(1-\sin^2 u\right)}\cdot\left(\frac{a-b}{2}\right)\cos u\, du
$$
$$
= \left(\frac{a-b}{2}\right)^2\int \cos^2 u\, du
$$
$$
= \left(\frac{a-b}{2}\right)^2\left(\frac{1}{2}\left(u + \cos u\cdot\sin u\right)\right)
$$
$$
= \left(\frac{a-b}{2}\right)^2\left(\frac{1}{2}\left(u + \sqrt{1-\sin^2 u}\cdot\sin u\right)\right)
$$
At this point I was starting to feel like it was not going down the right path, so I stopped here

*My next approach was to consider the following: Let $x - a = (b-a)\sin^2u$ which would mean $b - x = (b - a)\cos^2u$. With $dx = 2(b-a)\sin\,u\cdot\cos\,u\, du$ this would mean
$$
\int \sqrt{(x-a)(b-x)}\, dx = \int |b-a|\cdot\sin\,u\cos\,u\cdot2(b-a)\sin\,u\cos\,u\,du
$$
$$
= 2(b-a)|b-a|\int\cos^2u\sin^2u\,du
$$
$$
= \frac{(b-a)|b-a|}{2}\int\sin^2 2u\, du
$$
$$
= \frac{(b-a)|b-a|}{2}\left(\frac{1}{2}u - \frac{1}{8}\sin\,4u\right)
$$
$$
= \frac{(b-a)|b-a|}{2}\left(\frac{1}{2}u -\frac{1}{8}\left(\cos\,u\left(4\sin\,u-8\sin^3\,u\right)\right)\right)
$$
At this point I was starting to get the same feeling as before (ie was clearly starting to simplify)
In short, any suggestion and/or help would be greatly appreciated.

 [/INST] Hint:
Substitute $$ x = \frac{(a+b)}{2} + u$$
$$dx = du$$
The integral reduces to
$$I = \int \frac{1}{2}\sqrt{(b-a)^2 - 4u^2} du$$
This is a standard integral for which you have the answer.
Thanks 
Satish
</s>