# What times zero is not zero

This was a test question that I got wrong and the professor did not explain it.

Given the second order equation Y''=-(Z^2)y, defined for 0<=x<=L.

a.) Verify that for any constants A and B, y=AsinZx+BcosZx.

b.) Find the value of Z, such that the solution satisfies the two conditions y(0)=0 and y(L)=0.

I got part A correct but had no clue what to do about part B.

• HINT: $\sin(n\pi)=0$ for integer $n$ – Mufasa May 10 '15 at 17:57

## 1 Answer

$y(0) = 0 \Rightarrow B = 0$. Then $y(L) = 0 \Rightarrow \sin(ZL) = 0 \Rightarrow ZL = k\pi$ for some integer $k$. Thus $Z = k\pi/L$ for some $k$.

Hence $\displaystyle y(x) = A\sin\left(\frac{k\pi}{L} x\right)$, for some integer $k$ and any constant $A$.