# 1D simple harmonic oscillator in box

## Homework Statement

A particle is inside of a potential described by:

H = p^2/2m + 1/2kx^2, x between -L/2 and L/2
H = infinity, otherwise.

my task is to compute a first-order approximation to the energies of this potential.

## The Attempt at a Solution

I attempted to use first-order perturbation theory, but ran into a couple hitches. The first was that when the SHO force is dominant (for some E > Ec), I have to write the infinite energy barriers as some 'perturbation', which I'm not sure how to do. Another is that when I try to do the expectation value for where the SHO force is a perturbation, (<n|H'|n>, where H' = 1/2kx^2), I get something really complicated and messy:

>> int((x^2)*sin(x)^2, x)

ans =

x^2*(-1/2*cos(x)*sin(x)+1/2*x)-1/2*x*cos(x)^2+1/4*cos(x)*sin(x)+1/4*x-1/3*x^3

(sans a lot of stuff..)

So there must be something I'm doing wrong. First of all, how can I approximate infinity? Secondly, what am I doing wrong with the other first-order correction (with the SHO energy as the perturbation?) I could really use some hints.

Thanks a lot.

stephen

Related Advanced Physics Homework Help News on Phys.org
bump again

PhysiSmo
Hi syang9,

your second attempt is correct: you assume that the infinite well is the unperturbative, known problem, and you treat the harmonic oscillator potential as a perturbation. The unperturbative eigenfunctions are known, i.e. Sin(x), and you integrate <n'|H|n>, just as you describe above.

The integration can be done by integrating by parts, I haven't check if your result is correct. You forgot, though, to put in the limits of the integration: x runs from -L/2 to +L/2 ! You should then be able to calculate the first correction to the energy levels, which would be

E_total = E_inf_well + <n'|H|n>

so i've been trying to use the variational principle to get an upper bound on the ground state energy where the SHO force is dominant and the infinite well is a 'perturbation'. The only trial function I can think of that will satisfy the boundary conditions (and have some possibility of converging) is ψ(x)=Ae^(-bx) cos(πnx/L).. but when I try to take the expectation values, integrating from -infinity to infinity, (should i integrate only in the box?) matlab says

Warning: Explicit integral could not be found.
> In sym.int at 64

ans =

int(-(cos((n*p*x)/L)*(((n^2*p^2*cos((n*p*x)/L))/exp(b*x^2) - (4*L*b*n*p*x*sin((n*p*x)/L))/exp(b*x^2))/L^2 + (2*b*cos((n*p*x)/L) - 4*b^2*x^2*cos((n*p*x)/L))/exp(b*x^2)))/exp(b*x^2), x = -Inf..Inf)

so i'm really at a loss. I don't know what other function I could use that would satisfy the boundary conditions at the walls besides cosine. help!

Avodyne
Why are you using the variational principle? You said that your "task is to compute a first-order approximation to the energies". For that, you should follow what PhysiSmo said.

If you are now, additionally, asking about the variational principle, your trial wave function should be an even function of x, because we know the exact ground state wave function is an even function of x (because the potential is an even function of x). And yes, you should only integrate inside the box, because the wave function must be zero outside the box.

well, in truth, i would like to know as much about the energies as possible. so i'm trying to use the variational principle to get the ground state energy, since in the ground state the particle will experience a dominant SHO restoring force, and the infinite walls will be the 'perturbation'-- except infinity does not lend itself well to be modeled as a perturbation.

Oops: didn't notice the infinite! I misread this for a different problem where the outside potential is zero, somehow.

Last edited:
ah okay. i was very confused for a moment.