From faf50a745682f601f9876c8acb42b27b0e8c88c3 Mon Sep 17 00:00:00 2001 From: blh002 Date: Fri, 23 Sep 2016 11:27:23 -0400 Subject: [PATCH 1/3] started 1.9 --- Problem 1.9 .ipynb | 98 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 Problem 1.9 .ipynb diff --git a/Problem 1.9 .ipynb b/Problem 1.9 .ipynb new file mode 100644 index 0000000..ae44464 --- /dev/null +++ b/Problem 1.9 .ipynb @@ -0,0 +1,98 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "collapsed": true + }, + "source": [ + "# Problem 1.9 \n", + "\n", + "## Problem Statement \n", + "\n", + "A particle of mass $m$ is in the state $$\\Psi(x,t) = A e^{-a[(mx^2/\\hbar)+it]},$$\n", + "\n", + "where $A$ and $a$ are positive real constants.\n", + "\n", + "* Find $A$\n", + "* For what potential energy function $V(x)$ does $\\Psi$ satisfy the Schr\\\"odinger equation?\n", + "* Calculate expectation values of $x$, $x^2$, $p$, $p^2$.\n", + "* Verify that products are consistent with the uncertainty principle.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAGEAAAAaCAYAAACn4zKhAAAABHNCSVQICAgIfAhkiAAABCFJREFU\naIHt2GuoVFUUwPGfpowmXVOvr6QyexdpmbcS84GJ0eNSiVIWYqW9qSTEoBf6QTTtS0hQUVgUVlD0\noUQDCyohe0hWlERoRGVRQuKlsjLqw9rDPXMavTO3OTeh+cPA3mvv2WvN2et1hib/Ob0KPPtktOD9\ngs7vjdvQP81XFaSnkUzASLzSE8qOwcqCdbTj6DR+CWcXrK9R3IkpPaHoWbQWrGMRlqTxKlx+gH0n\nYkTBttRDP2wQkVwY47G2SAWJEo5I4w046gD7VmNAGo/CPNxYrGld8hAuLU+KuI1Z2FTAuXl+Qwcm\n4U3sqrKnhMPwc5p/i8k4pSC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nfcQfbKPEK3UJn4s6sb/nTWvSpEmTJk3+f/wNgqS0Tt2ZgKQAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$e^{a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + ], + "text/plain": [ + " ⎛ 2 ⎞\n", + " ⎜m⋅x ⎟\n", + " a⋅⎜──── + ⅈ⋅t⎟\n", + " ⎝ ℏ ⎠\n", + "ℯ " + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import sympy as sp\n", + "from sympy.physics.quantum.constants import hbar\n", + "\n", + "sp.init_printing()\n", + "\n", + "A, a, m = sp.symbols (\"A a m\", real = True, positive = True)\n", + "x,t = sp.symbols (\"x t\", real = True)\n", + "\n", + "Psi = sp.exp(a*((m*x**2/hbar)+sp.I*t))\n", + "Psi" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "anaconda-cloud": { + "environment": null, + "summary": "trying to figure this out", + "url": "https://anaconda.org/brittanyhassman/untitled" + }, + "kernelspec": { + "display_name": "Python [Root]", + "language": "python", + "name": "Python [Root]" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.5.2" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} From 0a5e60e98d87afd9798dfb0698eb0920ea5f92b2 Mon Sep 17 00:00:00 2001 From: blh002 Date: Wed, 5 Oct 2016 16:11:33 -0400 Subject: [PATCH 2/3] help I can't figure out how to fix this error, I have fixed my other ones I think, but I don't know what this one means or why it wont work. --- Griffiths1.5.ipynb | 6 +++--- Problem 1.9 .ipynb | 52 +++++++++++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/Griffiths1.5.ipynb b/Griffiths1.5.ipynb index b0c22dd..7c5402d 100644 --- a/Griffiths1.5.ipynb +++ b/Griffiths1.5.ipynb @@ -21,7 +21,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": { "collapsed": false }, @@ -608,9 +608,9 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [PHYS362]", + "display_name": "Python [Root]", "language": "python", - "name": "Python [PHYS362]" + "name": "Python [Root]" }, "language_info": { "codemirror_mode": { diff --git a/Problem 1.9 .ipynb b/Problem 1.9 .ipynb index ae44464..03cb3f9 100644 --- a/Problem 1.9 .ipynb +++ b/Problem 1.9 .ipynb @@ -22,26 +22,27 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "metadata": { - "collapsed": false + "collapsed": false, + "scrolled": false }, "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAGEAAAAaCAYAAACn4zKhAAAABHNCSVQICAgIfAhkiAAABCFJREFU\naIHt2GuoVFUUwPGfpowmXVOvr6QyexdpmbcS84GJ0eNSiVIWYqW9qSTEoBf6QTTtS0hQUVgUVlD0\noUQDCyohe0hWlERoRGVRQuKlsjLqw9rDPXMavTO3OTeh+cPA3mvv2WvN2et1hib/Ob0KPPtktOD9\ngs7vjdvQP81XFaSnkUzASLzSE8qOwcqCdbTj6DR+CWcXrK9R3IkpPaHoWbQWrGMRlqTxKlx+gH0n\nYkTBttRDP2wQkVwY47G2SAWJEo5I4w046gD7VmNAGo/CPNxYrGld8hAuLU+KuI1Z2FTAuXl+Qwcm\n4U3sqrKnhMPwc5p/i8k4pSCbxmJ7TnYSJuZkb+OSgmwAW3BqkQoytOC+g6xfiWmZ+T3YI5qFjbi6\nRj1zatxXwnE52ZO4IScbg49rPLNb7MLgIhVkuAl902dGlfVHVHaAg0RU9KtTz9LuGJf4CsfmZEfi\nx/KkTzcO7YMH8LVoD2eKir8jrbdib2b/YMzHVDwooqQFo0WrNkK0s3tFriwzSRTVcdgq8vqFWIyd\nwstXY7lIOZNzdo7E9/grI5u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zRie7B\nuAy/JUMaxJ1jO54U7qRFJDALRBLzXubzLyT9OhHnYE9ck8oDhAvJeYF1qXyODnfTIFzg5GT3DPwh\n3HFX1CW72wvkE/F8pr69SHy6m8wV8pFYzJ+JRbcaH4pFvzw9xIIdIhKdkjhGfiB9WUxkMXd1Hj4W\nNxY55ohEohyO1hEne5upYrJ6kpYe7GuuzjdQHlvgdfn+d4GYwMLsa7xYOc0Z2TixK4Z3w9DJIlHo\nbQrPfv2JsTigUNiZC50tLpZ/zchWpr+N8jOwNuE2p4i0uEZcC7XIP9eVSl/8ZFIvXNXGrhT7iA/K\nUd5VnDVeEglM7vlSfMHsNVIt1osMsko/4RmbXqLC2WICZ2dkjUk2p4h+lQpT7NeISeIM8maRttwN\nQPYwv0q4yWLueKQ4t1TpJQ7EDzr+1aCQA8Rue6JAPg+vyU8AmsSNSLGMtUoPs5+4M1wvJuhj+dln\njcgol6X2teJge0JqH4Q78JQ4iN8lznPlXpZXqVKlSpUqVaqUxL/YFeDqGDaWCgAAAABJRU5ErkJg\ngg==\n", "text/latex": [ - "$$e^{a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + "$$A e^{a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" ], "text/plain": [ - " ⎛ 2 ⎞\n", - " ⎜m⋅x ⎟\n", - " a⋅⎜──── + ⅈ⋅t⎟\n", - " ⎝ ℏ ⎠\n", - "ℯ " + " ⎛ 2 ⎞\n", + " ⎜m⋅x ⎟\n", + " a⋅⎜──── + ⅈ⋅t⎟\n", + " ⎝ ℏ ⎠\n", + "A⋅ℯ " ] }, - "execution_count": 3, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } @@ -55,18 +56,39 @@ "A, a, m = sp.symbols (\"A a m\", real = True, positive = True)\n", "x,t = sp.symbols (\"x t\", real = True)\n", "\n", - "Psi = sp.exp(a*((m*x**2/hbar)+sp.I*t))\n", + "Psi = A*sp.exp(a*((m*x**2/hbar)+sp.I*t))\n", "Psi" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "metadata": { - "collapsed": true + "collapsed": false }, - "outputs": [], - "source": [] + "outputs": [ + { + "ename": "TypeError", + "evalue": "'Mul' object is not callable", + "output_type": "error", + "traceback": [ + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m#set normalization condition\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mnormalization_condition\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mEq\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mintegrate\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mPsisq\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moo\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moo\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 6\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;31m#solve for A\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", + "\u001b[1;31mTypeError\u001b[0m: 'Mul' object is not callable" + ] + } + ], + "source": [ + "#Psi squares \n", + "Psisq = Psi*sp.conjugate(Psi)\n", + "\n", + "#set normalization condition\n", + "normalization_condition = sp.Eq(1, sp.integrate, (Psisq (x, -sp.oo, sp.oo)))\n", + "\n", + "#solve for A\n", + "sp.solveset (normalization_condition, A)" + ] } ], "metadata": { From 487e148cd413f403ef14b699c04391977de98654 Mon Sep 17 00:00:00 2001 From: blh002 Date: Wed, 2 Nov 2016 15:41:16 -0400 Subject: [PATCH 3/3] Problem 1.9 I finished one!! --- Griffiths 1.9.ipynb | 4 +- Problem 1.9 .ipynb | 497 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 475 insertions(+), 26 deletions(-) diff --git a/Griffiths 1.9.ipynb b/Griffiths 1.9.ipynb index 8ab855a..6dec012 100644 --- a/Griffiths 1.9.ipynb +++ b/Griffiths 1.9.ipynb @@ -617,9 +617,9 @@ "metadata": { "anaconda-cloud": {}, "kernelspec": { - "display_name": "Python [conda env:PHYS362]", + "display_name": "Python [Root]", "language": "python", - "name": "conda-env-PHYS362-py" + "name": "Python [Root]" }, "language_info": { "codemirror_mode": { diff --git a/Problem 1.9 .ipynb b/Problem 1.9 .ipynb index 03cb3f9..f640545 100644 --- a/Problem 1.9 .ipynb +++ b/Problem 1.9 .ipynb @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 13, "metadata": { "collapsed": false, "scrolled": false @@ -30,19 +30,19 @@ "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHAAAAAaCAYAAABvj9h3AAAABHNCSVQICAgIfAhkiAAABNdJREFU\naIHt2nls1EUUwPEPlFqUUEUrFG/xvkDRYkg9CBovJKKRaI1aFbwVCRhMvFL+MCrqH0qMRzTeqH8Y\n/1AjMcSo4H2beEc8QJSIkdAoqAj+8WbT3y5Lu1u7bU32m/zSmTdvZ97+Zua9N7Olyv+aAX1twGbY\nB/V4t0L9D8Tl2DLV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D8I3Of8EpxP7iFD9ZIG/Hq/IJS5O4\nnSrG3KvoR4wUV5WrxWJ+IJ+F1whm/W1q/1NcHJyQ2gfhTjwtLjruFjlwuR9aqqiiiiqqqKKKKjZ5\n/A8tT+LqeB60SwAAAABJRU5ErkJggg==\n", "text/latex": [ - "$$A e^{a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + "$$A e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" ], "text/plain": [ - " ⎛ 2 ⎞\n", - " ⎜m⋅x ⎟\n", - " a⋅⎜──── + ⅈ⋅t⎟\n", - " ⎝ ℏ ⎠\n", - "A⋅ℯ " + " ⎛ 2 ⎞\n", + " ⎜m⋅x ⎟\n", + " -a⋅⎜──── + ⅈ⋅t⎟\n", + " ⎝ ℏ ⎠\n", + "A⋅ℯ " ] }, - "execution_count": 5, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -54,40 +54,489 @@ "sp.init_printing()\n", "\n", "A, a, m = sp.symbols (\"A a m\", real = True, positive = True)\n", - "x,t = sp.symbols (\"x t\", real = True)\n", + "x, t = sp.symbols (\"x t\", real = True)\n", "\n", - "Psi = A*sp.exp(a*((m*x**2/hbar)+sp.I*t))\n", + "Psi = A*sp.exp(-a*((m*x**2/hbar)+sp.I*t))\n", "Psi" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { - "ename": "TypeError", - "evalue": "'Mul' object is not callable", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m\u001b[0m in \u001b[0;36m\u001b[1;34m()\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[1;31m#set normalization condition\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m \u001b[0mnormalization_condition\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mEq\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mintegrate\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mPsisq\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mx\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m-\u001b[0m\u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moo\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0moo\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 6\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 7\u001b[0m \u001b[1;31m#solve for A\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", - "\u001b[1;31mTypeError\u001b[0m: 'Mul' object is not callable" - ] + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWQAAAAgCAYAAAAlpQLuAAAABHNCSVQICAgIfAhkiAAACchJREFU\neJztnXuMHVUdxz+l224tdLtueBSK9rIuSIlYbKEGhGoraAWlgJAKkpIgYkSiW1FRwdK6ioVACwLh\nJfRGgULEB1IQKaAgiI8I1UKipCRVtGIVIVIsarH+8Z3JnZ07j3Pmzp1Hez7Jze6dOTPn7O9857x+\nvzkLDofD4agF+wIXez8dDofDkZ1BYASYmuXijwJPA/PzLBEwGbjEMO32HD6OeGzqYj47bn2Y2uFQ\ndlwbVAEbPUI962IB8Axwus1FRwGbgWldKNDZQNMw7b3AhC6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t[4]{m}}{\\sqrt[4]{\\hbar} \\sqrt[4]{\\pi}}, \\frac{\\sqrt[4]{2} \\sqrt[4]{a} \\sqrt[4]{m}}{\\sqrt[4]{\\hbar} \\sqrt[4]{\\pi}}\\right\\}$$" + ], + "text/plain": [ + "⎧ 4 ___ 4 ___ 4 ___ 4 ___ 4 ___ 4 ___⎫\n", + "⎪-╲╱ 2 ⋅╲╱ a ⋅╲╱ m ╲╱ 2 ⋅╲╱ a ⋅╲╱ m ⎪\n", + "⎨───────────────────, ─────────────────⎬\n", + "⎪ 4 ___ 4 ___ 4 ___ 4 ___ ⎪\n", + "⎩ ╲╱ ℏ ⋅╲╱ π ╲╱ ℏ ⋅╲╱ π ⎭" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "#Psi squares \n", + "#Psi squared \n", "Psisq = Psi*sp.conjugate(Psi)\n", "\n", "#set normalization condition\n", - "normalization_condition = sp.Eq(1, sp.integrate, (Psisq (x, -sp.oo, sp.oo)))\n", + "normalization_condition = sp.Eq(1, sp.integrate(Psisq, (x, -sp.oo, sp.oo)))\n", "\n", "#solve for A\n", - "sp.solveset (normalization_condition, A)" + "values= sp.solveset (normalization_condition, A)\n", + "values" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQwAAAAgCAYAAADnlUZqAAAABHNCSVQICAgIfAhkiAAACptJREFU\neJztnHucVVUVx7/zgMFBhmFEAam80UigCX6GRxkExivSECXIEBSDCc2ieIUVpkOoIBaoSIqolA+w\nMvOBRaKV+Mr8iBnZW7MsLIIPFBjQi/747eM599zzvHPuZdD9/XzuZ+7ZZ5+99jmz99prrb3OBYvF\nYrFYLJZy0Bm4KkX9gxl8LOXjncCgErVdCcwCFpjP4cJAYFxGbaWZP2N5A8yfmcDXUtT/LtChNF2x\nZMzbgKUlbH8c8Fbz/dvAgBLKyprPAMMyaCf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yuQDkSfdH7EI8g1yQuNyCNrDPQ7374\n0+g3oTwEL1Uo6nwj+ucFDZhqlPx2Fwp8XocUXTFp+pby0R3l3SRhI+liF6Cg5n7ycyd6ogX4ceJf\nxkszpkHp5l53ug5laRf7eyAWi8XDbBTQtlgslliewN39eNPSmh88tVjeLDSiZLxS/h7qYYFVGBZL\nPP4fyrFYLJZQHiD6VQWLxWKxWCwWi8VisVgsFksb4v933nwOPm49DgAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$\\frac{\\sqrt[4]{2} \\sqrt[4]{a} \\sqrt[4]{m}}{\\sqrt[4]{\\hbar} \\sqrt[4]{\\pi}} e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + ], + "text/plain": [ + " ⎛ 2 ⎞\n", + " ⎜m⋅x ⎟\n", + " -a⋅⎜──── + ⅈ⋅t⎟\n", + "4 ___ 4 ___ 4 ___ ⎝ ℏ ⎠\n", + "╲╱ 2 ⋅╲╱ a ⋅╲╱ m ⋅ℯ \n", + "──────────────────────────────────\n", + " 4 ___ 4 ___ \n", + " ╲╱ ℏ ⋅╲╱ π " + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Psi = Psi.subs(A, next(iter(values)))\n", + "Psi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Part b solving for V(x) \n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAARoAAAAgCAYAAADNJbfFAAAABHNCSVQICAgIfAhkiAAAC0BJREFU\neJztnHuUVVUdxz/MDAyBDDCCPMsbjSapQLyKJCwePSAUCEIUwYA0LRSR0CR1gERAA8Vcii8IFKjI\nNCRRqBXgI3MBKmZPSVPRChYUFKQl/fHdZ51zzz3PO+fM3KHzWeuuOWff393n3HN/e+/faw9kZGRk\nZKTOR4EKoEdD30hGRkY4rYFFEeT6AscS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YQP5PtQ\nOUctSlVHpQXSpztd7a+jSuam+MfW4uo0aIwcwB7jE/CuKE+NOciq+WoRnx2ENqY94HqtwztoNRM7\ngzQd+//9NjHt1j6bchSs3o/MvXZEc8u8GIZqTb4VUd6yrtzu2BoKTc3eRrYKZXi8Mk+LkYvqXKH6\nIVfTXRiXUVo8QeFmTDenIx3YRTxrZoj5nDNQa8UkL0GLkztkYBFXp0FW+g8c52eba0XZIpEI7dEG\nx2Jmtv345+Xne8h3RrUoSygclDUoILwU1bF0R3tyfoZcqLpsjX8Gfc8onINdnOVkM6ojcVKOovh3\noR/dS9EqUAHkOhQQXoYmz/rYRpJRPB2RrkZhE/FiM6Bg71Hy9051QQv3k4RvMo2j06C4qNPtr0JV\n/XX5nzwZGRl1ZAYK9GdkZGSkxlPY2aT/W1Kp4MvIyADkxh8k3Y3BjYJsosnISI/z8U5mZGRkZCTG\nBvxL+jMyMjIyMjIyMjIyMjIyMjIyMuqV/wFAYYvqZQiVvAAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$- \\frac{\\sqrt[4]{2} i a^{\\frac{5}{4}} \\sqrt[4]{m}}{\\sqrt[4]{\\hbar} \\sqrt[4]{\\pi}} e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + ], + "text/plain": [ + " ⎛ 2 ⎞ \n", + " ⎜m⋅x ⎟ \n", + " -a⋅⎜──── + ⅈ⋅t⎟ \n", + " 4 ___ 5/4 4 ___ ⎝ ℏ ⎠ \n", + "-╲╱ 2 ⋅ⅈ⋅a ⋅╲╱ m ⋅ℯ \n", + "─────────────────────────────────────\n", + " 4 ___ 4 ___ \n", + " ╲╱ ℏ ⋅╲╱ π " + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "DerPsi = sp.diff(Psi, t)\n", + "DerPsi" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoA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wHsQJq0H5VTaCm0XsR3py5B5147MvQ3I3GNmcxjKjthCdefe8Xg8JaYQYZUvV3OuHOhXoTSm\n0ZzTNiOQ434N0rzaYup5PJ4eQKHCypWr2U4rEuRAtzfxggJGt0UC6eWY9mcR/iTREmRWejweT9k5\nluImi/N4PB6Px+PxeDwej8fj8Xg8Ho+nbPwfzYD5KOfj5GsAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\frac{2 \\sqrt[4]{2} a^{\\frac{5}{4}} m^{\\frac{5}{4}}}{\\hbar^{\\frac{5}{4}} \\sqrt[4]{\\pi}} \\left(\\frac{2 a}{\\hbar} m x^{2} - 1\\right) e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + ], + "text/plain": [ + " ⎛ 2 ⎞\n", + " ⎜m⋅x ⎟\n", + " ⎛ 2 ⎞ -a⋅⎜──── + ⅈ⋅t⎟\n", + " 4 ___ 5/4 5/4 ⎜2⋅a⋅m⋅x ⎟ ⎝ ℏ ⎠\n", + "2⋅╲╱ 2 ⋅a ⋅m ⋅⎜──────── - 1⎟⋅ℯ \n", + " ⎝ ℏ ⎠ \n", + "─────────────────────────────────────────────────\n", + " 5/4 4 ___ \n", + " ℏ ⋅╲╱ π " + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SderPsi = sp.diff(Psi, x, 2)\n", + "SderPsi" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA7gAAAAgCAYAAAA45NToAAAABHNCSVQICAgIfAhkiAAAFElJREFU\neJztnXm0JVV1h7/u1/TDbvrRNDOEcG0bQ0uY6Y4EAoTBEEijIAgok9BKNIqAiAIBH6MMBhRiwiQ8\nZTSQBBQMiBmAdkrCYACzkgASUVCG0AYMQ4ydP35V69atW8M5davq1q23v7XeWu/WrXuq6tQ5v31q\n1z77gGEYhmEYhmEYhmEY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OwkHlVTRDfAXzviXEmy5zcJ\nn3oeVE98jmWaYYCfbtyF39xbGNzuTmedAj+tqmKMA80Y55StVyGL0JSTpPl5rnXvWj9lXMM6QZkX\nBX9zgS+huaSXoUF9UfK0oKr25ct6aC77o3Tvx/PA35M8BeAcktfoNZs1mvjYLF/7Ac20IYYxrTke\nJaUwDMNwxXTDmO7cD7x/2CfRANqqBY/Tn7XaGF3a2k4Nw0jhW3SznBqGYbhgumFMd/ZDCQ2nO23U\ngmX4LWlmNJ82tlPDMFJYRHcpCsMwDBdMNwxD3E16xv7pQBu1YAxlfV487BMxSqON7dQwjAzOQNke\nDcMwXDHdMAyxIXozNG/YJzIk2qgF56AMuEZ7aGM7NQwjg6+RvRi8YRhGHNMNw+iyJXDusE9iSLRN\nCyaAg4d9EkbptK2dGoZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGIZhGEZr\n+X99Irm2ByG7dwAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$\\frac{\\sqrt[4]{2} a^{\\frac{5}{4}}}{\\sqrt[4]{\\pi}} \\hbar^{\\frac{3}{4}} \\sqrt[4]{m} e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)} = \\frac{\\sqrt[4]{2} V \\sqrt[4]{a} \\sqrt[4]{m}}{\\sqrt[4]{\\hbar} \\sqrt[4]{\\pi}} e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)} - \\frac{\\sqrt[4]{2} a^{\\frac{5}{4}}}{\\sqrt[4]{\\pi}} \\hbar^{\\frac{3}{4}} \\sqrt[4]{m} \\left(\\frac{2 a}{\\hbar} m x^{2} - 1\\right) e^{- a \\left(\\frac{m x^{2}}{\\hbar} + i t\\right)}$$" + ], + "text/plain": [ + " \n", + " ⎛ 2 ⎞ ⎛ 2 ⎞ \n", + " ⎜m⋅x ⎟ ⎜m⋅x ⎟ \n", + " -a⋅⎜──── + ⅈ⋅t⎟ -a⋅⎜──── + ⅈ⋅t⎟ \n", + "4 ___ 3/4 5/4 4 ___ ⎝ ℏ ⎠ 4 ___ 4 ___ 4 ___ ⎝ ℏ ⎠ \n", + "╲╱ 2 ⋅ℏ ⋅a ⋅╲╱ m ⋅ℯ ╲╱ 2 ⋅V⋅╲╱ a ⋅╲╱ m ⋅ℯ \n", + "────────────────────────────────────── = ──────────────────────────────────── \n", + " 4 ___ 4 ___ 4 ___ \n", + " ╲╱ π ╲╱ ℏ ⋅╲╱ π \n", + "\n", + " ⎛ 2 ⎞\n", + " ⎜m⋅x ⎟\n", + " ⎛ 2 ⎞ -a⋅⎜──── + ⅈ⋅t⎟\n", + " 4 ___ 3/4 5/4 4 ___ ⎜2⋅a⋅m⋅x ⎟ ⎝ ℏ ⎠\n", + " ╲╱ 2 ⋅ℏ ⋅a ⋅╲╱ m ⋅⎜──────── - 1⎟⋅ℯ \n", + " ⎝ ℏ ⎠ \n", + "- ─────────────────────────────────────────────────────\n", + " 4 ___ \n", + " ╲╱ π " + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "V = sp.symbols(\"V\", real=True)\n", + "ShE = sp.Eq(sp.I*hbar*DerPsi, -hbar**2/(2*m)*SderPsi + V*Psi)\n", + "ShE" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAALIAAAAZCAYAAACVUXRFAAAABHNCSVQICAgIfAhkiAAABk1JREFU\neJzt2nusHHUVwPGPtLSh1vbaUpFW0+vF8jKkQKHy8halBIKJCIoJoUpUEiMJIoigQbGAIlZEgqQG\nI3Kx8hBQY0PlobGLEZQilrdGHvIo8gjU1hYJguAfZ8bOnTu7d2bvdndb9ptMdufMb37nzMz5/c75\nPejRYytgXINre+A87Ilb22NOjx6FTMFSvA/34MWyNx6Gp7BriwxZkBjRo71MxLcxvtOGtIhjsQbv\nKHvDL/DdFinfBd9qUV3dxntxChbj1xj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H5eq5Gn/IyQaSsh/M1Z3lKc19+EbMFT3N3SWPRj3oEeIZrrIp0uwgIsfZBeV/\njKMa1HdFHRvW4sE61+qtFpa1rYo/paxUYWq4VlC4D68a2RqOF62vz0iu1XhpdBnOKZA3o+vzIiTl\n563/IVKXLCfiJTG4LWI38TK7eRblfGHjKRnZcYksH33gASPz+TIMqd4jl7GtmW9MC5ao3y1yy3zv\ntkC0znV4V+7aj/CROvUtFjnoWRlZOghoRtf7RdjKDmh2Fj12LVf2KLGkvNGmHiPLIUk9t2dkReU6\nyaDoLS/NyBaKsPynXNl9RSTY0B7TStnWzDeuSxVHTqfSnsjIJoqPnu5Xzg+GbhLhdFJOvijRfW5O\nnqYFVXWNEy9vZa6+g0UOls3LpgmnvzJTz3ZYIvZgE3n3vWITkMTWdi52jMYksavtWptsJJxlhUjn\n9snIT9L6NGmstjXjT3Wpsk/1YdFSsiP/S0R4fkSMJtcW3He26HXTTSuDYovozfhJzpZ01aaqrr1E\nKKrldB8sZjKyG7H7k/puEa1/lcjpTsOfheMPGD4HfqbiPSOdYn+RVy7PyGaLfbqr8UUxeCUa5V+S\no5tsW685fyqkniNvMDKfel3MzV4kpkjGi0HaSjGFMg9fLqhrlQgRC/Ebsdd5msiZ8qQzF1V1zRSb\neO7M1TfD8MZCjJyvFz3wGtFTTRe54Lzk2E+87EtFirHcyBDYSQbFokMtI3tVTGN9PDnWifHCfCPH\nCN1gG83501QVUqTD8KTm1uZ7bF0M6Z7NXIvERrSZo5Qbxm5isJbPY3u8sdjb2HbAtYKpYipyifau\nnPbo0aNHjx493pj8DzdzoAlQVGeVAAAAAElFTkSuQmCC\n", + "text/latex": [ + "$$\\left\\{a \\left(2 a m x^{2} - \\hbar\\right) + \\hbar a\\right\\}$$" + ], + "text/plain": [ + "⎧ ⎛ 2 ⎞ ⎫\n", + "⎨a⋅⎝2⋅a⋅m⋅x - ℏ⎠ + ℏ⋅a⎬\n", + "⎩ ⎭" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "Vx = sp.solveset(ShE, V)\n", + "Vx" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAGcAAAAWCAYAAADdP4KdAAAABHNCSVQICAgIfAhkiAAAA/xJREFU\naIHt2HuIVVUUx/HPOD4qTSe1h4k0TWMgUTJFKVpmZQ8KDKP6IwalsiIhCCcKMyiyB9jDQIsyisre\nLxDsZQRT9A56/hfZkGVUZBllkZXTH+vcPPfMvTpn7mnu/HG/cLhnr33O2j/W2XvttS8NhixN9RYw\niMzALIzDbKzAG3VVFAxVXYPGGNyaap+P3zG5PnL+Y6jqGlSOwk4clrTHolcEo570W9d92JJ0/o13\ncW4FhxsTh734GDMLl8xxeB4v4TM8oLbZ1CTSRymNHyH0d9Tgswhy6Sp1Pr4Hpx/htIIEZjlaTICW\npD1G5OAf0FrQGOtwR0G+imS3uvYWH6d7Nw4W4IpiNZXxAtoztg6h68kC/F+ElYZeMdQvXd/hqyp9\nY/EchhWrq4zfsBkHZOw/48cafZ8pggB7KW4l1kpFXZWC3CPy+4gKfTcm187i9ZWNfyBGZ+x/ipU9\nUOZgEl7EQTgjadebqrqGV3i4R2zyU/Blyj4Tf+CT/1NpMs6+YgWXOFh8sO4Kz5+MJULrfngdl+GE\n1DNt2JD4TTMudX825mE6FmE8zhPpdBZuFwXKUkzA/hiJC/FXys8x6Ezea8XiRE+LmPTXY1MOXWXc\nkjg+JWUbgfXYp8o7D4rKLc81t5qAKpr+EUFKc7FIda1JezK2i4IlDyNxV3L/Ad5El135/xpRkNwp\nAgrN+FV8yBJTsTr13kP4PNE9W2ScrpzayrhEfJzFKdsynF6L0xpoE0G4KWOfLmZsZ8b+jQhiHk4V\nx4YmbMWzmf6lYnIcm7Fvw9Wp9j3K0/EzeC+5nyJW34Sc2voI7cXNSbtdnDPqwShx3qoU7A2iSEjv\njYcI7fNzjjNJ7GfTk/ePz/Q/gXcytrbk2bMy46fZYlccC6E9GfSxpP20yPf1YJ0oQLK0iIPyUxn7\nIjHDW/q80T+uFGlxZMb+rUitaZaIPXhMFV/TRBznDVBLxYJgs8iNh2KhOBB+vwc/98t/2u4Sm3c1\nbhD5ekXKthCPiAnUrO9sPlHsZ9uE/p6cmk7CW9iRsh0uVlZ35tkFeFmU/m3Kiydiz96Bt1O2Ss/l\n5mv8JM409Tisdaq8YtYmv1PFrDwn1TdKnM9KKXBNzjGbRZpclrFfKoKc3kvGi5Vb+nvrbpEWV+LI\nxLZeFBclhok9qd9UWjnEjJuB5SIIg8kcrMIreDRlH57S8oVYIenKaY1IMZswUUyuPHSIdNidsc8V\nQd6esrUmY24Uq/V9cZC8Ch+KQqUNv6TeWS7SdM2sxbVFOBoAW8VHqHSlU1y7KApWifJ1Gi7Aa6K0\nz7tPzsen+k7YV3F5xtYsKrF7cZ3ILhOTcW9LrtF4WPyhvFoUWg0aNGjQoMGQ5F8rDeISfefuMQAA\nAABJRU5ErkJggg==\n", + "text/latex": [ + "$$V = 2 a^{2} m x^{2}$$" + ], + "text/plain": [ + " 2 2\n", + "V = 2⋅a ⋅m⋅x " + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sp.Eq(V, next(iter(Vx)).simplify())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Part c, determining the expectation values. " + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "ExpX = sp.integrate(sp.conjugate(Psi)*x*Psi, (x, -sp.oo, sp.oo))\n", + "ExpXsq = sp.integrate(sp.conjugate(Psi)*x**2*Psi, (x, -sp.oo, sp.oo))\n", + "\n", + "ExpP = -hbar*sp.I*sp.integrate(sp.conjugate(Psi)*sp.diff(Psi, x), (x, -sp.oo, sp.oo))\n", + "ExpPsq = -hbar**2*sp.integrate(sp.conjugate(Psi)*sp.diff(Psi, x, 2), (x, -sp.oo, sp.oo))" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAwAAAASCAYAAABvqT8MAAAABHNCSVQICAgIfAhkiAAAANtJREFU\nKJHN0r0uhEEUxvGf9VWItTYahSgQPYV2SxfBBbiAbfSidSE60e4trASNjghZGiHbEFnFzpscb84W\nOqd5cp6Z/5nJzMMfa6rWb+MU9xhhBV0MMngJjzgI3jFuMJcBJ3jBTPDa+MJRBtzhIvGv0auaRtFF\nbOEhAZ6wWwfWi74nwBBNzEegWfRzAgCtCHwXHSXAbNHpCLwmG6taKPoRgUGZvjwBeKsDQ/SxlgCb\nuKqaRli4xJ7fcdkoQ86zu66Wow+Dd4ZbIRoxBs/oGEdkx/gz29iXP/d/qR8UhCWn2ReXCwAAAABJ\nRU5ErkJggg==\n", + "text/latex": [ + "$$0$$" + ], + "text/plain": [ + "0" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ExpX" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAB0AAAAfCAYAAAAbW8YEAAAABHNCSVQICAgIfAhkiAAAAcVJREFU\nSInt1k2IjlEUB/Df+IjXZ+9ChAUlIswKTRn0+pgNG9mYMkrsxGIWNEXKStmRhZSyYGGJUqKRWfha\n+ig28lGsSISFWJz75M54R71PPTOZ5r86/9u953/Oufd5zmEU0FbizAI0UMP5MqKTSpx5h058KSNY\nFn34hEe4ie6REK3jK6aWdTChxJlNeIDZOIn3WFy1aAMPsR0nxLuolfDTEp7inAh4Ld5WLTgXP7Eq\n8WM4U7XobvRn/B66sKYVJ63eaQPXMz5HfLNPWvQzjjGGosv8GtUoxiwmDrN+Cj/weqQC6cQH0U0q\nwdA/0iy043lVgvw9rhzAWexqsu843og2tg2H8RF7sVFcyXIR+CJcwzwsw2ecbhbADqxMdr/B5b2Q\nRIhO801MDvsxGS/9GVumiffQkfgKPGsmOB89Gc9FV4shrGjUW3Er2TPFdJg/uA4MZLwHV3Oxorxd\nohRHE1+aIp8uyjOQsoPNSbQuyrsTdzKfW3A7492iUsX+YfEqy3QfLmaZvcA6HExrlwyu0l1sSHZd\nTI5T0Ds00wILcUhk3YsZuIL1ooHXcFk8pMfpzBIcSXab6LH3E/+e7D248a8sx/F/4zcIvUqGqFga\niwAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$\\frac{\\hbar}{4 a m}$$" + ], + "text/plain": [ + " ℏ \n", + "─────\n", + "4⋅a⋅m" + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ExpXsq" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAwAAAASCAYAAABvqT8MAAAABHNCSVQICAgIfAhkiAAAANtJREFU\nKJHN0r0uhEEUxvGf9VWItTYahSgQPYV2SxfBBbiAbfSidSE60e4trASNjghZGiHbEFnFzpscb84W\nOqd5cp6Z/5nJzMMfa6rWb+MU9xhhBV0MMngJjzgI3jFuMJcBJ3jBTPDa+MJRBtzhIvGv0auaRtFF\nbOEhAZ6wWwfWi74nwBBNzEegWfRzAgCtCHwXHSXAbNHpCLwmG6taKPoRgUGZvjwBeKsDQ/SxlgCb\nuKqaRli4xJ7fcdkoQ86zu66Wow+Dd4ZbIRoxBs/oGEdkx/gz29iXP/d/qR8UhCWn2ReXCwAAAABJ\nRU5ErkJggg==\n", + "text/latex": [ + "$$0$$" + ], + "text/plain": [ + "0" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ExpP" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAACgAAAATCAYAAADiQ08DAAAABHNCSVQICAgIfAhkiAAAAjpJREFU\nSInt1kuIjlEYB/Afw0zGJdckChOKDYpEbgkLyq2xQSRFrAYhkbKRhVCIFVYkJCI1k6JciuSSJUoj\nC/dr5DYW5/ma18mXnU/yr7f3Pf/zPOf8z3kuvfzlqPoF1xEjUYuXf1bO7zEbN9GCaRXWUhY78R41\nlRaSozve4iu+SyLf414lRRVRgzFSeLdgUDx9Kikqx1xJ4IhKCymhXTaeiDe4K4V8D+bgJBZntlOw\nCg/RDZewAhNifjamYjiWxHrzpQsYhx04jzXogV6oxlJ8KSf4Js6hJw5jGE7jVWa3DM8xIMZ98QG3\nYlyN3fF9A5exFm2C24CnUkHWBVeFd3GYX6ILvmFTOHYO/g6uFOyGxwkXZf6Pw4/UoupD0AucyGzX\nxF6jM/411pcTOEO6/iOFU/WWKnprwe6sdKPtC1z/8J0V4z7oEIdpwfhsr6O4lnF1YTuznMDtYbC6\nwC0MrnTSrlIbOpb5LpFupGvGN0ihr874J9iWcavwEZ3KCbwqhaO2wB1Cs9bcGRWCGzLfg1L+wsAC\nfxqNme2QWGN6xjfhVHzXZXNq8Rn7M74ZB6RwjsLgWHxewaYGj7Tm3954V0mpsDFbc3ns1bHAdZci\nUx/jfaWJtvEeGyLOFJz6o59UmetwP57bfq68vVJYHkjVX/rBGCmF/GImcLJU2R8K3IBYqxGTcD3z\nsRWfpMQuoS+eSS2iGLZBUqHskvrkUCzABSnUvcNultRP817bhJUZV4XjUrQ2a02p//j38QO3Knka\nduy7MQAAAABJRU5ErkJggg==\n", + "text/latex": [ + "$$\\hbar a m$$" + ], + "text/plain": [ + "ℏ⋅a⋅m" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "ExpPsq" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Part d, varifying the uncertainty principal " + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "SigmaX = sp.sqrt(ExpXsq - ExpX**2)\n", + "SigmaP = sp.sqrt(ExpPsq - ExpP**2)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAADYAAAAnCAYAAABEz7vjAAAABHNCSVQICAgIfAhkiAAAAwRJREFU\naIHt2E+IVXUUwPHPSys1FUYITQ1GqayJIqEMF2pMk4oY0aJkJi2SKQikCFsFRtAiAnUjuBIEpb8u\nzQjCSHQRtbGoFoUoaqit8l/mQmpx7vPduXPfvJl5v/couF+4cM/v/n7nd879/T2HiraZg38m+Eya\nW9ppPEFewTzUJvBMmm45NhN34EKX+usar6O3mx12Y8Ruw1041YW+usow+krKF2ATXu1Ep50esSlY\ngl9Kvv2OFbi/wza0xXwxAkUGsaxJm7fxJ77HlxjqjGmTZyk+xfZCeQ07xmjXg6uY1iG72mYKFuIP\nzMiVP43+Mdo9i68xF+/hPBalMirFGruBsziCF3Ll/cLwZvTjO6zHu5iK6QnsSc5K/Ji9P4FnWtT/\nGbvFz10mfs5/lh+wCjuNfSWaK0b6oUzehl2dNa09hoVzG1vUG8Q3Ofko1uCxVIakPsc+xHV80qJe\nPz7PyXeKM+2nxPZUVFR0iPqW3FYYXvE/Y1C6YyOlrraomXjmqdm0r+HlSepLmuEibgsL21XSAV0j\nhv1xvClu2l+JS20r7pbu8ppS101m4v2c/Dz+Uh4V17lPXINSkFIXGtv9wziOe3ECs3ERG/BZk7bD\n2FMom4p3cEbEVqvxRqZzLMp0zcFLIlr4AA9kdvXioEi+LsElo6P3m9TEVKw7+qBYgEszeT1ey9Wf\nJZwusidzhAhNrhkd+o9X1zBuxW8a+ZAZ4pK9PJP7lCeKmrLfyHzFPCOj4SEj0wDEqF/RiIKfEmu1\nyHh0EQ4vwOlc2XIcy8kv4kCZA2Vnxmacw1u5svMipHhUjOp0sQbzDGSdXsvkJ4VjPYV649EFlzOd\n+Z8wgMM5eUgkkop9jGJd5hgxhXpz3x4RofyA8qTLZuzN3mfhVzG9t5TUbaWrzj4xKnWOaOzWPSJ9\ndzu2FhvmR2ylSEV/IabL2kyuc1wkN/twssSIj8W6HMRz+EhsHmUbRytdde7RmM41EZB+m8l/Z++b\ncKiZgsVidyme3rML9baIv5yClLoqKioq0vAvNzOpYhyMIlsAAAAASUVORK5CYII=\n", + "text/latex": [ + "$$\\frac{\\sqrt{\\hbar}}{2 \\sqrt{a} \\sqrt{m}}$$" + ], + "text/plain": [ + " √ℏ \n", + "───────\n", + "2⋅√a⋅√m" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SigmaX" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAGMAAAAbCAYAAABoSjE5AAAABHNCSVQICAgIfAhkiAAAA7pJREFU\naIHt2VuIVXUUx/GPnnLMyzQNlYlBNqhkUUZZIQRBYpRdzPCpAh+SpMuD3bPERqWyHjQoKYo0opQo\nCCHJmnroKhElhU89FUZ0E6WMpPvD2ofZs+fM3mefc3AG2l/YcM7a///6rb3/e63/2udQUVExnHEd\n9PVvB3x0Mp7/Lb14c7SDqAg24LLRDqKCE7B7tIOoCNbj8tEOooIevDXaQVQE/biiYMxkXIjZHdRd\nJ7q3do+jrZd7jC95E9L0YIH8LmoJ3scnmNmGVpqz8bVog9s9jrZeJ+JpyENY3MS4TTiMrnbEUjyO\nYzvkayzqleZ4vF0wphe/4C/8IxbkMPa1oTsXK9uYP9b1GtJdcH4trioY04WLRD1ci1nJMb2NuB7T\nuQwbi3pDqIkXuM9zxnRjoEl/S8VinNtmXMRC3t4BP2NVbxirsULcwIUjjFmDq5v0txmHMF6UrZfx\nG15sIbZHcVzBmEvxmqjzz+FGfNCCVjN6S/CkaFBOx/nYmMx7T9yjY3CvyLCteEkL+88+7GpgL5MV\n8Fni50S8gDOxEwdHGN+rcQs8E6sKtG7Czwa7thli4ffmzGlVbwKeSD5/ig9xl8GO6D78KJqXvsRW\nw69YnuO3ISvEpntGxv6geCKaoRt/J3M2YWpi/wIfNRh/DrZhR4NzD2NKjtY8/CkyIc23iXYj2tFb\nhGXi5h8Q2ZjmTnHtF2Tsh0SmlGIifsCzKdtUvFPCx2JR7rYbfDqmiUVe12B8Tby7HBRPdZ1TcU+B\n1hvJvHQJOC3Rv2aEOe3oTRclbF6icXHm/A7sydj6krFXFvhuSD9+FyUGHsC1JeZvTMTvSNluSGzZ\nJybNFvFk1tkgv7vrEe3zKxn7cvF09hTEWVYvzSpRCidk7N/hkYztVnE/8zJuRE7GEdGWThFZUeYt\n8WORwpNStm3YX+Bnjqi3E3EK7i/QmS8WOFvjt4o9i9hgO6WXZqfh71tzkniyfykM4PXkc58WeB7f\niyxZWmLeJPyBpzP2/XhGlJP5OfN3iX2rX2yyecwWF39dytaFbwzuF08V+CijV6cmStzqjP1mce2T\nU7Zekb3Lku9bmtQYwlniQvcqlxULk3npHxHrNXylKHl55WMRvhJtdBHjkvjuTr7XRFt7ALeJMru+\nwEcZvTr1jFyQsW83vEE5LxnbjUu00FHV2a3cXkFs0EcM7dNn4CfRBuaVjTp7cFKTerPEJr5Z9P5z\ncT3eFeVqWof1iMbgS/EukWYAt2RsNbwqqsIa1X/9FRUVFRVt8h/wIeGVyno1PQAAAABJRU5ErkJg\ngg==\n", + "text/latex": [ + "$$\\sqrt{\\hbar} \\sqrt{a} \\sqrt{m}$$" + ], + "text/plain": [ + "√ℏ⋅√a⋅√m" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SigmaP" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAB8AAAAZCAYAAADJ9/UkAAAABHNCSVQICAgIfAhkiAAAAfZJREFU\nSInt1suLjlEcB/APRsOMW5MYRrn0KskC8colKxZsxGyE7GysWFiJDMKKLNhpZNyS5JLERmSEch1/\nARu5RLxEYSzOwzyO53163t4o8q1ncb6/3/l+n3P7ncM/hBX1CjSjjMk19puCs7V06B+1l+E6bmNC\njearcCLiyjiDS+jBIbTliexFBY01mt/D4FR7Jq5gRNIeIgzsuYyBteAtPuNr8gMVPC5gXEZXxF1E\nKeJmoBcnY4FGzEmCW5OOJYwpYL4fSyKugicYFfGv8TJLZHliPr2A4XcMwCM0RHwPPmFixD/D+yyh\nfXgjbMQWHEsSj+SYL8aBDL4ZrRE3Vhjc1Syhu8JajcRhTMU5YaqqoRPzc+Jp7MIXzIsDw5LAZmHH\nD034h+iuIjYID9CvgPEkvMPOrOBSYUqOJ4kwWtj5HVUE27G7gHEjbgmDysSexHxjiludcLOr9DmN\naQXMu7A9L+EmXqEpxXXiqexpHY47BYy3YUvEraWvvDZhFk7hQyppkbABG5J4Gu1C6czDmsRjR8Qv\noO9szsVAnE8ljMc43McmHIwEVmJdjvFC4ehextEU3yAs5Q904KOfa3MbXuCGXwtFK67lGBOWsLfK\nF89ETdiA9fUI1INuoRDVhfg+L4KSUIIzL4ffbZ71aPhjuCA8DP7j78Q3N6dkj7VehcUAAAAASUVO\nRK5CYII=\n", + "text/latex": [ + "$$\\frac{\\hbar}{2}$$" + ], + "text/plain": [ + "ℏ\n", + "─\n", + "2" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "SigmaX*SigmaP" ] } ],