Errrr... That trick you tried does not apply here. For the method of separation of variables, set u(x,t)=X(x)T(t) to construct two ODEs, then add up all the solutions. It must be in your notes.
Question: Solve the wave equation (1) on the region 0<x<2 subject to the boundary conditions (2) and the initial condition (3) by separation of variables.
I've defined where u_st is the steady state solution (the solution to subject to (2)). I've used this to create a new PDE with homogeneous boundary conditions.
The PDE is:
By subbing in I get:
I'm not sure how to separate this into two ODEs. Can someone help?