If I have the diffusion equation
$$ \frac{\partial u}{\partial t}-D \frac{\partial^{2}u}{\partial x^{2}}=f(x,t) $$ with the initial condition $$u(x, 0) = φ(x).$$
How would I prove that if $f$ and $φ$ are p-periodic in $x$, that is for some $p > 0$ the identities f(x+p, t) = f(x, t) and $φ(x + p)$ = $φ(x)$
hold for all x and t, then the solution is also p-periodic in x, i.e. $$u(x + p, t) = u(x, t)$$
Let $v(x, t) = u(x+p,t)-u(x,t)$, thus $v(x, 0)=0$ and $$ \frac{\partial v} {\partial t} -D \frac{\partial^2 v} {\partial x^2}=0 $$ from which we conclude that $v(x, t) =0$ and thus $u(x+p,t)=u(x,t)$.
Edit: (more detailed)
1) Using periodicity of initial condition $\phi$ to find initial condition for $v$ $$ v(x, 0)= u(x+p,0)-u(x,0) = \phi(x+p)-\phi(x) = \phi(x)-\phi(x) =0 $$
2) Using periodicity of source $f$ to find equation for $v$ \begin{align} \frac{\partial v(x,t)} {\partial t} &= \frac{\partial u(x+p,t)} {\partial t} - \frac{\partial u(x,t)} {\partial t}\\ &= D\frac{\partial^2 u(x+p,t)} {\partial x^2} +f(x+p,t) -D\frac{\partial^2 u(x,t)} {\partial x^2} -f(x,t)\\ &=D\frac{\partial^2 v(x,t)} {\partial x^2} + f(x,t) - f(x,t)\\ &=D\frac{\partial^2 v(x,t)} {\partial x^2} \end{align}
3) Uniqueness of solutions to the diffusion equation means that $v(x,t)=0$ is the only solution, and as such $u(x+p,t)=u(x,t)$