Origin of the de Broglie Equation I was curious about the famous $p=\hbar k$ equation. In high school I think you are just exposed to this equation with the explanation of "something something matter waves." But early in a undergraduate QM course you solve the time-independent Schrodinger's equation for a free particle in 1D and get the following solution:
$
\frac{-\hbar^2}{2m}\frac{\partial^2}{\partial x^2} \psi = E\psi
\implies 
\psi = e^{\pm ikx} $ and $E= \frac{\hbar^2k^2}{2m}$
where I believe $k$ is just defined by the $E(k)$ equation. And then do we just realize that the $E(k)$ is the classical $p^2/2m$ equation if we set $p=\hbar k$, and thus we have "derived" $p=\hbar k$ or do we "know" $p=\hbar k$ beforehand and this just confirms it?
 A: Of course, there are many ways to motivate/justify the de Broglie relation. Along the lines of reasoning you are playing with, there is a simple way to prove the following statement which one can regard as a version of the de Broglie relation:

The momentum $p$ of a quantum particle is related to the wavenumber $k$ (that characterizes the wave-like properties of a quantum particle) by the relation $p=\hbar k$.

Let's consider the momentum operator in the position basis and find out the eigenstates of the momentum operator (i.e., the only states for which a well-defined momentum can be said to exist). This eigenvalue equation reads
\begin{align}
\hat{p}\psi_p&=p\psi_p\\
\implies -i\hbar\frac{\partial}{\partial x}\psi_p(x)&=p\psi_p(x)\\
\implies \frac{1}{\psi_p(x)}\frac{\partial \psi_p(x)}{\partial x}&=ip/\hbar\\
\implies \psi_p(x)&=C e^{ipx/\hbar}
\end{align}
where $C$ is some overall normalization (which doesn't matter because the momentum eigenstates cannot be normalized anyway). So, we already see that the particle states with a definite momentum $p$ have a wave-like nature and their wavelength is $\frac{2\pi\hbar}{p}$. Or, in other words, their wavenumber is $k=p/\hbar$.
Notice that we didn't have to assume anything except the axioms of the modern formulation of quantum mechanics. Of course, de Broglie derived his relation before the advent of the modern formulation of quantum mechanics and he needed to take ingenious leaps to posit such a relation. Most peculiarly, we took the fact that the state of a particle is described by some wave-function for granted. de Broglie, on the other hand, actually guessed that a particle also has some wavelike character and he then arrived at the conclusion that the wavenumber that would characterize the wavelike character of a particle would be related to its momentum by the relation $p=\hbar k$. We don't need to do all this guess-work because the insights from such guess-works have already been built into the modern formulation of quantum mechanics.
A: The de Broglie relation is a conjecture based on the relation of energy and momentum of photons to frequency and wavelength. This conjecture led to the Schrödinger equation, so it is consistent with it. If the SE is conjectured then the de Broglie relation can be derived from it, but historically and logically it is the other way around.
