Deciding when to use $\mu^2$ or $-\mu^2$ in separation of variable (PDE'S) I have the following question 

Consider the two-dimensional PDE on $u = u(x,y)$ $$u_{xx}-u_{yy}=0$$ $$u(x,0)=\phi(x)$$ $$u_y(x,0)=0$$
  where  $\phi:\mathbb{R}\rightarrow \mathbb{R}$ is a function of one variable. Let $$\phi(x)=\frac{3}{10}x\;\;\; \text{if}\; 0\leq x\leq\frac{1}{3}$$ $$\phi(x)=\frac{3}{20}(1-x)\;\;\; \text{if}\; \frac{1}{3}\leq x\leq 1$$ 
  Show that if $x$ is restricted to the finite interval $[0, 1]$ and $u$ is additionally
  required to satisfy the boundary conditions
  $$u(0, y) = 0\;\; \text{and}\;\; u(1, y) = 0\;\;\; \forall y \in \mathbb{R}$$
  then the method of Separation of Variables gives a solution of the form
  $$u(x,y)=\sum_{n\geq 1} \alpha_n \sin(\beta_n x)\cos(\gamma_n y)$$
  Your answer should give precise formulae for the constants $\alpha_n, \beta_n, \gamma_n$.

Now I can start the question easily enough, getting to $$u(x,y)=f(x)g(y)$$ $$\Rightarrow f''(x)g(y)-f(x)g''(y)=0$$ $$\Rightarrow \frac{f''(x)}{f(x)}=\frac{g''(y)}{g(y)}$$ Now here is where I get stuck. My professor said to set this equation to a positive or negative constant squared. I understand why we do this but can never ascertain which sign to use. And I don't think it should matter but it does end up doing. If in this example I take $$\Rightarrow \frac{f''(x)}{f(x)}=\frac{g''(y)}{g(y)}=-\mu^2$$ Then the resulting equations give me $$f(x)=A_\mu\cos(\mu x)+B_\mu \sin(\mu x)$$ $$g(y)=C_\mu\cos(\mu y)+D_\mu \sin(\mu y)$$ Which seems to be on the right track. However taking $\mu^2$ gives me $$f(x)=A_\mu\cosh(\mu x)+B_\mu \sinh(\mu x)$$ $$g(y)=C_\mu\cosh(\mu y)+D_\mu \sinh(\mu y)$$ Which is clearly not the same path. So besides actually working through both paths is there anyway for me to spot $\textit{a priori}$ which version to use. Sorry for the long post.
 A: The full procedure is to set both sides equal to an arbitrary constant $\lambda$. Then we have to solve $f''(x) = \lambda f(x)$ with the boundary conditions $f(0)=f(1)=0$, and there are three cases:


*

*$\lambda > 0$ gives the hyperbolic case, and (as you can check for yourself) the only function in this family of solutions which satisfies the boundary conditions is $f(x)=0$, which is uninteresting since we're looking for basis functions to use as building blocks for more complicated solutions. 

*$\lambda = 0$ gives $f''(x)=0$, so $f(x)=Ax+B$. Again only $f(x)=0$ satisfies the boundary conditions, so nothing interesting here either.

*$\lambda < 0$ gives the trigonometric case, where (for some particular values of $\lambda$) we can actually find some nontrivial solutions satisfying the boundary conditions.


With experience, one recognises that it's only the third case that gives anything interesting, and goes directly to that case (writing $\lambda = -\omega^2$ for convenience).
(But be careful! If the problem would be different so that the boundary conditions were $f'(0)=f'(1)=0$ instead, then there is also an important contribution from the middle case $\lambda=0$ which mustn't be forgotten!)
