Next: 6 License Up: Visual Schrödinger: A Visualizer-Solver Previous: 4 A Sample Problem

# 5 Goals and Pedagogy

Our goal is to enhance the teaching of physics not to replace instructors. While we have given examples of some possible systems to explore, there are obviously many others. We hope that individual students and instructors will use our integrator applet to study systems that we haven't thought about or that are too complex to include here.

Examples of what we mean are:

• A study of perturbation theory could compare the correct answers to perturbative results for systems beyond the usual hydrogen atom, harmonic oscillator,etc.
• By adding an additional potential to our solid slab example, the wave functions and energy levels of impurity states can be studied.
• The relationship of quantum and semiclassical methods can be directly calculated and a detailed comparison can be made.
• More advanced uses might include studying partial wave expansions in scattering theory. Other numerical techniques are usually better suited for calculating scattering properties, but if the outer boundary, where the wave function is set to zero is Rmax , and the energy computed for the radial wave function with angular momentum l is E , then the phase shift at that energy is

 tan() = (28)

where k is defined as

 E = (29)

and the jl and nl are spherical Bessel functions.
• The results of the applet can be used to give students numerical problems such as the van der Waals strength problem described in section 4 to allow students to develop their own programming skills

We have taken a middle road in producing a robust application. The applet could be much more robust in treating arbitrary input. For example, the current applet fails if the potential is so large in certain region that the wave function integrator underflows or overflows in that region. Our code could easily detect when this is about to happen and rescale the wave function in that region. Similarly, adaptive step size integrators would allow students to select an acceptable error (or we could select one for them), and they would not need to enter the number of integrator grid points. We could also make the integrator accurately include delta function and discontinuous potentials. This sort of robustness is desirable if the goal is to hide the numerics in a black box. One of our goals in our courses is to give our students a feel for how to solve numerical problems, and the kind of numerical errors that they will encounter as research physicists. We believe that an applet such as ours which is designed to fail gracefully (i.e. it shouldn't crash) but which can fail, when asked to do a numerically difficult problem is a better pedagogical tool for advanced students.

Finally, why did we write an applet in Java? The original version of this   integrator was written in C using lex and yacc for the parser generator, and the user interface used the X Windowing system. The main problem with this approach was that students needed to go to one of the physics computer rooms where they could run the code and see the results. Few students had computers where they could run let alone compile the codes. With our students having a mix of Windows, MacIntosh and Unix computers, the only truly common platform is the Web browser. The fact that both Web browsers and the Java development kits can be obtained free makes them ideal for pedagogical use. The performance of Java is far below Fortran in most of our tests, so we don't see it as a viable language for serious computing, but the platform independence and price makes it no contest for our educational codes. By making the applet available on our class web server, many more students routinely use it to check their work and study new problems.

Next: 6 License Up: Visual Schrödinger: A Visualizer-Solver Previous: 4 A Sample Problem