TITLE: Closed-form expression for $F(x,y) = \int_0^1 \frac{\sqrt{t(1-t)}}{(t+x)^2 (t+y)} \mathrm{d}t$?
QUESTION [6 upvotes]: I am considering the following function
$$F(x,y) = \int_0^1 \frac{\sqrt{t(1-t)}}{(t+x)^2 (t+y)} \mathrm{d}t,$$
which is well-defined for any $x > 0$ and $y \geq 0$.
Is there a hope to obtain a closed form formula with respect to $x$ and $y$? 
For instance, according to Mathematical, we have that 
$$F(x,0) = \int_0^1 \frac{\sqrt{t(1-t)}}{(t+x)^2 t} \mathrm{d}t = \frac{\pi}{x \sqrt{x (x+2)}}.$$
Remark: To give a bit of context, the function $F$ appears when I consider the quadratic optimization problem of the form $\min_{\mathbf{x} \in \mathrm{R}^N} \lVert \mathbf{A} \mathbf{x} - \mathbf{y} \rVert_2^2 + \lambda \lVert \mathbf{x} \rVert_2^2$ and I try to understand the behavior of $\lVert \widehat{\mathbf{x}} - \mathbf{x}_0 \rVert_2^2$ with $\widehat{\mathbf{x}}$ the unique optimizer and $\mathbf{x}_0$ the vector we aim at recovering, with $\mathbf{y} = \mathbf{A} \mathbf{x}_0 + \mathbf{n} \in \mathbb{R}^M$ and $\mathbf{n}$ an i.i.d. Gaussian vector. The values $x$ and $y$ above appear as functions of $\lambda$ and $\gamma = \lim M/N$ when $N\rightarrow \infty$ when the matrix $\mathbf{A}$ is i.i.d. Gaussian and its spectrum behaves according to the Marchenko-Pastur law.

REPLY [4 votes]: NoName's approach is more elegant, but the integral can be evaluated using contour integration.
Consider the complex function $$g(z) = \frac{\sqrt{z} \sqrt{z-1}}{(z+x)^{2}(z+y)}$$ where $x$ and $y$ are positive parameters, $y \ne x$ , and $0 < \arg(z), \arg(z-1) < 2 \pi.$
The function is well defined on $\mathbb{C} \setminus [0,1]$ and real-valued on the real axis to the right of $z=1$.
Since $g(z) \sim \mathcal{O} \left(\frac{1}{z^{2}}\right) $ as $|z| \to \infty$, the residue of $g(z)$ at complex infinity is $0$.
If we integrate clockwise around a dog-bone/dumbbell contour, we get $$ \begin{align} \int_{0}^{1} \frac{\sqrt{t} \sqrt{(1-t)e^{i \pi}}}{(t+x)^{2}(t+y)} \, \mathrm dt + \int_{1}^{0}\frac{\sqrt{te^{ 2 \pi i}} \sqrt{(1-t)e^{i \pi}}}{(t+x)^{2}(t+y)} \, \mathrm dt &=  2i \int_{0}^{1} \frac{\sqrt{t} \sqrt{1-t}}{(t+x)^{2}(t+y)} \, \mathrm dt \\ &=2 \pi i \left(\operatorname{Res}[g(z), -x] + \operatorname{Res}[g(z), -y] \right), \end{align}$$
where $$\operatorname{Res}[g(z), -y] = \frac{\sqrt{y e^{ i \pi}} \sqrt{(y+1) e^{ i \pi }}}{(-y+x)^{2}} = -\frac{\sqrt{y(1+y)}}{(x-y)^{2}} $$
and $$ \begin{align} \operatorname{Res}[g(z), -x] &=  \lim_{ z \to -x} \frac{\mathrm d}{\mathrm dz} \frac{\sqrt{z}\sqrt{z-1}}{z+y} \\ &= \lim_{ z \to -x} \frac{\left(\frac{\sqrt{z-1}}{2 \sqrt{z}} + \frac{\sqrt{z}}{2\sqrt{z-1}}\right)(z+y) - \sqrt{z} \sqrt{z-1} }{(z+y)^{2}} \\ &= \frac{\left(\frac{\sqrt{(x+1)e^{ i \pi}}}{2 \sqrt{xe^{ i \pi}}} + \frac{\sqrt{xe^{ i \pi}}}{2\sqrt{(x+1)e^{ i \pi}}}\right)(-x+y) - \sqrt{xe^{i \pi}} \sqrt{(x+1)e^{ i \pi}} }{(-x+y)^{2}}\\ &= \frac{\left(\frac{\sqrt{x+1}}{2 \sqrt{x}} + \frac{\sqrt{x}}{2 \sqrt{x+1}} \right)(y-x) + \sqrt{x}\sqrt{x+1}}{(x-y)^{2}} \\ &=\frac{(2x+1)(y-x) + 2x(1+x) }{2 \sqrt{x(1+x)}(x-y)^{2}} \\&= \frac{x+y+2xy}{2 \sqrt{x(1+x)}(x-y)^{2}}. \end{align} $$
Therefore, $$\int_{0}^{1} \frac{\sqrt{t} \sqrt{1-t}}{(t+x)^{2}(t+y)} \, \mathrm dt = \frac{\pi}{2} \frac{x+y+2xy-2 \sqrt{xy(1+x)(1+y)}}{\sqrt{x(1+x)}(x-y)^{2}}. $$

The result should hold for $y=0$, but the case $y=x$ has to be done separately.