I should solve the heat equation:
$$ \frac{\partial }{\partial t}u(t,x) = \frac{\partial^2 }{\partial x^2} u(t,x) $$
with boundary conditions $u(t,0)=u_0, \: u(t,1)=u_1$ and initial condition $u(0,x)=u(x).$
My Solution:
Separation of Variables gives: $$ u(t,x)=w(t)y(x) \Rightarrow \frac{\partial }{\partial t}u(t,x) = \dot{w}(t)y(x); \: \frac{\partial^2 }{\partial x^2} u(t,x) = \ddot{y}(x)w(t)$$
From that we conclude:
$$ \frac{\dot{w}(t)}{w(t)} = \frac{\ddot{y}(x)}{y(x)} \overset{!}{=} - \lambda $$
Furthermore:
$$ w(t)=c_1 e^{-\lambda t}; \; y(x)=c_2cos(\sqrt{\lambda}x)+c_3sin(\sqrt{\lambda}x) $$
W.L.O.G.: $y(0)=u_0=y(1)=u_1=0$, from which follows, that:
$$ u(t,x) = c_1 e^{-(n\pi)^2t} c_3 sin(n\pi x)$$
My Question:
Why can I suppose without loss of generality: $y(0)=u_0=y(1)=u_1=0$?
There is a hint written: If $u(x,t)$ solves the heat equation so does $u(x,t)+a+bx.$ Use this to reduce the boundary conditions to the case $u_0=u_1=0.$
You cannot assume W.L.O.G ${u_0=u_1=0}$. The hint is there for that reason. Notice that letting ${u(x,t)=y(x,t)+u_0+(u_1-u_0)x}$, would give that ${u(0,t)=y(0,t) + u_0\Rightarrow y(0,t)=0}$, and ${u(1,t)=y(1,t)+u_1\Rightarrow y(1,t)=0}$. And plugging ${u(x,t)}$ into the PDE will show that ${y(x,t)}$ also satisfies the PDE. So now you can simply solve the PDE for ${y(x,t)}$ (which has nice homogeneous boundary conditions just as we'd want), and sub back in to ${u(x,t)=y(x,t)+u_0+(u_1-u_0)x}$ to find the general solution for ${u(x,t)}$