Suppose I have some integral $$\int_0^x \frac{f(y)}{\sqrt{x-y} }$$ How would I differentiate this with respect to $x$?
The Leibniz rule reads $$\frac{d}{dx} \int_0^x g(x,y) \ dy = g(x,x) +\int_0^x \frac{ \partial }{ \partial x} \frac{f(y)}{\sqrt{x-y}} \ dy$$
for $$g(x,y)=\frac{f(y)}{\sqrt{x-y}}$$
But here by letting $y=x$ I get division by $0$, undefined.
I tried some values of $f(y)$ like for example $f(y)=1$ for which the integral gives $2 \ \sqrt{x} $ whose derivative is defined everywhere but not at $0$.
So how would I differentiate this integral?
I will assume that $f(x)$ is continuously differentiable. Then for $x > 0$,
$$ \int_{0}^{x} \frac{f(y)}{\sqrt{x-y}} \, \mathrm{d}y = \stackrel{(y=xu)}= \int_{0}^{1} \frac{f(xu)\sqrt{x}}{\sqrt{1-u}} \, \mathrm{d}u, $$
and so, differentiating this with respect to $x$ and utilizing the Leibniz's rule gives
\begin{align*} \frac{\mathrm{d}}{\mathrm{d}x} \int_{0}^{x} \frac{f(y)}{\sqrt{x-y}} \, \mathrm{d}y &= \int_{0}^{1} \frac{\partial}{\partial x} \frac{f(xu)\sqrt{x}}{\sqrt{1-u}} \, \mathrm{d}u \tag{$y=xu$} \\ &= \int_{0}^{1} \frac{2uxf'(xu) + f(xu)}{2\sqrt{x}\sqrt{1-u}} \, \mathrm{d}u \\ &= \frac{1}{2x} \int_{0}^{x} \frac{2yf'(y) + f(y)}{\sqrt{x-y}} \, \mathrm{d}y \tag{$y=xu$} \end{align*}
Remark. The formula
$$\frac{1}{\sqrt{\pi}} \frac{\mathrm{d}}{\mathrm{d}x} \int_{0}^{x} \frac{f(y)}{\sqrt{x-y}} \, \mathrm{d}y$$
is the half-derivative of $f(x)$ in fractional calculus.