I am trying to compute the function:
$$f(\lambda)\equiv\int_{-1}^{1}\frac{\sqrt{1-x^2}}{\lambda-x}dx.$$
It arises as the convolution of the semi-circle density with the inverse function. When $\lambda\in(-1,1)$ it can only be defined as a Cauchy Principal Value.
I have a hunch that I need to go into the complex plane to solve this, but am not sure how to proceed. Any pointers would be much appreciated.
I will demonstrate how to compute the Cauchy principal value of this integral using complex contour integration and Cauchy's theorem for all real values of $\lambda$:
Consider the following contour integral:
$$\oint_C dz \frac{\sqrt{z^2-1}}{\lambda-z} $$
where $C$ is the following contour for $|\lambda| \lt 1$:
We now evaluate the contour integral. While the following looks tedious, it holds the key to determining why the final solution will have different behavior depending on whether $\lambda$ is greater than or less than $1$. For the time being, we will assume that $|\lambda| \lt 1$. Also, we will assume that the outer circle has radius $R$ and that the small circular arcs have radius $\epsilon$.
$$\int_{AB} dz \frac{\sqrt{z^2-1}}{\lambda-z} = \int_{-R}^{-1-\epsilon} dx \frac{\sqrt{x^2-1}}{\lambda-x}$$
$$\int_{BC} dz \frac{\sqrt{z^2-1}}{\lambda-z} = i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \, \frac{\sqrt{(-1+\epsilon e^{i \phi})^2-1}}{\lambda+1-\epsilon e^{i \phi}} $$
$$\int_{CD} dz \frac{\sqrt{z^2-1}}{\lambda-z} = \int_{-1+\epsilon}^{\lambda-\epsilon} dx \frac{i \sqrt{1-x^2}}{\lambda-x}$$
$$\int_{DE} dz \frac{\sqrt{z^2-1}}{\lambda-z} = i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \, \frac{i \sqrt{1-(\lambda+\epsilon e^{i \phi})^2}}{-\epsilon e^{i \phi}} $$
$$\int_{EF} dz \frac{\sqrt{z^2-1}}{\lambda-z} = \int_{\lambda+\epsilon}^{1-\epsilon} dx \frac{i \sqrt{1-x^2}}{\lambda-x}$$
$$\int_{FG} dz \frac{\sqrt{z^2-1}}{\lambda-z} = i \epsilon \int_{\pi}^{-\pi} d\phi \, e^{i \phi} \, \frac{\sqrt{(\epsilon e^{i \phi})^2-1}}{\lambda-\epsilon e^{i \phi}} $$
$$\int_{GH} dz \frac{\sqrt{z^2-1}}{\lambda-z} = \int_{1-\epsilon}^{\lambda+\epsilon} dx \frac{-i \sqrt{1-x^2}}{\lambda-x}$$
$$\int_{HI} dz \frac{\sqrt{z^2-1}}{\lambda-z} = i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \, \frac{-i \sqrt{1-(\lambda+\epsilon e^{i \phi})^2}}{-\epsilon e^{i \phi}} $$
$$\int_{IJ} dz \frac{\sqrt{z^2-1}}{\lambda-z} = \int_{\lambda-\epsilon}^{-1+\epsilon} dx \frac{-i \sqrt{1-x^2}}{\lambda-x}$$
$$\int_{JK} dz \frac{\sqrt{z^2-1}}{\lambda-z} = i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \, \frac{\sqrt{(-1+\epsilon e^{i \phi})^2-1}}{\lambda+1-\epsilon e^{i \phi}} $$
$$\int_{KL} dz \frac{\sqrt{z^2-1}}{\lambda-z} = \int_{-1-\epsilon}^{-R} dx \frac{\sqrt{x^2-1}}{\lambda-x}$$
$$\int_{LA} dz \frac{\sqrt{z^2-1}}{\lambda-z} = i R \int_{-\pi}^{\pi} d\theta \, e^{i \theta} \frac{\sqrt{R^2 e^{i 2 \theta}-1}}{\lambda - R e^{i \theta}} $$
Note that, on the branch above the real axis, $-1=e^{i \pi}$ and on the branch below the real axis, $-1=e^{-i \pi}$. Thus, the sign of $i$ in front of the square root when $|x| \lt 1$ is positive above the real axis and negative below the real axis.
Now let's examine what happens when we combine the pieces above to form the contour integral. When we combine the integrals over $AB$ and $LK$, the respective integration directions are reversed, but the integrands are the same (as $|x| \gt 1$ here). Thus, these two integrals cancel.
However, when $|x| \lt 1$, the opposing signs of the integrands results in the addition rather than the cancellation of the integrals. Thus, in the limit as $\epsilon \to 0$, we have
$$\left (\int_{CD} + \int_{EF} + \int_{GH} + \int_{JK}\right) dz \frac{\sqrt{z^2-1}}{\lambda-z} = i 2 PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} $$
Note that we used the definition of the Cauchy principal value as the limit of the sum of the integrals over regions avoiding the pole at $x=\lambda$.
As $\epsilon \to 0$, the integrals over $BC$, $FG$, and $JK$ all vanish. Thus, we are left with the integrals over $DE$ and $HI$. In this case, the direction of the paths of integration are the same, but the integrands are of opposite sign. Thus, the sum of the integrals over $DE$ and $HI$ cancel.
After all that, we are left with, as the contour integral,
$$i 2 PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} + i R \int_{-\pi}^{\pi} d\theta \, e^{i \theta} \frac{\sqrt{R^2 e^{i 2 \theta}-1}}{\lambda - R e^{i \theta}}$$
Now we consider the contour integral as $R \to \infty$. In this case, we expand the integrand for large $R$:
$$\begin{align}i R e^{i \theta} \frac{\sqrt{R^2 e^{i 2 \theta}-1}}{\lambda - R e^{i \theta}} &= -i R e^{i \theta} \left [1 - \frac1{2 R^2 e^{i 2 \theta}} + \cdots \right ] \left [1+ \frac{\lambda}{R e^{i \theta}} + \frac{\lambda^2}{R^2 e^{i 2 \theta}} + \cdots \right ]\\ &= -i R e^{i \theta} - i \lambda - i \left (\lambda^2-\frac12 \right ) \frac1{R e^{i \theta}} + \cdots \end{align}$$
As we integrate these terms over a whole period $[-\pi,\pi]$, we find that all terms disappear except the $-i \lambda$ term. (This is what people refer to as the "residue at infinity.")
By Cauchy's theorem, we may set the contour integral to zero because there are no poles in the interior of the contour $C$. Thus,
$$i 2 PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} - i 2 \pi \lambda = 0$$
or, when $|\lambda| \lt 1$,
$$PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} = \pi \lambda$$
The enumeration of the other cases $\lambda \gt 1$ and $\lambda \lt -1$ should be easy to visualize now. For example, when $\lambda \gt 1$, we lose the bumps $DE$ and $HI$ (which contributed nothing to the contour integral previously), but now we have a pole within $C$ at $z=\lambda$. Thus, we may use the residue theorem (or simply extend the branch cut beyond $x=1$ and detour around the pole - same thing); we will find that
$$i 2 PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} - i 2 \pi \lambda = -i 2 \pi \sqrt{\lambda^2-1}$$
or, for $\lambda \gt 1$,
$$PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} = \pi \left ( \lambda - \sqrt{\lambda^2-1} \right )$$
For $\lambda \lt -1$, we may simply mirror the configuration for $\lambda \gt 1$, i.e., reverse direction and use the residue theorem, or introduce detours to the left of $x=-1$ in the figure. At this point, the reader can show that, for $\lambda \lt -1$,
$$i 2 PV \int_{-1}^1 dx \frac{\sqrt{1-x^2}}{\lambda-x} - i 2 \pi \lambda - i 2 \pi \sqrt{\lambda^2-1} = 0$$
Thus, to summarize,