next up previous
Up: Back to the Chemistry 3730 assignment index

Assignment 9 solutions

  1. > k:=200;

    displaymath449

    > m:=1e-26;

    displaymath450

    > L:=1.5e-10;

    displaymath451

    > h := 6.6261e-34;

    displaymath452

    > hbar := h/(2*Pi);

    displaymath453

    > V := x -> k/2*(x-L/2)^2;

    displaymath454

  2. > phi1 := x -> sin(Pi*x/L) + a2*sin(2*Pi*x/L) + a3*sin(3*Pi*x/L);

    displaymath455

    > Kip1 := -hbar^2/(2*m)*int(phi1(x)*diff(phi1(x),x$2),x=0..L);

    eqnarray35

    > Vip1 := int(phi1(x)^2*V(x),x=0..L);

    eqnarray54

    > ip1 := int(phi1(x)^2,x=0..L);

    eqnarray71

    > Evar1 := (Kip1+Vip1)/ip1;

    eqnarray89

    > s1:=solve({diff(Evar1,a2)=0,diff(Evar1,a3)=0},{a2,a3});

    eqnarray136

    > evalf(subs(s1[1],Evar1));

    displaymath456

    > evalf(subs(s1[2],Evar1));

    displaymath457

    > evalf(subs(s1[3],Evar1));

    displaymath458

    > evalf(subs(s1[4],Evar1));

    displaymath459

    > evalf(subs(s1[5],Evar1));

    displaymath460

    The best solution is obtained with the third set of parameters. As indicated in the problem sheet, this set has a very small value of tex2html_wrap_inline525 .

  3. > phi2 := x -> sin(Pi*x/L) + a3*sin(3*Pi*x/L);

    displaymath461

    > Kip2 := int(phi2(x)*(-hbar^2)/(2*m)*diff(phi2(x),x$2),x=0..L);

    displaymath462

    > Vip2 := int(phi2(x)^2*V(x),x=0..L);

    displaymath463

    > ip2 := int(phi2(x)^2,x=0..L);

    displaymath464

    > Evar2 := (Kip2+Vip2)/ip2;

    displaymath465

    > s2:=solve(diff(Evar2,a3)=0,a3);

    displaymath466

    > subs(a3=s2[1],Evar2);

    displaymath467

    > subs(a3=s2[2],Evar2);

    displaymath468

    > subs(a3=s2[3],Evar2);

    displaymath469

    The best solution for this trial wavefunction is obtained with the second value of tex2html_wrap_inline527 . The energy is slightly better than what we obtained previously, i.e. tex2html_wrap_inline525 should have been exactly zero in our previous attempt.

  4. > phi3 := x -> sin(Pi*x/L) + a3*sin(3*Pi*x/L) + a5*sin(5*Pi*x/L);

    displaymath470

    > Kip3 := int(phi3(x)*(-hbar^2)/(2*m)*diff(phi3(x),x$2),x=0..L);

    eqnarray215

    > Vip3 := int(phi3(x)^2*V(x),x=0..L);}{%

    eqnarray233

    > ip3 := int(phi3(x)^2,x=0..L);

    eqnarray251

    > Evar3 := (Kip3+Vip3)/ip3;

    eqnarray269

    > s3:=solve({diff(Evar3,a3)=0,diff(Evar3,a5)=0},{a3,a5});

    eqnarray302

    > subs(s3[1],Evar3);

    displaymath471

    > subs(s3[2],Evar3);

    displaymath472

    > subs(s3[3],Evar3);

    displaymath473

    The lowest energy is obtained with the (1,3,5) wavefunction with the middle set of parameters.

  5. > phi3n := x -> subs(s3[2],phi3(x)/sqrt(ip3));

    displaymath474

    Verification:

    > int(phi3n(x)^2,x=0..L);

    displaymath475

    > plot(phi3n,0..L);
    tex2html_wrap531
  6. Particle-in-a-box wavefunction:
    > plot(sqrt(2/L)*sin(Pi*x/L),x=0..L);
    tex2html_wrap533

    Harmonic oscillator wavefunction:

    > alpha:=sqrt(k*m)/hbar;

    displaymath476

    > plot((alpha/Pi)^(1/4)*exp(-alpha*(x-L/2)^2/2),x=0..L);
    tex2html_wrap535

    Our wavefunction looks a little more like a harmonic oscillator wavefunction than like a particle-in-a-box wavefunction: There is relatively little density near the edges of the box and the main peak of the wavefunction is sharper. It would be interesting to pursue this calculation with more Fourier terms to see if the wavefunction more nearly approaches that of a harmonic oscillator. I expect it would: The fact that the harmonic oscillator wavefunction is so sharply peaked suggests to me that there is in fact very little interaction with the edges of the box and that the solution is in fact almost exactly the same as for a harmonic oscillator.

Bonus
Since the first excited state should have an antisymmetric wavefunction, we use a wavefunction which keeps only even-numbered terms of the Fourier series. Since the question isn't specific about how many terms to keep, let's just use two:
> phi4 := x -> sin(2*Pi*x/L) + a4*sin(4*Pi*x/L);

displaymath477

> Kip4 := int(phi4(x)*(-hbar^2)/(2*m)*diff(phi4(x),x$2),x=0..L);

displaymath478

> Vip4 := int(phi4(x)^2*V(x),x=0..L);

displaymath479

> ip4 := int(phi4(x)^2,x=0..L);

displaymath480

> Evar4 := (Kip4+Vip4)/ip4;

displaymath481

> s4:=solve(diff(Evar4,a4)=0,a4);

displaymath482

> subs(a4=s4[1],Evar4);

displaymath483

> subs(a4=s4[2],Evar4);

displaymath484

> phi4n := x -> subs(a4=s4[1],phi4(x)/sqrt(ip4));

displaymath485

Verification:

> int(phi4n(x)^2,x=0..L);

displaymath486

> plot(phi4n,0..L);
tex2html_wrap537

next up previous
Up: Back to the Chemistry 3730 assignment index

Marc Roussel
Wed Nov 25 10:52:35 MST 1998