Modify the derivation of the conservation laws to justify that the 1-D diffusion with source/sink admits the following form $u_t(x,t)=k u_{xx}(x,t)+f(x,t)$. $(u(x,t)$ represents the concentration of certain particles on R at spatial point x and time t. The flux $F(x,t)$ is given by the Fick's law, $F=-k u_x$. In addition, $f(x,t)$ is a source/ sink that shows the amount of particles added into/ taken away from the real line in the unit amount of time.
I know that to derive conservation laws, let M(t) be the total amount of particles in [a,b] at time t, then $M(t)= \int_a^b u(x,t) dx$
On the other hand, $\frac{dM}{dt}=flux in-flux out=F(a,t)-F(b,t)$
Combine these two, we have \begin{align} \\ \int_a^b u(x,t) dx=F(a,t)-F(b,t) \\ =-\int_a^b F_x(x,t) dx \\ \int_a^b u_t(x,t)+F_x(x,t) dx=0 \\ = u_t(x,t)+F_x(x,t)=0 \end{align}
I am not sure how to modify that for the question. A hint is appreciated.