How to evaluate the following integral$\int_a^{pa}\frac{ax}{\sqrt{(a-x)(x-pa)}}dx$? Can anyone help me to evaluate the definite integral $\int_a^{pa}\frac{ax}{\sqrt{(a-x)(x-pa)}}dx$?I encountered this integral while doing a problem of particle dynamics in Ganguly Saha(Applied Mathematics).Can this integral be evaluated without the substitution of $x=asin^2\theta+pacos^2\theta$.Please anyone suggest some other method i.e. some direct method to calculate this integral.
 A: With the variable change $u=x/a-1$ and the shorthand $q=p-1$,
$$I=\int_a^{pa}\frac{ax}{\sqrt{(a-x)(x-pa)}}dx=a^2\int_0^{q}\frac{u+1}{\sqrt{u(q-u)}}du=a^2(I_1+I_2)$$
where, $I_1$ and $I_2$ are given below, integrated with the convenient substitution $u=q\sin^2\theta$.
$$I_1=\int_0^{q}\sqrt{\frac{u}{q-u}}du=q\int_0^{\pi/2}2\sin^2\theta d\theta=\frac{\pi}{2}q$$
$$I_2=\int_0^{q}\frac{1}{\sqrt{u(q-u)}}du=\int_0^{\pi/2}2\theta =\pi$$
Thus,
$$I=a^2\left(\frac{\pi}{2}q+\pi\right)=\frac{\pi}{2}(1+p)a^2$$
A: Let 
$I = \displaystyle \int_a^{pa} \frac{ax dx}{\sqrt{(a-x)(x-pa)}}$
Let ${(a-x)(x-pa)} = z$
Then $dz = -(2x-(p+1)a) dx$
Let's find $\lambda$ and $\mu$ such that the numerator of the integral $ax$ may be expressed as
$\lambda(-(2x-(p+1)a)) + \mu$
Comparing the coefficients, we have $\displaystyle \lambda = -\frac{a}{2}$ and $\displaystyle \mu = \frac{(p+1)a^2}{2}$
Hence we can write $I = I_1 + \displaystyle \frac{(p+1)a^2}{2}I_2$ where
$I_1 = \displaystyle -\frac{a}{2} \int_0^0 \frac{dz}{\sqrt{z}} = 0$
and 
$I_2 = \displaystyle \int_a^{pa} \frac{dx}{\sqrt{(a-x)(x-pa)}}$
Observe that the denominator of $I_2$ may be written as $\sqrt{t^2 - y^2}$ where 
$t = \displaystyle \frac{a(p-1)}{2}$ and
$y = \displaystyle x - \frac{a(p+1)}{2}$
and the integral reduces to
$\displaystyle \arcsin \frac{y}{t}$
Next, note that when $x = pa$ then $y = t$ and when $x = a$, then $y = -t$
Finally $\displaystyle I_2 = \pi$
and
$\displaystyle I = \frac{(p+1)a^2}{2}I_2 = \frac{(p+1)a^2}{2} \pi$
A: As there are several methods which are already been mentioned,i would like to point out another one :
By observing
$$I=\int_{a}^{pa} \frac{x}{\sqrt{(a-x)(x-pa)}}dx=\int_{a}^{pa}\frac{x}{\sqrt{\bigg(\frac{a(p-1)}{2}\bigg)^2-\bigg(x-\frac{a(p+1)}{2}\bigg)^2}}dx$$
Substitute $x-\frac{a(p+1)}{2}=u$
Then $$I=\int_{\frac{a(p-1)}{2}}^{\frac{p(a-1)}{2}} \frac{u+\frac{a(p+1)}{2}} {\sqrt{{\bigg(\frac{a(p-1)}{2}\bigg)^{2}-u^2}}}du$$
Can you take it from here ?
A: Introducing integral by parts,
\begin{equation}
\begin{aligned}
I&=a \int^{pa}_a\frac{x}{\sqrt{(a-x)(p a-x)}}dx \\
&=\frac{a}{2}
\left\{
a(1+p)\int^{pa}_a\frac{1}{\sqrt{(a-x)(p a-x)}}dx
-\int^{pa}_a\frac{d[(a-x)(p a-x)]}{\sqrt{(a-x)(p a-x)}}
\right\} \\
&=\frac{a}{2}
\left\{
a(1+p)\int^{pa}_a\frac{1}{\sqrt{(a-x)(p a-x)}}dx
-2\left[\sqrt{(a-x)(p a-x)}\right]^{pa}_a
\right\} \\
&=\frac{a^2(1+p)}{2}\int^{pa}_a\frac{1}{\sqrt{(a-x)(p a-x)}}dx
\end{aligned}
\end{equation}
Transforming the variable $x$ to $t$ using the relation,
\begin{equation}
\begin{aligned}
t=\sqrt{\frac{pa-x}{x-a}}
\end{aligned}
\end{equation}
which gives,
\begin{equation}
\begin{aligned}
x=a\frac{p+t^2}{1+t^2}
\end{aligned}
\end{equation}
the integral $I$ is expressed as,
\begin{equation}
\begin{aligned}
I&=\frac{a^2(1+p)}{2}\int^{pa}_a\frac{1}{\sqrt{(a-x)(p a-x)}}dx \\
&=\frac{a^2(1+p)}{2}\int^{0}_{\infty}\frac{1}{t}\sqrt{\frac{(1+t^2)^2}{a^2(1-p)^2}}\frac{2a(1-p)t}{(1+t^2)^2}dt
\end{aligned}
\end{equation}
In the cases of (1)$a\geq 0, p\leq 1$ and (2)$a\leq 0, p\geq 1$, the integral can be expressed as
\begin{equation}
\begin{aligned}
I&=-a^2(1+p)\int^{\infty}_{0}\frac{dt}{1+t^2}=-\frac{a^2(1+p)\pi}{2}
\end{aligned}
\end{equation}
In the cases of (3)$a\leq 0, p\leq 1$ and (4)$a\geq 0, p\geq 1$, the integral can be expressed as
\begin{equation}
\begin{aligned}
I&=a^2(1+p)\int^{\infty}_{0}\frac{dt}{1+t^2}=\frac{a^2(1+p)\pi}{2}
\end{aligned}
\end{equation}
