### A.27 De­tails of the an­i­ma­tions

This note ex­plains how the wave packet an­i­ma­tions of chap­ter 7.11 and 7.12 were ob­tained. If you want a bet­ter un­der­stand­ing of un­steady so­lu­tions of the Schrö­din­ger equa­tion and their bound­ary con­di­tions, this is a good place to start. In fact, de­riv­ing such so­lu­tions is a pop­u­lar item in quan­tum me­chan­ics books for physi­cists.

First con­sider the wave packet of the par­ti­cle in free space, as shown in chap­ter 7.11.1. An en­ergy eigen­func­tion with en­ergy in free space takes the gen­eral form

where is the mo­men­tum of the par­ti­cle and and are con­stants.

To study a sin­gle wave packet com­ing in from the far left, the co­ef­fi­cient has to be set to zero. The rea­son was worked out in chap­ter 7.10: com­bi­na­tions of ex­po­nen­tials of the form pro­duce wave pack­ets that prop­a­gate back­wards in , from right to left. There­fore, a nonzero value for would add an un­wanted sec­ond wave packet com­ing in from the far right.

With only the co­ef­fi­cient of the for­ward mov­ing part left, you may as well scale the eigen­func­tion so that 1, sim­pli­fy­ing it to

A typ­i­cal ex­am­ple is shown in fig­ure A.9. Plus and mi­nus the mag­ni­tude of the eigen­func­tion are shown in black, and the real part is shown in red. This wave func­tion is an eigen­func­tion of lin­ear mo­men­tum, with the lin­ear mo­men­tum.

To pro­duce a co­her­ent wave packet, eigen­func­tions with some­what dif­fer­ent en­er­gies have to be com­bined to­gether. Since the mo­men­tum is given by , dif­fer­ent en­ergy means dif­fer­ent mo­men­tum ; there­fore the wave packet can be writ­ten as

 (A.206)

where is some func­tion that is only nonzero in a rel­a­tively nar­row range of mo­menta around the nom­i­nal mo­men­tum. Ex­cept for that ba­sic re­quire­ment, the choice of the func­tion is quite ar­bi­trary. Choose some suit­able func­tion , then use a com­puter to nu­mer­i­cally in­te­grate the above in­te­gral at a large num­ber of plot points and times. Dump the re­sults into your fa­vorite an­i­ma­tion soft­ware and bingo, out comes the movie.

Next con­sider the an­i­ma­tion of chap­ter 7.11.2, where the par­ti­cle ac­cel­er­ates along a down­ward po­ten­tial en­ergy ramp start­ing from point A. A typ­i­cal en­ergy eigen­func­tion is shown in fig­ure A.10. Since to the left of point A, the po­ten­tial en­ergy is still zero, in that re­gion the en­ergy eigen­func­tion is still of the form

where is the mo­men­tum that a clas­si­cal par­ti­cle of en­ergy would have in the left re­gion. (Quan­tum me­chan­ics looks at the com­plete wave func­tion, not just a sin­gle point of it, and would say that the mo­men­tum is un­cer­tain.)

In this case, it can no longer be ar­gued that the co­ef­fi­cient must be zero to avoid a packet en­ter­ing from the far right. Af­ter all, the term does not ex­tend to the far right any­more. To the right of point , the po­ten­tial changes lin­early with po­si­tion, and the ex­po­nen­tials are no longer valid.

In fact, it is known that the so­lu­tion of the Hamil­ton­ian eigen­value prob­lem in a re­gion with a lin­early vary­ing po­ten­tial is a com­bi­na­tion of two weird func­tions Ai and Bi that are called the Airy func­tions. The bad news is that if you are in­ter­ested in learn­ing more about their prop­er­ties, you will need an ad­vanced math­e­mat­i­cal hand­book like [1] or at least look at ad­den­dum {A.29}. The good news is that free soft­ware to eval­u­ate these func­tions and their first de­riv­a­tives is read­ily avail­able on the web. The gen­eral so­lu­tion for a lin­early vary­ing po­ten­tial is of the form

Note that is the -​po­si­tion mea­sured from the point where . Also note that the cube root is neg­a­tive, so that is.

It may be de­duced from the ap­prox­i­mate analy­sis of ad­den­dum {A.28} that to pre­vent a sec­ond wave packet com­ing in from the far right, Ai and Bi must ap­pear to­gether in the com­bi­na­tion as shown in fig­ure A.10. The fact that no sec­ond packet comes in from the far right in the an­i­ma­tion can be taken as an ex­per­i­men­tal con­fir­ma­tion of that re­sult, so there seems lit­tle jus­ti­fi­ca­tion to go over the messy ar­gu­ment.

To com­plete the de­ter­mi­na­tion of the eigen­func­tion for a given value of , the con­stants , and must still be de­ter­mined. That goes as fol­lows. For now, as­sume that has the pro­vi­sional value 1. Then pro­vi­sional val­ues and for the other two con­stants may be found from the re­quire­ments that the left and right re­gions give the same val­ues for and at the point A in fig­ure A.10 where they meet:

That is equiv­a­lent to two equa­tions for the two con­stants and , since every­thing else can be eval­u­ated, us­ing the men­tioned soft­ware. So and can be found from solv­ing these two equa­tions.

As the fi­nal step, it is de­sir­able to nor­mal­ize the eigen­func­tion so that 1. To do so, the en­tire pro­vi­sional eigen­func­tion can be di­vided by , giv­ing and . The en­ergy eigen­func­tion has now been found. And since 1, the term is ex­actly the same as the free space en­ergy eigen­func­tion of the first ex­am­ple. That means that if the eigen­func­tions are com­bined into a wave packet in the same way as in the free space case, (A.206) with re­placed by , the terms pro­duce the ex­act same wave packet com­ing in from the far left as in the free space case.

For larger times, the terms pro­duce a re­flected wave packet that re­turns to­ward the far left. Note that is the com­plex con­ju­gate of , and it can be seen from the un­steady Schrö­din­ger equa­tion that if the com­plex con­ju­gate of a wave func­tion is taken, it pro­duces a re­ver­sal of time. Wave pack­ets com­ing in from the far left at large neg­a­tive times be­come wave pack­ets leav­ing to­ward the far left at large pos­i­tive times. How­ever, the con­stant turns out to be very small in this case, so there is lit­tle re­flec­tion.

Next con­sider the an­i­ma­tion of chap­ter 7.11.3, where the par­ti­cle is turned back by an up­ward po­ten­tial en­ergy ramp. A typ­i­cal en­ergy eigen­func­tion for this case is shown in fig­ure A.11. Un­like in the pre­vi­ous ex­am­ple, where the ar­gu­ment of the Airy func­tions was neg­a­tive at the far right, here it is pos­i­tive. Ta­ble books that cover the Airy func­tions will tell you that the Airy func­tion Bi blows up very strongly with in­creas­ing pos­i­tive ar­gu­ment . There­fore, if the so­lu­tion in the right hand re­gion would in­volve any amount of Bi, it would lo­cate the par­ti­cle at in­fi­nite for all times. For a par­ti­cle not at in­fin­ity, the so­lu­tion in the right hand re­gion can only in­volve the Airy func­tion Ai. That func­tion de­cays rapidly with pos­i­tive ar­gu­ment , as seen in fig­ure A.11.

The fur­ther de­ter­mi­na­tion of the en­ergy eigen­func­tions pro­ceeds along the same lines as in the pre­vi­ous ex­am­ple: give a pro­vi­sional value 1, then com­pute and from the re­quire­ments that the left and right re­gions pro­duce the same val­ues for and at the point A where they meet. Fi­nally di­vide the eigen­func­tion by . The big dif­fer­ence is that now is no longer small; turns out to be of unit mag­ni­tude just like . It means that the in­com­ing wave packet is re­flected back com­pletely.

For the har­monic os­cil­la­tor of chap­ter 7.11.4, the analy­sis is some­what dif­fer­ent. In par­tic­u­lar, chap­ter 4.1.2 showed that the en­ergy lev­els of the one-di­men­sion­al har­monic os­cil­la­tor are dis­crete,

so that un­like the mo­tions just dis­cussed, the so­lu­tion of the Schrö­din­ger equa­tion is a sum, rather than the in­te­gral (A.206),

How­ever, for large the dif­fer­ence be­tween sum­ma­tion and in­te­gra­tion is small.

Also, while the en­ergy eigen­func­tions are not ex­po­nen­tials as for the free par­ti­cle, for large they can be pair­wise com­bined to ap­prox­i­mate such ex­po­nen­tials. For ex­am­ple, eigen­func­tion , shown in fig­ure A.12, be­haves near the cen­ter point much like a co­sine if you scale it prop­erly. Sim­i­larly, be­haves much like a sine. A co­sine plus times a sine gives an ex­po­nen­tial, ac­cord­ing to the Euler for­mula (2.5). Cre­ate sim­i­lar ex­po­nen­tial com­bi­na­tions of eigen­func­tions with even and odd val­ues of for a range of val­ues, and there are the ap­prox­i­mate ex­po­nen­tials that al­low you to cre­ate a wave packet that is at the cen­ter point at time 0. In the an­i­ma­tion, the range of val­ues was cen­tered around 50, mak­ing the nom­i­nal en­ergy hun­dred times the ground state en­ergy. The ex­po­nen­tials de­gen­er­ate over time, since their com­po­nent eigen­func­tions have slightly dif­fer­ent en­ergy, hence time evo­lu­tion. That ex­plains why af­ter some time, the wave packet can re­turn to the cen­ter point go­ing the other way.

For the par­ti­cle of chap­ter 7.12.1 that en­coun­ters a brief ac­cel­er­at­ing force, an ex­am­ple eigen­func­tion looks like fig­ure A.13. In this case, the so­lu­tion in the far right re­gion is sim­i­lar to the one in the far left re­gion. How­ever, there can­not be a term of the form in the far right re­gion, be­cause when the eigen­func­tions are com­bined, it would pro­duce an un­wanted wave packet com­ing in from the far right. In the mid­dle re­gion of lin­early vary­ing po­ten­tial, the wave func­tion is again a com­bi­na­tion of the two Airy func­tions. The way to find the con­stants now has an ad­di­tional step. First give the con­stant of the far right ex­po­nen­tial the pro­vi­sional value 1 and from that, com­pute pro­vi­sional val­ues and by de­mand­ing that the Airy func­tions give the same val­ues for and as the far-right ex­po­nen­tial at point B, where they meet. Next com­pute pro­vi­sional val­ues and by de­mand­ing that the far-left ex­po­nen­tials give the same val­ues for and as the Airy func­tions at point A, where they meet. Fi­nally, di­vide all the con­stants by to make 1.

For the tun­nel­ing par­ti­cle of chap­ter 7.12.2, an ex­am­ple eigen­func­tion is as shown in fig­ure A.14. In this case, the so­lu­tion in the mid­dle part is not a com­bi­na­tion of Airy func­tions, but of real ex­po­nen­tials. It is es­sen­tially the same so­lu­tion as in the left and right parts, but in the mid­dle re­gion the po­ten­tial en­ergy is greater than the to­tal en­ergy, mak­ing an imag­i­nary num­ber. There­fore the ar­gu­ments of the ex­po­nen­tials be­come real when writ­ten in terms of the ab­solute value of the mo­men­tum . The rest of the analy­sis is sim­i­lar to that of the pre­vi­ous ex­am­ple.

For the par­ti­cle tun­nel­ing through the delta func­tion po­ten­tial in chap­ter 7.12.2, an ex­am­ple en­ergy eigen­func­tion is shown in fig­ure A.15. The po­ten­tial en­ergy in this case is , where is a spike at point A that in­te­grates to one and the strength is a cho­sen con­stant. In the ex­am­ple, was cho­sen to be with the nom­i­nal en­ergy. For that strength, half the wave packet will pass through.

For a delta func­tion po­ten­tial, a mod­i­fi­ca­tion must be made in the analy­sis as used so far. As fig­ure A.15 il­lus­trates, there are kinks in the en­ergy eigen­func­tion at the lo­ca­tion A of the delta func­tion. The left and right ex­pres­sions for the eigen­func­tion do not pre­dict the same value for its de­riv­a­tive at point A. To find the dif­fer­ence, in­te­grate the Hamil­ton­ian eigen­value prob­lem from a point a very short dis­tance be­fore point A to a point the same very short dis­tance be­hind it:

The in­te­gral in the right hand side is zero be­cause of the van­ish­ingly small in­ter­val of in­te­gra­tion. But the delta func­tion spike in the left hand side in­te­grates to one re­gard­less of the small in­te­gra­tion range, so

For van­ish­ingly small , at be­comes what the right hand part of the eigen­func­tion gives for at , while at be­comes what the left hand part gives for it. As seen from the above equa­tion, the dif­fer­ence is not zero, but .

So the cor­rect equa­tions for the pro­vi­sional con­stants are in this case

Com­pared to the analy­sis as used pre­vi­ously, the dif­fer­ence is the fi­nal term in the sec­ond equa­tion that is added by the delta func­tion.

The re­main­der of this note gives some tech­ni­cal de­tails for if you are ac­tu­ally plan­ning to do your own an­i­ma­tions. It is a good idea to as­sume that the units of mass, length, and time are cho­sen such that and the nom­i­nal en­ergy are one, while the mass of the par­ti­cle is one-half. That avoids hav­ing to guessti­mate suit­able val­ues for all sorts of very small num­bers. The Hamil­ton­ian eigen­value prob­lem then sim­pli­fies to

where the val­ues of of in­ter­est clus­ter around 1. The nom­i­nal mo­men­tum will be one too. In those units, the length of the plot­ted range was one hun­dred in all but the har­monic os­cil­la­tor case.

It should be noted that to se­lect a good func­tion in (A.206) is some­what of an art. The sim­plest idea would be to choose equal to one in some lim­ited range around the nom­i­nal mo­men­tum, and zero else­where, as in

where is the rel­a­tive de­vi­a­tion from the nom­i­nal mo­men­tum be­low which is nonzero. How­ever, it is know from Fourier analy­sis that the lo­ca­tions where jumps from one to zero lead to lengthy wave pack­ets when viewed in phys­i­cal space. {D.44}. Func­tions that do lead to nice com­pact wave pack­ets are known to be of the form

And that is es­sen­tially the func­tion used in this study. The typ­i­cal width of the mo­men­tum range was cho­sen to be 0.15, or 15%, by trial and er­ror. How­ever, it is nice if be­comes not just very small, but ex­actly zero be­yond some point, for one be­cause it cuts down on the num­ber of en­ergy eigen­func­tions that have to be eval­u­ated nu­mer­i­cally. Also, it is nice not to have to worry about the pos­si­bil­ity of be­ing neg­a­tive in writ­ing en­ergy eigen­func­tions. There­fore, the fi­nal func­tion used was

The ac­tual dif­fer­ence in nu­mer­i­cal val­ues is small, but it does make ex­actly zero for neg­a­tive mo­menta and those greater than twice the nom­i­nal value. Strictly speak­ing, should still be mul­ti­plied by a con­stant to make the to­tal prob­a­bil­ity of find­ing the par­ti­cle equal to one. But if you do not tell peo­ple what num­bers for are on the ver­ti­cal axes, you do not need to bother.

In do­ing the nu­mer­i­cal in­te­gra­tions to find , note that the mid point and trapez­ium rules of nu­mer­i­cal in­te­gra­tion are ex­po­nen­tially ac­cu­rate un­der the given con­di­tions, so there is prob­a­bly not much mo­ti­va­tion to try more ad­vanced meth­ods. The mid point rule was used.

The an­i­ma­tions in this book used the nu­mer­i­cal im­ple­men­ta­tions daie.f, dbie.f, daide.f, and dbide.f from netlib.org for the Airy func­tions and their first de­riv­a­tives. These of­fer some ba­sic pro­tec­tion against un­der­flow and over­flow by split­ting off an ex­po­nen­tial for pos­i­tive . It may be a good idea to check for un­der­flow and over­flow in gen­eral and use 64 bit pre­ci­sion. The ex­am­ples here did.

For the har­monic os­cil­la­tor, the larger the nom­i­nal en­ergy is com­pared to the ground state en­ergy, the more the wave packet can re­sem­ble a sin­gle point com­pared to the lim­its of mo­tion. How­ever, the com­puter pro­gram used to cre­ate the an­i­ma­tion com­puted the eigen­func­tions by eval­u­at­ing the an­a­lyt­i­cal ex­pres­sion given in de­riva­tion {D.12}, and ex­plic­itly eval­u­at­ing the Her­mite poly­no­mi­als is very round-off sen­si­tive. That lim­ited it to a max­i­mum of about hun­dred times the ground state en­ergy when al­low­ing for enough un­cer­tainty to lo­cal­ize the wave packet. Round-off is a gen­eral prob­lem for power se­ries, not just for the Her­mite poly­no­mi­als. If you want to go to higher en­er­gies to get a smaller wave packet, you will want to use a fi­nite dif­fer­ence or fi­nite el­e­ment method to find the eigen­func­tions.

The plot­ting soft­ware used to pro­duce the an­i­ma­tions was a mix­ture of dif­fer­ent pro­grams. There are no doubt much sim­pler and bet­ter ways of do­ing it. In the an­i­ma­tions pre­sented here, first plots were cre­ated of ver­sus for a large num­ber of closely spaced times cov­er­ing the du­ra­tion of the an­i­ma­tion. These plots were con­verted to gifs us­ing a mix­ture of per­sonal soft­ware, netpbm, and ghostview. The gifs were then com­bined into a sin­gle movie us­ing gif­si­cle.