Linear variation method in one dimension - Journal of Chemical

Linear variation method in one dimension. Frank Rioux. J. Chem. Educ. , 1982, 59 (9), p 773. DOI: 10.1021/ed059p773. Publication Date: September 1982...
0 downloads 0 Views 2MB Size
edited by JOHN W.

MOORE

Bits and Pieces, 12 Most authors of Bits and Pieces will make available listings or machine-readable versions of their programs. Please read each descriotion carefullv to determine com~atihilitvwith your own computing environment hefbre requesting materials from anv of the authors. Revised euidelines for authors of Hits and pieces appeared in the ~ e h r u a r1982 ~ issue of the

JOURNAL.

provided hy Levine ( 2 ) .The energy operator is written in atomic units (fl= -0.5 d2/dx2),and 9 = *(I - X ) is the trial wave function. Use of this function in the variational p:ocedure yields an energy of J 0 hartrees which is only 1.3%greater than thecorrrct valueof 4.93 hartrem'l'he reason for this good agreement, of course, is that the trial function closely resembles the rorrect ground-state wave function, J = (2)1 G i n sx. - - ~

Linear Variation Method in One Dimension Frank Rloux St. John's University Collegeville. MN 56321

The purpose of this note is to describe a simple variational calculation on the electron in the one-dimensional, one-hohr box. This calculation can be performed by undergraduate physical chemistry students and does not require the use of the computer. Consequently, it can serve as a useful introduction to the more comprehensive computer calculations recently described by Sims and Ewing ( I ) . The variational method is introduced using an example

In the light of the success of this trial function it is easy t o see that the set of basis function f, = N .

n" (x - i l n )

i=o

is a reasonable approximation to the set of eigenfunctions, 4, = 2' >sin naX. A trial function which is a linear combination of the first four basis functions is used in the variational calculation outlined here. I t is not difficult for the students to normalize the basis functions and to confirm the following values for the matrix elements: HII = 5, Hzz = 21, H33 = 50, H44 = 94.59, HIS = H31 = 2.65, Hz4 = H42 = 17.23, Sll = Szz = Su = 1, Sla = SS1 = 0.336, Sz4 = S4z = 0.383. All other matrix elements are equal

Editor's Note: Role of Computers There is no doubt that computers have the potential for changing fundamentally many aspects of chemical education. The large number and great variety of computer aonlications described in this and the thirtv-one ~recedink! do&uter Series articles attest to the ingenuity and enthusiasm with which chemists have approached the questions of where in the curriculum computers can he used to advantage and how the medium of keyboard, CRT screen, and machine interaction can best serve chemical education. D e s ~ i t ethe current enthusiasm, even the farthest out of us "computer nuts" probably would not argue that computers can do euerything better than any other medium of instruction. I certainly would not, but I do maintain that in many cases computers provide the best, most cost-effective solutions to instructional problems. The trick is t o decide where each item in our instructional toolbox can be used most appropriately. Making such decisions is not yet trivial in the case of computers, because the collective body of chemistry teachers does not yet have the familiarity with CAI or other methods that is reouired to arrive a t intellieent choices automatically. Rather, we all need to spend more time and effort exolorine" what comouters can and cannot do well and comparing their efficacy in specific situations with the effectiveness of older modes of instruction. Comouters are not going to solve all our instructional problems immediatelv. I would suggest the following procedure for potential users of any instructional technique. First, define the instructional problems you need to solve and rank them in order of ~rioritv.For each orohlem consider various methods (including ones based on computers) that might

-

meet your needs. Locate the software (written materials, video, computer ~ r o m a m s )you will require for each method. his may involve purchase from commercial sources, transfer from authors of papers in THIS JOURNAL or others, or writing your own. Decide which method and materials will best serve your needs, and then obtain the hardware and equipment needed to present those materials to students. Durine the next vear the DivCHED Task Force on computers in ~ h e i i c a Education l and Project SERAPHIM (soonsored hv NSF-DISE) will he addressine severa1 aspects of this suggested prdcedure, insofar as-it involves cornouter-based methods. We will be n. r e.~ a r i.. n zfor the TFCCE Newsletter a list of available computer promums for chemistrv instruction. This list will include items published in Bits and Pieces, commercially available software, and any other programs we learn of. Suggestions of items for inclusion on the list should he sent to John Moore. We are also organizing reviewers who can evaluate software and assess its effect on their students. Eventually this column will publish more and more tested software and fewer announcements that programs are available. Details of the procedures involved are not yet final, and comments are solicited. Finally, in order to address the questions of how computers should be used in the chemistry curriculum, we are organizing a symposium at the fall 1983 ACS National Meeting in Washington, D.C. The questions addressed are "Will Computers Replace TAs? Professors? Labs? Should They?" Anyone who might wish to participate as a speaker or in a panel discussion on these questions should contact John Moore. ~

.~.~ ~

~

~

~

-

Volume 59

Number 9

September 1982

773

At this point, things start to get a bit tedious and the students begin t o look forlornly a t the computer. They are now ready to appreciate the versatile computer program described by Sims and Ewing. The details of the calculation described in this paper are available on request from the author.

Our programs-written for the titration of monobasic and dibasic acids-will accept a student's experimental data, graph the titration curves on the screen, and print out the results of all calculations. Each student has a diskette that contains the UCSD PASCAL operating system with the data reduction program transferred to it. With the easy-to-use UCSD PASCAL operating system it is quite straightforward for the student to proceed and exchange the normality of base actually nsed for the one already in the program; similar manipulations are done with sample weight and data pairs of ml and pH. This operating system is very forgiving of any errors. One can simnlv move the cursor to the error and tvoe in the correction. 'Once the data is typed in, the student iB 'asked to have the data checked bv someone else. and the nroeram is then . compiled. Once the program is runnine with the student's data. the output is eiamrned in tahula;form, and both a roughand smoothed mavhical form. The instrudor eenerallv examines this output and, if it is acceptable, the stuient is sent over to a second microcom~uterwhich is confieured differentlv to provide printed ~ u < ~ u t . Students who have had no previous experience with computers are able to titrate at least two trials of unknown acid, completely debug their program with their data in it, and obtain hard copy of the results during one six-hour period. Most are able to run only one data set through the computer. Students are required to graph all results, calculate the pK's and percent composition, and identify the acid present by traditional methods. The above requires one Apple connected to a CRT for every seven or eight students, and one additional Apple interfaced with a printer for the entire class. he results from the experiment have been quite satisfactory. Both traditional and computer calculations have agreed, makine it nossihle to identifv the unknown from the nK's and to calculate the composition in all cases. Each time the lab is run new ideas are suggested, and many are worth implementing. Having a number of copies of the program with real laboratory data incorported makes testing any changes made in the program much more realistic andfaster. We have found the UCSD PASCAL lanenaee verv .. and ooeratine.. svstem . helpful in meeting our aims. Prorram TITRr\TION-L'CSD Avole PASCAL Version 1.1.T K ~program is 500 lines, self-doeimenting, used with a 64K Apple with language card. Documentation includes diskette with program for the titration of a dibasic acid (student titration data in program), step-by-step directions for actual use in lab. For the diskette and documentation, send a check for $10 made out to Dr. Brian J. Pankuch.

Introducing Microcomputers into an Analytical Lab Course

Space Group Generation and Display Using Pascal

to zero. The resulting secular determinant looks like Figure 2a of the paper by Sims and Ewing. I t can he converted to a 2 X 2 block diagonal form by regrouping the basis functions into odd and even sets. In this form, four energy values are obtained by solving two quadratic equations. The corresponding normalized wave functions are obtained by the usual procedure. The results are: W1 = 4.979 (4.935): 41= 1.007fi - 0.0219fz W2 = 19.76 (19.74): 4, = 1.044f2 0.135f4 W, = 55.02 (44.41): 43 = 0.336fi - 1.062f3 W4 = 100.2 (78.96): 44= 0.287f2 1.074t

+

+

The students will note that increasing the trial function from one to four terms has improved the ground-state energy to 4.979 hartrees (0.9% error). The essential features of the variational method can be stressed further by comparing the correct eigenfunctions $, with the basis function, f,, and the variational function, &, for each value of n. Better approximations to the correct energy eigenvalues and eigenfunctions can be obtained by increasing the number of terms in the trial wave function. An odd (f5) and even (f6) function can be added and six energy eigenvalnes can be ohtained bv solving two cubic equations. The secular determinant and the res&ing solutiois are given below. 5.00 1.003 2.64 0.336E 2.31 0.112E 0 0 0

2.64 0.3363 50.0 1.WE 51.3 0.5633 0

2.31 0.1123 51.3 0.5633 157.3 1.00E 0

0

0

0

0

0

0

0

0

0

17.2 16.1 21.0 1.003 0.3833 0.2433 0 0 17.2 94.6 108.9 0.3833 1.00E 0.707E 108.9 - 239.7 0 0 16.1 0.2433 0.7073 1.00E W1 = 4.974: 41 = 1.005f~- 0.014f3 - 0.007fs = 1.046f2 - 0.147fd O.O1Ofs Wz = 19.75: 4% W3 = 48.59: = 0.356f1 - 1.196f3 0.274fs W4 = 80.04: 4, = 0.280f2 - 1.339f4 0.444fe ws = 175.3: ma = 0.032fi - 0.463fs 1.1854 Ws = 285.1: $6 = 0.050f2 - 0.629fi - 1.344fg

+

+ +

+

Brlan J. Pankuch

-

"

A

B. R. Penfoldand R. S. Temple

Union College Cranford. NJ 07016

University of Canterbury Christchurch 1, New Zealand

Recently, we developed a series of programs which we nsed as a basis for introducing microcomputers into an analytical lab course. Our aim was for programs that would:

Some knowledge of space mouv theorv and a general fa~ ~ is e&entialfor an nnmiliarity with space g & diagr&s derstanding of structure in the crvstalline state, whether or not the &dent is specifically concerned with structure analvsis. Most advanced students find i t bard to visualize in threk dimensions the results of individual space group operations and even harder to appreciate the product of several operations. While the building of three-dimensional models, as described by Hathaway (3) is undoubtedly a powerful teaching aid, itis quite time-consuming and only a Gery limited number of space groups can be dealt with by any one student. In order to provide experience of a wide range of space

1. Accept student data and still give output (purchased programs

frequently worked with instructor data hut not with student data). 2. Provide a forgiving, friendly atmosphere and the opportunity for a student to correct input mistakes, run the program, check the results on a CRT,and ohtain printed copy of the output. 3. Have the raw data in the compiled program on a diskette so the author of the program can thoroughly debug the program or make "improvements" and test the "improvements" immediately with real data. 774

Journal of Chemical Education