- #1

- 15

- 0

I have already done it by hand and gotten the correct answer (almost! my answer switches sign depending on the variable n, where as the solution I have is positive for all n), but now the problem asks for me find the expectation value for the energy, which is <H> = summation (Cn^2* En) from zero --> infinity.

After getting rid of some constants, I now have a summation from n = 1 --> infinity, given n is odd, for 1/(n^2). So really this isn't a QM question at all, its "how do I tell mathematica my variable is an odd integer and make it do the problem." I am familiar with how to do integrals and summations on mathematica, just not very familiar on how to tell it constraints on a variable. Any help?

Honestly I could probably look up the summation in a reference or something, though I feel like this would be very useful knowledge to know to begin with.