# Diffusion equation with non-homogeneous B.C. that depends on the local solution

given: $$\frac{\partial u}{\partial t} = \frac{\partial^2 u}{\partial x^2}$$ i.e. the (non-dimensionalized) diffusion equation, with: $$u(x=0,t)=f(t),~\textrm{where:}~\frac{df}{dt}=\left.\frac{\partial u}{\partial x}\right|_{x=0}~\textrm{and}~f(0)>0,\\ u(x\to\infty,t)=0,\\ u(x,t=0)=g(x),~\textrm{where}~g(0)>0$$ how do I proceed to solve this? I only need $f(t)$, not the full solution of $c(x,t)$. Is it possible to solve analytically? If not that's ok, but is there then a numerical way to solve it as an ODE in time for $f(t)$, rather than having to solve the full PDE in $x$ ant $t$? Any help would be greatly appreciated.