How is the initial condition term $\frac{1}{\sqrt{2\pi}}\phi(k)$ derived for free particles? I'm reading Griffiths' introduction to quantum mechanics. It is explained that solutions to the Schrodinger equation are expressed as linear combinations of separable solutions $\{\psi_n(x)\}$.
$$\Psi(x,0)=\sum_{n=1}^{\infty}c_n\psi_n(x)e^{-i\frac{E_n}{\hbar}t}$$
While I understand that $c_n$ represents the wavefunction's initial conditions at $t=0$, its analogue in the case of a free particle $\phi(k)$ baffles me.
Correct me if I'm wrong. According to Griffiths, the  transition from
$$\Psi_k(x,t)=A\exp\bigg[i\bigg(kx-\frac{\hbar k^2}{2m}t\bigg)\bigg]\implies\Psi(x,t)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\phi(k)\exp\bigg[i\bigg(kx-\frac{\hbar k^2}{2m}t\bigg)\bigg]dk$$
is written in a way so that the $\Psi(x,t)$ is now normalizable. However, the free particle cannot exist in a stationary state and, hence, no longer has a definite energy, so each term does not represent anything physical since $k$ is continuous.
My question is: can someone can clarify why this integral is evaluated with respect to $k$ instead of $x$ unless Plancherel's theorem is applied for $\phi(k)$?
$$\phi(k)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\Psi(x,0)e^{-ikx}dx$$
My other question is can someone explain where the constant $1/\sqrt{2\pi}$ comes from in the following analogue (I'm not that familiar with Fourier analysis)?
$$c_n\rightarrow\frac{1}{\sqrt{2\pi}}\phi(k)$$
 A: Interpreting the Fourier transform as an expansion in a basis
Ignore the time-dependence for the moment. Some pure maths stuffs from Fourier analysis allows us to write any square-integrable function $f(x)$ in the form
$$
f(x) = \int_{-\infty}^{\infty}dk\,\tilde{f}(k)\frac{e^{ikx}}{\sqrt{2\pi}}
 = \int_{-\infty}^{\infty}dk\,\tilde{f}(k)\psi_k(x)\,,
$$
where
$$
\tilde{f}(k) = \int_{-\infty}^{\infty}dx \,f(x)\frac{e^{-ikx}}{\sqrt{2\pi}}
 = \int_{-\infty}^{\infty}dx\,\psi_k^*(x){f}(x)\,.
$$
This is essentially a statement of Plancherel's theorem.  Now, we can come to a linear-algebraic interpretation of these two statements by comparing what we've done to the case for for discrete (or even finite-dimensional) spaces.  The idea is that we interpret the first integral as an expansion in a basis (the basis being the free-particle eigenstates, which are plane waves) and the second integral as the formula for computing these coefficients. (There really is a dual relationship here, though, in the sense that we can just as easily interpret them in the opposite way, with the second being an expansion in a basis and the first being the coefficients, but leave that be for now.)
Here is the comparison. For the case of a discrete basis, we have a set of normalized basis functions $\psi_n(x)$, and we can expand an arbitrary square-integrable function $f$ as a linear combination
$$
f(x) = \sum_n c_n\psi_n(x)\,,
$$
where
$$
c_n = \int_{-\infty}^{\infty}dx\, \psi_n^*(x)f(x)\,.
$$
We compare directly the forms as follows:
\begin{align*}
\begin{array}{ccccc}
f(x) & =& \displaystyle\int_{\infty}^{\infty} dk & \tilde{f}(k) & \psi_k(x)\\[1em]
f(x) & =& \displaystyle\sum_n & c_n & \psi_n(x)
\end{array}
\end{align*}
and
\begin{align*}
\begin{array}{ccccc}
\tilde{f}(k)& =& \displaystyle\int_{\infty}^{\infty} dx & \psi_k^*(x) & f(x)\\[1em]
c_n & =&\displaystyle\int_{-\infty}^{\infty}dx & \psi_n^*(x) & {f}(x)
\end{array}
\end{align*}
We can see that the sum over $k$ corresponds to the sum over $n$, the function $\tilde{f}(k)$ corresponds to $c_n$ (so really it's  an expansion coefficient), and the basis function $\psi_k(x)=\frac{e^{ikx}}{\sqrt{2\pi}}$ corresponds to the basis element $\psi_n(x)$.  This should make the correspondence clear. The first set of expressions represent expansions of $f$ in an "orthonormal basis", and the second set of expressions represent the computation of the expansion coefficients.  (Note importantly that the factor of $1/\sqrt{2\pi}$ is not grouped with the expansion coefficient but instead goes along with the complex exponential! The reason why we group the $\sqrt{2\pi}$ together with the exponential will be explained below.)
The expansion of an initial state in the energy-eigenbasis of the free-particle
Now, suppose we are considering a free-particle system, in which case the eigenstates of the Hamiltonian are given by
$$
\psi_k(x) = \frac{e^{ikx}}{\sqrt{2\pi}}\,,
$$
where the corresponding eigenvalue is indexed by $k$ and is given by
$$
E_k=\frac{\hbar^2k}{2m}\,.
$$
These are states of well-defined and definite energy (modulo the problem of them being non-normalized, but deal with that later). According to the prescription for how we solve the time-dependent Schrodinger equation, given an initial state $\Psi(x,0)$, we expand it in the energy eigenstates as
$$
\Psi(x,0) = {"{\sum_k}"}c_k \psi_k(x)\,,
$$
and tack on the time-dependence in the usual way to get
$$
\Psi(x,t) = {"{\sum_k}"}c_k \psi_k(x)e^{-iE_kt/\hbar}\,.
$$
However, we don't have a discrete basis, so what really have is
$$
\Psi(x,0) =  \int_{-\infty}^{\infty}dk\,\tilde{\Psi}(k,0)\psi_k(x)
\Longrightarrow
\Psi(x,0) =  \int_{-\infty}^{\infty}dk\,\tilde{\Psi}(k,0)\psi_k(x)e^{-iE_kt/\hbar}\,
$$
where $E_k$ is as above and $\tilde{\Psi}(k,0)$ is computed as explained above. (As a matter of notation, I have used $\tilde{\Psi}(k,0)$ for what the OP--and Griffiths--calls $\phi(k)$ in order to make it clear that this "function" is really the set of expansion coefficients of the state $\Psi(x,0)$ in the free-particle basis.) This reduces to the OP's--and Griffith's--expression if we plug in $\frac{e^{ikx}}{\sqrt{2\pi}}$ for $\psi_k(x)$.
The choice of normalization
The reason that the $\sqrt{2\pi}$ is there is to ensure that the state is "normalized" in the continuous-variable sense. That is, since
$$
\delta(k-k') = \int_{-\infty}^{\infty}dx\,\frac{e^{-i(k-k')x}}{2\pi}\,,
$$
is a representation of the Dirac-delta function, then we can write that the inner product of two such free-particle eigenstates is
$$
\langle\psi_{k}|\psi_{k'}\rangle
=\int_{-\infty}^{\infty}dx\,\psi_k^*(x)\psi_{k'}(x)
=\int_{-\infty}^{\infty}dx\,\left(\frac{e^{ikx}}{\sqrt{2\pi}}\right)^*\frac{e^{ik'x}}{\sqrt{2\pi}}
= \int_{-\infty}^{\infty}dx\,\frac{e^{-i(k-k')x}}{2\pi}
=\delta(k-k')\,.
$$
Similarly,
$$
\int_{-\infty}^{\infty}dk\,\frac{e^{i(x-x')k}}{2\pi}
=\delta(x-x')\,.
$$
Using this, we can write
\begin{align*}
f(x) &= \int_{-\infty}^{\infty}dx'\,\delta(x-x') f(x')
= \int_{-\infty}^{\infty}dx'\,\int_{-\infty}^{\infty}dk\,\frac{e^{i(x-x')k}}{2\pi}f(x')
\\
&= \int_{-\infty}^{\infty}dk\,\frac{e^{ikx}}{\sqrt{2\pi}}\int_{-\infty}^{\infty}dx'\,\frac{e^{-ikx'}}{\sqrt{2\pi}}f(x')
\\
&= \int_{-\infty}^{\infty}dk\,\frac{e^{ikx}}{\sqrt{2\pi}}\int_{-\infty}^{\infty}dx'\,\psi_k^*(x')f(x')
\\
&= \int_{-\infty}^{\infty}dk\,\frac{e^{ikx}}{\sqrt{2\pi}}\tilde{f}(k)
\\
&= \int_{-\infty}^{\infty}dk\,\tilde{f}(k)\psi_k(x)\,.
\end{align*}
Thus, the "justification"/"derivation" of the Fourier transform and its inverse, and the choice for where the $\sqrt{2\pi}$ goes.
But, one more thing.  That choice of where the $\sqrt{2\pi}$ goes has the following consequence. It guarantees that if $f(x)$ is normalized in $x$-space, $\tilde{f}(k)$ is normalized in $k$-space! This allows us to interpret $\tilde{f}(k)$ as the momentum-space representation of the wave function (once we've identified $p=\hbar k$), which is a representation of the wave function that reveals momentum information about the state in the same way that the position-space wave function reveals position information. To be explicit, $|f(x)|^2dx$ is the probability that when we measure the position of the particle, we get the result that it is in the interval $[x,x+dx]$, and so $|\tilde{f}(k)|^2dk$ is the probability that when we measure the momentum of the particle, we get the result that it is in the interval $[\hbar k,\hbar k+\hbar dk]$.
