While studying the heat equation, I ran into the following exercise:
Consider conservation of thermal energy $(2)$ for any segment of a one-dimensional rod $a\leq x\leq b$. By using the fundamental theorem of calculus,
$ \frac{\partial}{\partial b}\int_a^bf(x)\,dx=f(b),\tag{1} $
derive the heat equation $(3)$.
For this exercise, we have that
$\begin{align} \frac d{dt}\int_a^be(x,t)\,dx&=\varphi(a,t)-\varphi(b,t)+\int_a^bQ(x,t)\,dx,\tag{2}\\ c\rho\frac{\partial u}{\partial t}&=\frac\partial{\partial x}\left(K_0\frac{\partial u}{\partial x}\right)+Q.\tag{3} \end{align}$
I do not know how to tackle this problem. Any hint would be greatly appreciated. Also, I do not understand why $(1)$ has a partial derivative when $f$ is a function of a single variable.
Edit 1: Following celtschk's advice, I managed to rewrite $(2)$ as
$ \frac d{dt}\int_a^be(x,t)\,dx=\varphi(a,t)-\frac\partial{\partial b}\int_a^b\varphi(x,t)\,dx+\int_a^bQ(x,t)\,dx. $
Now, I suppose that I must get rid of the $\partial/\partial b$ and subtract $\varphi(a,t)$?
Edit 2 One could also rewrite $(2)$ as
$ \frac d{dt}\int_a^be(x,t)\,dx= - \frac{\partial}{\partial a} \int_a^b \varphi(x,t) dx -\frac\partial{\partial b}\int_a^b\varphi(x,t)\,dx+\int_a^bQ(x,t)\,dx. $
using the fact that $ \frac{\partial}{\partial a} \int_b^a \varphi(x,t) dx$. Is there a way to collect together the two terms with partial derivatives in order to get the desired $\int_a^b \frac{d \varphi}{dx} dx $ term in the heat equation?