# A question about the general solution to the infinite square well

I was working through Griffiths' Introduction to Quantum Mechanics, specifically the part about the 1D infinite square well potential (situated between $$x = 0$$ and $$x = a$$). To my understanding, this allows for multiple wave functions, each associated with a discrete level of energy:

$$\Psi_n(x, t) = \sqrt{\frac{2}{a}}\sin\left(\frac{n\pi}{a}x\right)\,e^{-i\frac{E_n}{\hbar}t}$$

where:

$$E_n = \frac{n^2\pi^2\hbar^2}{2a^2m}.$$

This is where it starts to get confusing to me. Does this mean that only one of these wave functions describes the particle state? Or is it that a general solution can be obtained by combining all the above possible wave functions to get the following one:

$$\Psi(x, t) = \sqrt{\frac{2}{a}}\sum_{n=1}^{+\infty}C_n\, \sin\left(\frac{n\pi}{a}x\right)\,e^{-i\frac{E_n}{\hbar}t}$$

This is how the textbook says the general solution is determined, but what's confusing me, in this case, are the $$C_n$$'s (the equation was taken directly from the book). How did they get here, even though they were not present in the first equations? And how are we to determine them?

• Hint (to see what the $C_n$ are): Calculate $(\Psi_n,\Psi)$, i.e. the scalar product between $\Psi_n(x,t)$ and $\Psi(x,t)$. Oct 3 at 14:35

I have now understood that the general solution is not simply a sum of the stationary states, but rather a LINEAR COMBINATION of the stationary states, thus the presence of the $$C_n$$'s.
I also understood that the way to compute the $$C_n$$'s is to use the orthogonality of the stationary states to get:
$$C_n = \int_0^a\Psi(x,0)\psi_n^*(x)dx$$