Differentiating through this integral in banking loans?
In generic notation, we examine

$$\frac {d}{df} \left(\frac {f(x)}{\int_0^1 f(x) dx}\right)$$ 

Note that we take the derivative with respect to $f$ not with respect to $x$. Applying the standard rules we have

$$\frac {d}{df} \left(\frac {f(x)}{\int_0^1 f(x) dx}\right) = \frac{\int_0^1 f(x) dx-f\cdot \left[\frac{d}{df}\int_0^1 f(x) dx\right]}{\left(\int_0^1 f(x) dx\right)^2}$$

But

$$ \frac{d}{df}\int_0^1 f(x) dx = 0$$

because this definite integral, having specific values as integration limits, is a number, a constant, not a function. So we end up with 

$$\frac {d}{df} \left(\frac {f(x)}{\int_0^1 f(x) dx}\right) = \frac {1}{\int_0^1 f(x) dx}$$

that validates the obtained f.o.c.   

Leibniz rule for differentiating under the integral sign does not enter the picture here.