Final: Comment on integration limits in 3.1

This commit is contained in:
2022-03-30 12:01:24 +02:00
parent 1d4130d7b6
commit e5b08f1771

View File

@ -631,9 +631,13 @@
" sigma = .25\n", " sigma = .25\n",
" positions = atomic_positions(n)\n", " positions = atomic_positions(n)\n",
" \n", " \n",
" infty = 1e3\n", " # This 'infinity' is large enough, as the Gaussians decay quite quickly\n",
" epsilon = 1e-3\n", " # away from the atomic positions, which we already saw in the overlap\n",
" x = np.arange(-infty, infty, epsilon)\n", " # above.\n",
" # TODO: Remember https://www.wolframalpha.com/input?i=integrate+1%2F%28.25*sqrt%282pi%29%29*exp%28-.5*%28x%2F.25%29%5E2%29+for+x%3D-1..1.\n",
" infty = 1e2\n",
" h = 1e-6\n",
" x = np.arange(-infty, infty, h)\n",
" \n", " \n",
" def V(x):\n", " def V(x):\n",
" ret = np.zeros(x.shape)\n", " ret = np.zeros(x.shape)\n",
@ -683,12 +687,12 @@
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
"text": [ "text": [
"-0.13881260449985544 -0.13881260449985544\n" "-3.08808170797426e-06 -0.13849169656144708\n"
] ]
} }
], ],
"source": [ "source": [
"print(hopping(1, 0, 10), hopping(0, 1, 10))\n", "print(hopping(0, 2, 10), hopping(0, 1, 10))\n",
"\n", "\n",
"# YOUR CODE HERE\n", "# YOUR CODE HERE\n",
"#raise NotImplementedError()" "#raise NotImplementedError()"