Finite, square, potential well Lets say we have a finite square well symetric around $y$ axis (picture below). 

I know how and why general solutions to the second order ODE (stationary Schrödinger equation) are as follows for the regions I, II and III.
\begin{align}
\text{I:}& & \psi_{\text{I}}&= Ae^{\kappa x} \\
\text{III:}& & \psi_{\text{III}}&= Be^{-\kappa x} \\
\text{II:}& & \psi_{\text{II}}&= C \cos(k x) + D\sin(kx)
\end{align}
But now i got to a point where i have to start applying a boundary conditions to get a speciffic solution. So i start with the 1st boundary condition which is $\psi_{\text{I}}\left(-\frac{d}{2}\right)=\psi_{\text{II}}\left(-\frac{d}{2}\right)$ for the left potential shift and $\psi_{\text{II}}\left(\frac{d}{2}\right)=\psi_{\text{III}}\left(\frac{d}{2}\right)$ for the right potential shift. These leave me with a system of 2 equations (one for left and one for right potential shift): 
\begin{align}
{\scriptsize\text{left potential shift:}}& & Ae^{-\kappa \frac{d}{2}} &= C \cos\left(k\tfrac{d}{2}\right) - D\sin\left(k \tfrac{d}{2}\right)\\
{\scriptsize \text{right potential shift:}}& & Be^{-\kappa \frac{d}{2}} &= C \cos\left(k\tfrac{d}{2}\right) + D\sin\left(k \tfrac{d}{2}\right)\\
\end{align}

Question 1:
From here on authors of most books don't seem to explain much. Most of them only say that we must use $\boxed{C\!=\!0}$ to solve for odd solutions and $\boxed{D\!=\!0}$ to solve for even solutions. What is this argument based on?
 A: The short answer: your Hamiltonian commutes with the parity operator. Therefore, the eigenfunctions which diagonalize the Hamiltonian can be searched within the eigenfunctions diagonalizing the parity operator, which are the sets of even and odd functions. Hence, you can use the condition $C=0$ to look for the odd solutions since $\sin(x)$ is odd, and $D=0$ to look for the even solutions since $\cos(x)$ is even. 
This result is natural since the square well potential is even $V(x)=V(-x)$ and therefore we have
$$H\psi(x)=E\psi(x)$$
$$H\psi(-x)=E\psi(-x)$$ 
Using linearity, symmetric and antisymmetric combinations of eigenfunctions will also be solutions. These correspond to even and odd parity solutions respectively.
The long answer: the first thing I want you to note is that, as the Schrödinger equation is a second order differential equation, there are two boundary conditions. In this case, the usual choice is to solve the equation for Cauchy boundary conditions in which the value of the wavefunction and the derivative at boundary are specified. Hence you need to match
$$ 
\psi_I \left(-\dfrac{d}{2}\right)=\psi_{II} \left(-\dfrac{d}{2}\right)
$$
$$ 
\psi'_I \left(-\dfrac{d}{2}\right)=\psi'_{II} \left(-\dfrac{d}{2}\right)
$$
and similar at the right side $x=d/2$.
Considering the left side of the well, you get 
$$ A \exp[-\kappa d/2]= C \cos(kd/2)-D\sin(kd/2)$$
$$ \kappa A \exp[-\kappa d/2]= k C\sin(kd/2)+kD\cos(kd/2)$$
Dividing both expressions, one gets
$$ \dfrac{\kappa}{k}=\dfrac{C \cos(kd/2)-D\sin(kd/2)}{C\sin(kd/2)+D\cos(kd/2)}$$
Performing the same calculation for the other side, we get
$$ \dfrac{\kappa}{k}=\dfrac{C \cos(kd/2)+D\sin(kd/2)}{C\sin(kd/2)-D\cos(kd/2)}$$
Equating both expressions gives, after some algebra, the condition
$$CD=-CD$$
which assures you that you can look for odd /even solutions separately since either $C$ or $D$ but not both must be zero.
