Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can I get the answer for this computational physics problem? I want to know if the output that I got from the code is the

Can I get the answer for this computational physics problem?

I want to know if the output that I got from the code is the right result.

Textbooks for reference:

? "Computational Physics" by Mark Newman (guide to Python in computational physics)

? "Numerical Recipes" by W. H. Press et al. (covers very comprehensibly a vast range of numerical topics; 3rd edition is in C++; older editions, e.g. in C, are freely available online)

? "Clean Code" by Robert C. Martin (great book on good programming practices)

image text in transcribedimage text in transcribed
\fExercise 2 Quantum Oscillators [15 points| In the lab we studied the harmonic quantum oscillator: the one-dimensional, time-independent Schridinger equation with a harmonic potential. Modify your program from the lab to cal- culate the same three energies (ground state and first two excited states) for the anharmonic oscillator with V(z) = Vyz?/a, which cannot be solved analytically. The parameter values stay the same: m is the electron mass, 1) = 50eV, and a = 107! m. The secant method (see example in the lecture notes) works well for finding the energy levels, but you need to adjust the initial guesses to obtain the three different states. Modify yvour program further to calculate the properly normalized wavefunctions of the anharmonic oscillator for the three states and make a plot of them, all on the same axes, as a function of over a modest range near the originsay r = 5ba to = = 5a. To normalize the wavefunctions vou will have to evaluate the integral Ecm (z)|?dx and then rescale 1 appropriately to ensure that the area under the square of each of the wavefunc- tions is 1. Either the trapezoidal rule or Simpson's rule will give you a reasonable value for the integral. Note: You may find a few very large values at the end of the array holding the wavefunc- tion. These values are an artefact of the numerical calculation. By definition the wavefunction should go to zero at the boundary. It does not in the calculation because we have some nu- merical error in the energy estimate and the wavefunction is extremely sensitive to the energy value. You can choose plot limits such that the large values are not displayed. Another simple way to deal with the large values is to make use of the fact that the system is symmetric about its midpoint and calculate the integral of the wavefunction over only the left-hand half of the system, then double the result. This neatly misses out the large values

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning Scientific Programming With Python

Authors: Christian Hill Page

1st Edition

110742822X, 9781107428225

More Books

Students also viewed these Physics questions

Question

How do rules guide verbal communication?

Answered: 1 week ago