diff --git a/Week 6/11 Parabolic PDEs: 1D Schrödinger Equation with Potential.ipynb b/Week 6/11 Parabolic PDEs: 1D Schrödinger Equation with Potential.ipynb index 378ddd5..954d847 100644 --- a/Week 6/11 Parabolic PDEs: 1D Schrödinger Equation with Potential.ipynb +++ b/Week 6/11 Parabolic PDEs: 1D Schrödinger Equation with Potential.ipynb @@ -259,7 +259,7 @@ "text": [ "Eigenstate n = 0 yields total probability mass = 0.9999999999999999\n", "Eigenstate n = 1 yields total probability mass = 1.0\n", - "Eigenstate n = 2 yields total probability mass = 0.9999999999999997\n", + "Eigenstate n = 2 yields total probability mass = 1.0\n", "Eigenstate n = 3 yields total probability mass = 1.0\n" ] }, @@ -286,9 +286,9 @@ "fig = plt.figure(figsize=(12,12))\n", "\n", "for n in range(the_first_few):\n", - " # TODO: Should SEQStat return normalized eigenfunctions? \n", - " # Normalize the found eigenfunctions\n", - " prob_mass = np.sum((x[1:] - x[:-1])*Psi[:-1, n]**2)\n", + " # TODO: Should SEQStat return normalized eigenfunctions?\n", + " # Normalize the found eigenfunctions using Riemann midpoint sums\n", + " prob_mass = np.sum((x[1:] - x[:-1])*(Psi[1:, n]**2 + Psi[:-1, n]**2)/2)\n", " Psi[:, n] /= np.sqrt(prob_mass)\n", " \n", " # Confirm normalization\n",