You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to compare the eigenvalues obtained from 1D_harmonic_oscillator.py to the analytical solution to the 1D harmonic oscillator, which is given by $E_n = (n+0.5) \hbar \omega$, where $\omega=\sqrt{k/m}$. Therefore, I wrote the following code to calculate the relative deviation of the numerical solution from the analytical solution:
However, the resulting relative deviation is unexpectedly high (factor 25 to 26):
Is there a mistake in my code? Did I use the wrong units?
Thank you very much!
The text was updated successfully, but these errors were encountered:
Hi,
I wanted to compare the eigenvalues obtained from 1D_harmonic_oscillator.py to the analytical solution to the 1D harmonic oscillator, which is given by$E_n = (n+0.5) \hbar \omega$ , where $\omega=\sqrt{k/m}$ . Therefore, I wrote the following code to calculate the relative deviation of the numerical solution from the analytical solution:
However, the resulting relative deviation is unexpectedly high (factor 25 to 26):
Is there a mistake in my code? Did I use the wrong units?
Thank you very much!
The text was updated successfully, but these errors were encountered: