This question concerns the separation of variables method. Let $u(x,t)$ be the solution of the diffusion equation $u_t=Du_{xx}+f(x,t)$ with initial data $u(x,0)=\phi(x)$ and boundary conditions $u_x(0,t)=u_x(1,t)=0$ for $t>0$. Assume $f(x,t)=1$ and $\phi(x)=1$. Can you give a solution without using separation of variables?
I have just did a problem that was identical to this, except with $f(x,t)=0$, in which I used the even-extension of the Fourier series to find the Fourier coefficients $a_0$ and $a_n$ for $u(x,t)$. I found out that $a_0$ happened to be equal to $1$, and $a_n=0$ for $n\in \Bbb{N}^+$. This gave the solution $u(x,t)=a_0=1$ for that particular problem. I am unsure how to solve the question with $f(x,t)=1$ though, appreciate any pointers I can get - thanks!