[Physics] Free particle and infinite well, why do solutions proceed differently

quantum mechanicsschroedinger equationwavefunction

When one solves the Schrodinger's equation (I completely neglect the time part of wave function in all text) for a free particle, one ends up with fundamental system (for space variable):
$$FS=\{e^{ikx},e^{-ikx}\}$$ and thus one should write the general solution for the spatial part of wave function as:
$$\psi(x)=Ae^{ikx}+Be^{-ikx}$$
I have not seen this done anywhere. Every text ends up with fundamental system, and takes the individual exponentials as particular solutions and recasts it:
$$\psi(x)=e^{\pm i k x} = e^{ipx/\hbar}\,,$$
where $p\equiv\pm \hbar k$. I should mention even before starting out, the texts like to say as energy is non-negative, thus they can denote $k^2=\frac{\hbar^2}{2m}E$ and then they claim that $k$ is a real non-negative number (why? I have no idea)

To construct the general solution they say, that any solution can be a linear combination of the $e^{ipx/\hbar}$. Ie:
$$\psi(x)=\frac{1}{\sqrt{2\pi\hbar}}\int_{-\infty}^{+\infty} c(p) e^{ipx/\hbar}\,{\rm d}p$$
(yes the integrand should have the time part here, but this is irrelevant for my mental problem).

On the other hand, when the text go on to solve infinite potential well, they at first glance do something completely different, despite the problem, within the well, is the very same, ie. within the well, one solves the very same differential equation which also gives the fundamental system as above. But in this case, they say, that the general solution is :
$$\psi(x)=Ae^{ikx}+Be^{-ikx}$$
and then they go on to show quantization arising from boundary conditions (but this is no longer interesting to me now).

What I cannot seem to be able to understand is the seemingly different approach to the very same problem (again quantization is something that happens after one says that one takes such and such general solution).
I am not stating that something is wrong, I just cannot reconcile the different approaches, ie. why in the case of free particle does one takes only the particular solutions (the fact that they are eigenfunctions of impuls operator and the general solution is not, is not a good reason, I think, just a convenient consequence) and in the case of infinite well, the solution proceeds as it (from my perspective) should, getting a general solution.

Best Answer

This question is fundamentally about how to label the solutions to eigenvalue problems, and it's largely a notation issue.$^{[a]}$

Eigenvalue problem

The generic eigenvalue problem is $$T \left \lvert \lambda \right \rangle = \lambda \left \lvert \lambda \right \rangle$$ where $T$ is a linear transformation, $\lambda$ is the eigenvalue, and $\left \lvert \lambda \right \rangle$ is the eigenvector. When working with a particular linear transformation, it's very common to label vectors by their eigenvalues under that transformation.

Suppose we find two solutions $\left \lvert \lambda_1 \right \rangle$ and $\left \lvert \lambda_2 \right \rangle$ that both satisfy the equation and with the same eigenvalue, i.e. $$T \left \lvert \lambda_1 \right \rangle = \lambda \left \lvert \lambda_1 \right \rangle \quad \text{and} \quad T \left \lvert \lambda_2 \right \rangle = \lambda \left \lvert \lambda_2 \right \rangle \, .$$ Because $T$ is linear, any weighted sum of $\left \lvert \lambda_1 \right \rangle$ and $\left \lvert \lambda_2 \right \rangle$ is also a solution: $$ T\left( a \left \lvert \lambda_1 \right \rangle + b \left \lvert \lambda_2 \right \rangle\right) = a T \left \lvert \lambda_1 \right \rangle + b T \left \lvert \lambda_2 \right \rangle = a \lambda \left \lvert \lambda_1 \right \rangle + b \lambda \left \lvert \lambda_2 \right \rangle = \lambda (a \left \lvert \lambda_1 \right \rangle + b \left \lvert \lambda_2 \right \rangle)\, . $$

Free particle

In this case, we want to solve the eigenvalue problem $$\left( -\frac{\hbar^2}{2m} D_x^2\right) \left \lvert \psi \right \rangle = E \left \lvert \psi \right \rangle \tag{$\star$}$$ where $D_x$ means "derivative with respect to $x$. We can rewrite this equation in the $x$ basis if we want, by taking the inner product of both sides with $\left \langle x \right \rvert$: \begin{align} \left \langle x \right \rvert \left( -\frac{\hbar^2}{2m} D_x^2\right) \left \lvert \psi \right \rangle &= \left \langle x \right \rvert E \left \lvert \psi \right \rangle \\ \left( - \frac{\hbar^2}{2m} \right)\frac{d^2}{dx^2} \psi(x) &= E \psi(x) \end{align} where we defined $\psi(x) \equiv \left \langle x \right \rvert \psi \rangle$. This is the usual form of the Schrodinger equation, written in the position basis. It's clear that this is a linear transformation because the derivative itself is linear, i.e. $D_x^2(f + g) = D_x^2 f + D_x^2 g$.

There are two solutions to this equation: $$\exp \left(i \frac{\sqrt{2mE}}{\hbar} x \right) \quad \text{and} \quad \exp \left(-i \frac{\sqrt{2mE}}{\hbar} x \right) \, .$$ It's convenient to define $k \equiv \sqrt{2mE}/\hbar$ and write the two solutions as $\exp \left( \pm i k x \right)$. Note that these vector solutions to equation $(\star)$ are written in the $x$ basis. We could more generally write them as $\left \lvert \pm k \right \rangle$, in which case $ \left \langle x | k \right \rangle = \exp(i k x) \equiv \psi_k(x) \, .$


Spectral theorem

It is also the case that the eigenvalues of a Hermitian linear transformation form a basis for the vector space. This is called the spectral theorem.


The linear operator $D_x^2$ is Hermitian (either take my word or check it yourself!). Therefore, from the spectral theorem, we know that can write any quantum state as a weighted sum of $\left \lvert k \right \rangle$ states: \begin{align} \left \lvert \psi \right \rangle &= \int_{-\infty}^\infty \frac{dk}{2\pi} \underbrace{\tilde \psi(k)}_\text{weights} \left \lvert k \right \rangle \\ \langle x \left \lvert \psi \right \rangle &= \int_{-\infty}^\infty \frac{dk}{2\pi} \tilde \psi(k) \left \langle x \lvert k \right \rangle \\ \psi(x) &= \int_{-\infty}^\infty \frac{dk}{2\pi} \tilde \psi(k) e^{ikx} \, . \tag{$\star \star$} \end{align} The sum goes over negative and positive values of $k$ because both $\left \lvert k \right \rangle$ and $\left \lvert -k \right \rangle$ are distinct, linearly independent eigenvectors in the basis set. If we want a wave function $\left \lvert \psi \right \rangle_E$ that has a particular value of $E$, then we'd restrict to just those values of $k$ that match the desired value of $E$, i.e. defining a new symbol $K = \sqrt{2mE}/\hbar > 0$, we'd have $$\left \lvert \psi \right \rangle_E = \tilde \psi(K) \left \lvert K \right \rangle + \tilde \psi(-K) \left \lvert -K \right \rangle \, . \tag{$\star \star \star$}$$

Now let's qnswer your questions

and thus one should write the general solution for the spatial part of wave function as: $$ \psi(x)=A e^{ikx} + Be^{−ikx}$$

Yes, that's the general solutions. If $k = \sqrt{2mE}/\hbar$, then what you've written there is the general solution to the free particle Schrodinger equation with eigenvalue $E$.

I have not seen this done anywhere.

Well, at least you've seen it in Equation $(\star \star \star)$. Start with $(\star \star \star)$, define $A\equiv \tilde \psi(K)$, $B \equiv \tilde \psi(-K)$, change notation $K \to k$, and take the inner product of both sides with $\left \langle x \right \rvert$ to get exactly the same equation as you expected.

Every text ends up with fundamental system, and takes the individual exponentials as particular solutions and recasts it: $$ \psi (x)= e^{\pm ikx} = e^{ipx/\hbar} \, ,$$ where $p\equiv \pm \hbar k$.

That's the textbook author being sloppy and imprecise. In this case, the author is using the symbol $\psi(x)$ to indicate "one single term in the expansion of the wave function $(\star \star)$ for a given energy $E=\hbar^2 k^2 / 2m$". The author may be doing this because they are thinking of a particle moving in a particular direction for some physical reason, e.g. perhaps they are thinking of a particle wave being emitted from a source.

I should mention even before starting out, the texts like to say as energy is non-negative, thus they can denote $k^2=\hbar^2 2mE$ and then they claim that $k$ is a real non-negative number (why? I have no idea)

This is, again, a notational sloppiness. In $(\star \star)$, we have a sum over all positive and negative $k$. However, we can rewrite $(\star \star)$ like this: \begin{align} \psi(x) &= \int_{-\infty}^\infty \frac{dk}{2\pi} \tilde \psi(k) e^{ikx} \\ &= \int_{-\infty}^0 \frac{dk}{2\pi} \tilde \psi(k) e^{ikx} + \int_0^\infty \frac{dk}{2\pi} \tilde \psi(k) e^{ikx} \\ &= \int_0^\infty \frac{dk}{2\pi} \tilde \psi(-k) e^{-ikx} + \int_0^\infty \frac{dk}{2\pi} \tilde \psi(k) e^{ikx} \\ &= \int_0^\infty \frac{dk}{2\pi} \left( \tilde \psi(k) e^{ikx} + \tilde \psi(-k) e^{-ikx} \right) \, .\\ \end{align} In the final line, we're summing only over positive values of $k$, but we have two terms in the sum, one with a $+k$ and one with a $-k$. Authors some times do this implicitly without telling you, which is confusing and stupid and on behalf of physicists everywhere I apologize for this sloppy terrible habit.

There is a nice reason to write things this way though. We now have an integral that runs over each energy exactly once, and for each energy has two components: one move left and one moving right. This may in some cases be a convenient way to write the general wavefunction, particularly if you know your particles are all coming from one direction and you want to write the wavefunction as a sum over energies.

Particle in a well

As you noted in the question, the approach to the bound particle already makes sense.

Fin

What I cannot seem to be able to understand is the seemingly different approach to the very same problem ... I just cannot reconcile the different approaches

It's just authors being sloppy.


$[a]$: For whatever it's worth, this exact issue confused me so much that I eventually stopped paying any attention to the details of any book's notation and just used them as a guide while developing my own notes and notation.