Matching coefficients Fourier series when RHS and LHS have different periods

166 Views Asked by At

I'm looking through my notes from a couple of lectures back, and there is an example that I don't really understand.

The example is to solve the wave equation $$\frac{\partial^2u(x,t)}{\partial t^2}=\frac{\partial^2u(x,t)}{\partial x^2}$$ given $$u(-1,t)=0,\quad u(1,t)=2,\quad u(x,0)=\begin{cases} \frac{3}{2}, &-1< x \leq 0\\ \frac{1}{2},&\phantom{-} 0< x\leq 1 \end{cases},\quad \frac{\partial u(x,0)}{\partial t}=0.$$

Since this is non-homogeneous we set $v(x,t)=u(x,t)-(1+x)$, and solve it. My problem is at the end (I can provide more details if you prefer). At the end we get $$v(x,0)=\sum^\infty_{n=0}(a_n\cos\Bigl(\frac{n\pi x}{2}\Bigr)+b_n\sin\Bigl(\frac{n\pi x}{2}\Bigr)=\begin{cases}1/2, &-1<x\leq0, \\ -1/2,&\phantom{-} 0<x\leq1. \end{cases}$$ Now we Fourier series expand the right hand side and since it is odd we get the following $$v=\sum^\infty_{n=1}-\frac{\sin(2n+1)\pi x}{\pi (2n+1)}$$.

Now to my question. Usually we set the RHS and LHS equal, and match the coefficients, but how can we match the match the coefficients since the left hand side and the right hand side have different periodicity?