# PDE with oscillating boundary conditions

## Main Question or Discussion Point

Hi,

Say I have this pde:

$u_t=\alpha u_{xx}$
$u(0,t)=\sin{x}+\sin{2x}$
$u(L,t)=0$

I know the solution for the pde below is v(x,t):

$v_t=\alpha v_{xx}$
$v(0,t)=\sin{x}$
$v(L,t)=0$

And I know the solution for the pde below is w(x,t)

$w_t=\alpha w_{xx}$
$w(0,t)=\sin{2x}$
$w(L,t)=0$

Would the complete solution be u(x,t)=v(x,t)+w(x,t)?

Your first boundary conditions are screwed up: the left side is a function of t and the right side is a function of x. Assuming you fix that, then yes, functions satisfying pieces of the boundary conditions can be added together just as you've done. You can confirm thus just by substituting $u$ into the original PDE and using the linearity of differentiation.
I was worried I was doing it wrong. I meant to write $u(0,t)=\sin{t}+\sin{2t}$ , ...