A Worthy Indefinite Integral

Evaluate $\displaystyle\int \frac{1+\frac{\alpha}{2}x}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx, \; \alpha_1 \ne \alpha_2$.

$\displaystyle\int \frac{1+\frac{\alpha}{2}x}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx + \frac{\alpha}{2}\displaystyle\int\frac{x}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx + \frac{\alpha}{2}\cdot\left(\frac{1}{-2}\right)\displaystyle\int\frac{-2x+(\alpha_1+\alpha_2)-(\alpha_1+\alpha2)}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}}\;dx$

$= \displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx - \frac{\alpha}{4}\left(\displaystyle\int\frac{-2x+(\alpha_1+\alpha_2)}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}}\;dx - \displaystyle\int\frac{\alpha_1+\alpha2}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}}\;dx\right)$

$=\boxed{ \displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx} - \frac{\alpha}{4}\displaystyle\int\frac{-2x+(\alpha_1+\alpha_2)}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}}\;dx +\boxed{\frac{\alpha(\alpha_1+\alpha_2)}{4}\displaystyle\int\frac{1}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}}\;dx}$

$= \boxed{(1+\frac{\alpha(\alpha_1+\alpha_2)}{4})\displaystyle\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx}-\frac{\alpha}{4}\displaystyle\int\frac{-2x + (\alpha_1+\alpha2)}{\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}}\;dx$

$= \left(1+\frac{\alpha(\alpha_1+\alpha_2)}{4}\right)\displaystyle\int\frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx -\frac{\alpha}{4}\cdot\left(\frac{1}{1-\frac{1}{2}}\right)\sqrt{-x^2+(\alpha_1+\alpha_2)x-\alpha_1\alpha_2}$

$= \left(1+\frac{\alpha(\alpha_1+\alpha_2)}{4}\right)\displaystyle\int\frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx -\frac{\alpha}{2}\sqrt{-(x-\alpha_1)(x-\alpha_2)}$

By $\int \frac{1}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx=\arcsin\left(\frac{2x-(\alpha_1+\alpha_2)}{|\alpha_2-\alpha_1|}\right)$ (see “Integral: The CAS & I“),

$= \left(1+\frac{\alpha(\alpha_1+\alpha_2)}{4}\right) \arcsin\left(\frac{2x-(\alpha_1+\alpha_2)}{|\alpha_2-\alpha_1|}\right)-\frac{\alpha}{2}\sqrt{-(x-\alpha_1)(x-\alpha_2)}$

Exercise-1 Evaluate $\displaystyle\int \frac{1+\frac{\alpha}{2}x}{\sqrt{-(x-\alpha_1)(x-\alpha_2)}}\;dx, \alpha_1 \ne \alpha_2$ using a CAS.