# Problem with changing the boundary conditions of pde

Solve the equation $u_t=u_{xx}$, $x\in[\pi,\pi]$. Subject to $u(x,0)=0$, $u(\pi,t)-u(-\pi,t)=2\pi$, $u_x(\pi,t)-u_x(-\pi,t)=0$.

So I started this solving this via the method of separation of variables. If we let $u(x,t)=f(x)g(t)$ we find two ordinary differential equations

\begin{align} g'(t) + \lambda g(t)=0, \\ f''(x) + \lambda f(x)=0. \end{align}

However I want to write the boundary conditions for $u$ in a form usable by $f$. How can I do this?

I tried:

$$u(\pi,t)-u(-\pi,t)=f(\pi)g(t)-f(-\pi)g(t)=2\pi,$$ $$u_x(\pi,t)-u_x(-\pi,t)=f'(\pi)g(t)-f'(-\pi)g(t)=0\implies f'(\pi)=f'(-\pi).$$

but how do I get rid of the $g(t)$ in the first boundary condition?

Try a change of variable. Let $v=u-x$. Then the PDE becomes $$v_t=v_{xx}, v(x,0)=-x, v(\pi,t)-v(-\pi,t)=0, v_x(π,t)−v_x(−π,t)=0$$
Now you can solve the new PDE without involving the nonhomogeneous $g(t)$ for the boundary conditions.