I have to do a program about the Heisenberg uncertainty for the harmonic oscillator. I wrote all the integrals that I need to use for the medium values and the specific function of the oscillator, but it doesn't work...Could someone help me please?
?[n_, x_] := Sqrt[?/(2^n n! Sqrt[?])] HermiteH[n, ? x ] E^(-((? x)^2/2)) /. ? -> 1;
mediex[i_, x_] := \!\(\*SubsuperscriptBox[\(?\), \(0\), \(?\)]\(\((Abs[\?[i, x]])\)^2*x \[DifferentialD]x\)\)
mediex[5, x]
15/(8 Sqrt[?])
mediex2[i_, x_] := \!\(\*SubsuperscriptBox[\(?\), \(0\), \(?\)]\(\((Abs[\?[i, x]])\)^2*x^2 \[DifferentialD]x\)\)
mediex2[5, x]
11/4
mediep[i_, x_] := \!\(\*SubsuperscriptBox[\(?\), \(0\), \(?\)]\(?[i, x]*\((\(-i?\)\ )\) D[?[i, x],
x] \[DifferentialD]x\)\)
mediep[5, x]
0
mediep2[i_, x_] := \!\(\*SubsuperscriptBox[\(?\), \(0\), \(?\)]\(?[i, x]*\((?^2\ )\) D[D[?[i, x], x],
x] \[DifferentialD]x\)\)
mediep2[5, x]
-((11 ?^2)/4)