Even and odd solutions to Schrödinger equation

There's a problem in Griffiths' QM text that has you find the allowed energies for a particle in an infinite potential well with a dirac delta potential at $x=0$. In solving this problem, we should look for even and odd solution separately.

One worked solution I've seen uses two wave functions,

$\psi (x) = A \cos k x + B \sin k x$

$\psi (x) = - A \cos k x + B \sin k x$

for the even solutions and

$\psi (x) = A \cos k x + B \sin k x$

$\psi (x) = A \cos k x - D \sin k x$

for the odd ones.

Edit: I think my problem is best rephrased "where do the even/odd solutions come up?". I went back and did it all just assuming a solution of $\psi (x) = A \cos k x + B \sin k x$ and $\psi (x) = C \cos k x + D \sin k x$ and only came out with the even solutions. I have no idea how we arrive at the odd ones. The condition that the cosine coefficient should be 0 makes no sense to me.

• It'd be better if you showed your complete derivation of the solution. Otherwise it's only possible to guess where you lost half of the solutions. Mar 1 '17 at 9:23
• Could you please state the original question? Without context, one is hard to infer what even and odd solutions mean here.. Mar 1 '17 at 12:54

Even and odd solutions come up as follows. Suppose $\psi_1(x)$ is a solution to $$-\frac{\hbar^2}{2m}\frac{d^2\psi_1(x)}{dx^2}+V(x)\psi_1(x)=E_1\psi_1(x)$$ and make the change $x\to -x$ every where. Then $$\frac{d}{d(-x)}=-\frac{d}{dx}\, ,\qquad \frac{d^2}{d(-x)^2} =\frac{d^2}{dx^2}$$ so we get $$-\frac{\hbar^2}{2m}\frac{d^2\psi_1(-x)}{dx^2}+V(-x)\psi_1(-x)=E_1\psi_1(-x)$$ If you potential is symmetric, then $V(-x)=V(x)$ and you can see that $\psi_2(x):=\psi_1(-x)$ is also solution to the problem for the same potential. Since $\psi_1(x)$ and $\psi_2(x)$ have the same eigenvalue $E_1$, then it is easy to see that $$\phi(x)=A\psi_1(x)+B\psi_2(x)=A\psi_1(x)+B\psi_1(-x)$$
is also a solution with energy $E_1$. The even solution is the choise $A=B$: in this case $\phi_+(x)=A (\psi_1(x)+\psi_1(-x))=\phi_+(-x)$, defining an even function. The odd solution $\phi_-(x)$ is obtained using $B=-A$; it satisfies $\phi_-(-x)=-\phi_-(x)$. Thus, in a symmetric potential for which $V(x)=V(-x)$, it is always possible to find even or odd solutions to the problem.
In your specific case, you're better off starting with $$\psi(x)=\left\{\begin{array}{ll} A\sin(k(x+L))&\hbox{if }x<0\, ,\\ B\sin(k(x-L))&\hbox{if }x>0\, .\end{array}\right.$$ This form guarantees $\psi(-L)=\psi(L)=0$ if your walls are at $x=\pm L$. You can probably expand the argument of each sine to get a sine and a cosine combination but this form makes it obvious that you will satisfy the boundary conditions.
The parity of the solution will come in when you relate $A$ and $B$. For instance, taking $x\to -x$ changes $A\sin(k(x+L))\to A\sin(k(-x+L))=-A(\sin(k(x-L))$ while $B\sin(k(x-L))\to -B\sin(k(x+L))$ so the even solution is with $B=-A$. You then need to find $k$ using the discontinuity of the derivatives