I am ready the 101 page of the book [1], and I have a doubt. How I will be able to say: If $\sigma=\sum_{i=1}^{L}\int_{t_i}^{t_{i+1}}(u-r_i)^2p(u)du=0$; where $u$ is a scalar random variable with continuos density function $p(u)$. Then
$\dfrac{\partial \sigma}{\partial t_k}=(t_k-r_{k-1})^2p(t_k)-(t_k-r_k)^2p(t_k)=0?$
I begin first each each summand equal to zero, then a one summand of $\sigma$ is $\sigma_i=\int_{t_i}^{t_{i+1}}u^2p(u)du-2r_i\int_{t_i}^{t_{i+1}}up(u)+r_i^2\int_{t_i}^{t_{i+1}}p(u)du$
[1] Anil Jain, Fundamentals of Digital Image Processing.