- #1

- 3

- 2

- Homework Statement
- We find the odd solutions from a python code, for odd results Wave_function returns 𝜓(0) .

And for even results we look for solutions where 𝜓′(0)=0 by returning psi[-1,1] from Wave_function.

After getting these results we are supposed to compare them to the results we would get from by solving the equation in Griffiths?

- Relevant Equations
- E = [ (n^2) (pi^2) (h-bar^2) ] / [ 2 * m * a^2]

Here are the results from the python code:

Odd results:

Even results:

I tried to solve for energy using the equation:

I substituted the value for a as 4, as in the code the limit goes from -a to a, rather then 0 to a, and hence in the code a = 2, but for the equation it would equal to 4. However after trying various values of n, none of my results are close to the ones obtained in the equation.

What am Idoing wrong?

How would I get something similar to the values obtained from the code?

Odd results:

Even results:

I tried to solve for energy using the equation:

I substituted the value for a as 4, as in the code the limit goes from -a to a, rather then 0 to a, and hence in the code a = 2, but for the equation it would equal to 4. However after trying various values of n, none of my results are close to the ones obtained in the equation.

What am Idoing wrong?

How would I get something similar to the values obtained from the code?