How do you sum difference between two values of a function separated by an infinitesimal? I have a function, $n_p(T)$ that gives me the number of protons at a given temperature.  I would like to calculate the difference between the number of protons at a given temperature, $T_1$ and the number of protons at an infinitesimally small interval away, $T_2=T_1+\Delta T$, and then I'd like to sum the differences over a range of temperatures.
Conceptually, what I want to do is this:$$G=\sum_{T=\infty}^{0} \left(n_p(T)-n_p(T+\Delta T)\right)$$Where the summation occurs in steps of $\Delta T$.

Is there an analytical solution to this problem?  Of so, what is it?
 A: I'm a little confused because your picture and summation notation suggest that temperature values are going down, but it doesn't really affect the calculation.
Suppose we care about a range of temperatures from $a$ to $b$. Then for each step size $\Delta T$ (with $\left|\Delta T\right|\le\left|b-a\right|$), we can take the sum $G\left(\Delta T\right)=\left(n_{p}(b)-n_{p}\left(b+\Delta T\right)\right)+\left(n_{p}\left(b+\Delta T\right)-n_{p}\left(b+2\Delta T\right)\right)+\cdots$ where the sum has finitely many terms and the last term is $\left(n_{p}\left(b+(k-1)\Delta T\right)-n_{p}\left(b+k_{\Delta T}\Delta T\right)\right)$ where $k_{\Delta T}$ is the biggest integer it can be so that $b+k_{\Delta T}\Delta T$ is still between $a$ and $b$.
Well, since addition of finite sums is associative, we can rewrite $G(\Delta T)=n_{p}(b)+\left(-n_{p}\left(b+\Delta T\right)+n_{p}\left(b+\Delta T\right)\right)+\cdots-n_{p}\left(b+k_{\Delta T}\Delta T\right)$ so that this sum telescopes down to $n_{p}(b)-n_{p}\left(b+k_{\Delta T}\Delta T\right)$. Note that $b+k_{\Delta T}\Delta T$ must be within $\Delta T$ of $a$ as otherwise we could have made $k_{\Delta T}$ even bigger. So if $\Delta T$ is very small, $b+k_{\Delta T}\Delta T$ is very close to $a$. Assuming that $n_{p}\left(T\right)$ is given by a continuous curve, this means that as $\Delta T$ gets very small, the sum $G\left(\Delta T\right)$ is very close to $\boxed{n_{p}(b)-n_{p}(a)}$.
Incidentally, these ideas are essentially a form of the Fundamental Theorem of Calculus since $n_{p}\left(T^*\right)-n_{p}\left(T^*+\Delta T\right)=-\dfrac{n_{p}\left(T^*+\Delta T\right)-n_{p}\left(T^*\right)}{\Delta T}\Delta T\approx-\left.\dfrac{\mathrm dn_p}{\mathrm dT}\right|_{T=T^*}\Delta T$ and we're basically integrating this over the range of temperatures.
A: $n_p(T) - n_p(T + dt)$ is infinitesimal, and so when you multiply it by the infinitesimal $dt$ you won't get a sensible integral.
