Question about Math of Superposition all.
I am currently reading through a quantum mechanics book, and I was struggling to understand an equation presented in the review of the mathematics. The part where I am discusses one-dimensional wave packets. It first presents the differential equation:
$$-\frac{\partial^2 u(x, t)}{\partial x^2} = \alpha i \frac{\partial u(x, t)}{\partial t}$$
With a solution of
$$u_k(x, t) = Be^{i(kx-\omega t)}$$
Any superposition of the possible solutions to the differential equation can be formed by taking
$$A_1 u_{k_1}(x, t) + A_2 u_{k_2}(x, t) + ...$$
where the A's are constant.
The book then goes on to say that the principle of superposition can be generalized to an integration over a continuum of solutions for various k:
$$f(x, t) = \int {A(k)u_k(x, t)dk}$$
However, I'm not sure how this is true, and the book does not seem to give any explanation. I looked around a little bit online to see if I could find an answer, but what I found did not seem to cover this part (or I possibly did not understand). Could anyone help me through this part?
As a side note, I don't formally study physics (I actually study chemistry at my university), however the physical chemistry course I took really piqued my interest in quantum mechanics. I don't mind difficult-to-understand answers, but be prepared for some possibly dumb questions on my part.
 A: Any solution of the form $u_k(x,t) \propto e^{i(kx-\omega t)}$ satisfies the differential equation, so we can construct a general solution from a linear combination  of $u_k(x,t)$ solutions where $k$ can take various values. For example, one possible solution is
$u(x,t) = A_1 e^{i(k_1 x- \omega_1 t)} + A_2 e^{i(k_2 x- \omega_2 t)} + A_3 e^{i(k_3 x- \omega_3 t)}$.
Note how $A_1$, $A_2$ and $A_3$ are distinct and associated with the complex exponentials of specific values of $k$, i.e. $A_1$ is the scaling constant associated with the exponential with a wavevector of $k_1$. Also, I distinguished the respective $\omega$ values as there usually is some relation between $\omega$ and $k$ (called a dispersion relation). You should be able to find it by plugging the complex exponential solution into the differential equation you have.
Anyway, an even more general representation would be to write the solution as an arbitrary sum over various $k$ values (which probably have their own corresponding $\omega$ values), i.e.
$u(x,t) = \sum_i A_i e^{i(k_i x - \omega_i t)}$
Note again how each scaling coefficient $A_i$ is indexed in a way that is associated with the $k$ values. In theory, this could sum over all possible $k$ values and we just have to choose the $A_i$ values carefully to reflect a particular solution, e.g. you could represent a plane wave state $A_0 e^{i(k_0x-\omega_0 t)}$ as the sum but setting all $A_i=0$ except for $A_0$ that corresponds to $k_0$.
We could go one step further and move from this discrete representation to a continuous one using an integral to represent the sum over possible values of $k$, i.e.
$u(x,t) = \int A(k) e^{i(kx-\omega(k)t)} dk$
Here the $A(k)$ again just represents the value of the scaling constant at a specific $k$ value and I've written the frequency explicitly as a function of $k$, i.e. $\omega(k)$, which is the dispersion relation obtained by a simple substitution of a general $e^{i(kx-\omega t)}$ into the differential equation.
Hopefully this answered your question - if you understand why a discrete sum represents a superposition of solutions, then going to an integral is just an additional step where we consider a continuous range of $k$ values that can be adopted rather than just discrete values. The idea of the superposition just comes from the fact that any $\textbf{linear combination}$ of the complex exponential plane wave solutions can satisfy the differential equation, since any individual plane wave solution satisfies the differential equation. (I can show this explicitly if you want, but I assumed your main query was about the integral representation).
A: Well, A wave packet is a superposition of many waves with different phases, in this case I can see that you have the index "k", I automatically associate it to the energy, then you must think about stationary states and not stationary states, the stationary states are those which have a defined energy, like when you solve the box problem, in this case you will have a free particle, and its wave function will be a linear combination of many waves, with different energies. That's why you can get your solution like an integral, since the energy is continuous, whereas in a box it can just take certain values. Another thing you have to take into account is that not all the wave functions are physical.That's what I understand about it, I'm not really an expert, please correct me if anyone can see a mistake.
A: If I understand your question, you are asking why you should believe that $f$ satisfies the differential equation.
So write the differential equation, substituting $f$ for $u$.  Then move the derivatives inside the integral sign.  Now the fact that every $u_k$ satisfies the differential equation tells you that the thing you are integrating on the left is equal to the thing you are integrating on the right, making the integrals equal as needed.
To do this, you need to justify moving the derivatives inside the integral sign, which you can't absolutely always do, but there are standard theorems in mathematics that allow you to do it under very general conditions.  Physicists are happy to assume that $f$ satisfies those conditions.
