### A.2 An ex­am­ple of vari­a­tional cal­cu­lus

The prob­lem to solve in ad­den­dum {A.22.1} pro­vides a sim­ple ex­am­ple of vari­a­tional cal­cu­lus.

The prob­lem can be sum­ma­rized as fol­lows. Given is the fol­low­ing ex­pres­sion for the net en­ergy of a sys­tem:

Here the op­er­a­tor is de­fined as

The in­te­grals are over all space, or over some other given re­gion. Fur­ther is as­sumed to be a given pos­i­tive con­stant and is a given func­tion of the po­si­tion . The func­tion will be called the po­ten­tial and is not given. Ob­vi­ously the en­ergy de­pends on what this po­ten­tial is. Math­e­mati­cians would say that is a “func­tional,” a num­ber that de­pends on what a func­tion is.

The en­ergy will be min­i­mal for some spe­cific po­ten­tial . The ob­jec­tive is now to find an equa­tion for this po­ten­tial us­ing vari­a­tional cal­cu­lus.

To do so, the ba­sic idea is the fol­low­ing: imag­ine that you start at and then make an in­fin­i­tes­i­mally small change to it. In that case there should be no change in en­ergy. Af­ter all, if there was an neg­a­tive change in , then would de­crease. That would con­tra­dict that pro­duces the low­est en­ergy of all. If there was an pos­i­tive in­fin­i­tes­i­mal change in , then a change in po­ten­tial of op­po­site sign would give a neg­a­tive change in . Again that pro­duces a con­tra­dic­tion to what is given.

The typ­i­cal physi­cist would now work out the de­tails as fol­lows. The slightly per­turbed po­ten­tial is writ­ten as

Note that the in has been reno­tated as . That is be­cause every­one does so in vari­a­tional cal­cu­lus. The sym­bol does not make a dif­fer­ence, the idea re­mains the same. Note also that is a func­tion of po­si­tion; the change away from is nor­mally dif­fer­ent at dif­fer­ent lo­ca­tions. You are in fact al­lowed to choose any­thing you like for the func­tion , as long as it is suf­fi­ciently small and it is zero at the lim­its of in­te­gra­tion.

Now just take dif­fer­en­tials like you typ­i­cally do it in cal­cu­lus or physics. If in cal­cu­lus you had some ex­pres­sion like , you would say . (For ex­am­ple, if is a func­tion of a vari­able , then . But physi­cists usu­ally do not bother with the ; then they do not have to worry what ex­actly is a func­tion of.) Sim­i­larly

where

so

For a change start­ing from :

(Note that by it­self gets ap­prox­i­mated as , but is the com­pletely ar­bi­trary change that can be any­thing.) Also,

be­cause is a given con­stant at every po­si­tion.

To­tal you get for the change in en­ergy that must be zero

A con­sci­en­tious math­e­mati­cian would shud­der at the above ma­nip­u­la­tions. And for good rea­son. Small changes are not good math­e­mat­i­cal con­cepts. There is no such thing as small in math­e­mat­ics. There are just lim­its where things go to zero. What a math­e­mati­cian would do in­stead is write the change in po­ten­tial as a some mul­ti­ple of a cho­sen func­tion . So the changed po­ten­tial is writ­ten as

The cho­sen func­tion can still be any­thing that you want that van­ishes at the lim­its of in­te­gra­tion. But it is not as­sumed to be small. So now no math­e­mat­i­cal non­sense is writ­ten. The en­ergy for this changed po­ten­tial is

Now this en­ergy is a func­tion of the mul­ti­ple . And that is a sim­ple nu­mer­i­cal vari­able. The en­ergy must be small­est at = 0, be­cause gives the min­i­mum en­ergy. So the above func­tion of must have a min­i­mum at 0. That means that it must have a zero de­riv­a­tive at 0. So just dif­fer­en­ti­ate the ex­pres­sion with re­spect to . (You can dif­fer­en­ti­ate as is, or sim­plify first and bring out­side the in­te­grals.) Set this de­riv­a­tive to zero at 0. That gives the same re­sult (2) as de­rived by physi­cists, ex­cept that takes the place of . The re­sult is the same, but the de­riva­tion is nowhere fishy.

This de­riva­tion will re­turn to the no­ta­tions of physi­cists. The next step is to get rid of the de­riv­a­tives on . Note that

The way to get rid of the de­riv­a­tives on is by in­te­gra­tion by parts. In­te­gra­tion by parts pushes a de­riv­a­tive from one fac­tor on an­other. Here you see the real rea­son why the changes in po­ten­tial must van­ish at the lim­its of in­te­gra­tion. If they did not, in­te­gra­tions by parts would bring in con­tri­bu­tions from the lim­its of in­te­gra­tion. That would be a mess.

In­te­gra­tions by parts of the three terms in the in­te­gral in the , , and di­rec­tions re­spec­tively pro­duce

In vec­tor no­ta­tion, that be­comes

Sub­sti­tut­ing that in the change of en­ergy (2) gives

The fi­nal step is to say that this can only be true for what­ever change you take if the par­en­thet­i­cal ex­pres­sion is zero. That gives the fi­nal looked-for equa­tion for :

To jus­tify the above fi­nal step, call the par­en­thet­i­cal ex­pres­sion for short. Then the vari­a­tional state­ment above is of the form

where can be ar­bi­trar­ily cho­sen as long as it is zero at the lim­its of in­te­gra­tion. It is now to be shown that this im­plies that is every­where zero in­side the re­gion of in­te­gra­tion.

(Note here that what­ever func­tion is, it should not con­tain . And there should not be any de­riv­a­tives of any­where at all. Oth­er­wise the above state­ment is not valid.)

The best way to see that must be zero every­where is first as­sume the op­po­site. As­sume that is nonzero at some point P. In that case se­lect a func­tion that is zero every­where ex­cept in a small vicin­ity of P, where it is pos­i­tive. (Make sure the vicin­ity is small enough that does not change sign in it.) Then the in­te­gral above is nonzero; in par­tic­u­lar, it will have the same sign as at P. But that is a con­tra­dic­tion, since the in­te­gral must be zero. So the func­tion can­not be nonzero at a point P; it must be zero every­where.

(There are more so­phis­ti­cated ways to do this. You could take as a pos­i­tive mul­ti­ple of that fades away to zero away from point P. In that case the in­te­gral will be pos­i­tive un­less is every­where zero. And sign changes in are no longer a prob­lem.)