I'm taking a class on QM and we're simulating the wave function of an electron in a box at the lowest energy level and I'm supposed to change the simulation to show the wave function for the next energy level.
The problem is that I don't quite understand the relationship between position and energy level. I'm fine with the formula for the energy levels, but I don't see how to relate it to $\psi(x)$, as it doesn't even involve $x$.
And yet, I know there is a relationship -- if I understand correctly, electron orbitals are just PDFs of position obtained from normalizing and squaring the position wave functions of electrons with different quantum numbers, one of which is energy level, and these orbitals are very obviously different, as can be seem from the many diagrams of them. So, clearly energy level does effect the position function, and, for that matter, so do the other quantum numbers.
But what's the specific mathematical relationship, either for a theoretical electron in a box or for an electron in an atom? Like, say I already have an expression for $\psi(x)$ at an arbitrary energy level. How would I modify it to model an electron at a different energy level?
I did see these questions:
Relationship between Quantum Numbers and the Wave-function
Relationship between Energy Level and electron position
https://physics.stackexchange.com/questions/355461/energy-eigenfunction-completeness
but none of them answer the question of what the specific mathematical relationship is in a useful form.
I'm not really sure if this is a physics or chemistry question, but I'm picturing electron orbitals in atoms so I'm leaning towards it being more chemistry.