```python
# Método para resolver las energías y eigenfunciones de un sistema cuántico numéricamente por Teoría de Pertubaciones
# Modelado Molecular 2
# By: José Manuel Casillas Martín     22-oct-2017
import numpy as np
from sympy import *
from sympy.physics.qho_1d import E_n, psi_n
from sympy.physics.hydrogen import E_nl, R_nl
from sympy import init_printing; init_printing(use_latex = 'mathjax')
from scipy import integrate
from scipy.constants import hbar, m_e, m_p, e
from mpmath import spherharm
from numpy import inf, array
import numpy as np
import matplotlib.pyplot as plt
import traitlets
from IPython.display import display
from ipywidgets import Layout, Box, Text, Dropdown, Label, IntRangeSlider, IntSlider, RadioButtons
```

Teoría de Perturbaciones

Consiste en resolver un sistema perturbado(se conoce la solución al no perturbado), y donde el interés es conocer la contribución de la parte perturbada $H'$ al nuevo sistema total.

$$ H = H^{0}+H'$$

La resolución adecuada del problema, depende en gran parte, de una correcta elección de $H'$.

```python
form_item_layout = Layout(display='flex',flex_flow='row',justify_content='space-between')

PType=Dropdown(options=['Particle in a one-dimensional box', 'Harmonic oscilator', 'Hydrogen atom (Helium correction)'])
Pert=Text()
Rang=IntRangeSlider(min=0, max=20, step=1, disabled=False, continuous_update=False, orientation='horizontal',\
                    readout=True, readout_format='d')
M=Text()
Correc=Dropdown(options=['1', '2'])
hbarra=Dropdown(options=[1, 1.0545718e-34])

form_items = [
    Box([Label(value='Problem'),PType], layout=form_item_layout),
    Box([Label(value='Perturbation'),Pert], layout=form_item_layout),
    Box([Label(value='Correction order'),Correc], layout=form_item_layout),
    Box([Label(value='n Range'),Rang], layout=form_item_layout),
    Box([Label(value='Mass'),M], layout=form_item_layout),
    Box([Label(value='Hbar'),hbarra], layout=form_item_layout),]

form = Box(form_items, layout=Layout(display='flex',flex_flow='column',border='solid 2px',align_items='stretch',width='40%'))
form
```

En esta caja interactiva llena los datos del problema que deseas resolver.

# Nota 1:
Es recomendable usar unidades atómicas de Hartree para eficientar los cálculos. 1 u.a. (energía)= 27.211eV.

# Nota 2:
Para la partícula en una caja unidimensional es recomendable que n sea mayor a 1.

## Nota 3:
Para la correción a la energía del átomo de Helio sólo es necesario seleccionar el problema, automáticamente se calcula la correción a primer orden y no se corrigen las funciones de onda.

```python
Problem=PType.value
form_item_layout = Layout(display='flex',flex_flow='row',justify_content='space-between')

L=Text()
W=Text()
atomic_number=RadioButtons(options=['1 (Show Hydrogen energies)','2 (Correct Helium first energy)'],disabled=False)

if Problem=='Particle in a one-dimensional box':
    form_items = [Box([Label(value='Large of box'),L], layout=form_item_layout)]

if Problem=='Harmonic oscilator':
    form_items = [Box([Label(value='Angular Fr'),W], layout=form_item_layout)]

if Problem=='Hydrogen atom (Helium correction)':
    form_items = [Box([Label(value='Atomic number'),atomic_number], layout=form_item_layout)]

form = Box(form_items, layout=Layout(display='flex',flex_flow='column',border='solid 2px',align_items='stretch',width='40%'))
form
```

```python
# Variables que se utilizarán
# x=variable de integracion, l=largo del pozo, m=masa del electrón, w=frecuencia angular
# n=número cuántico principal, Z=Número atómico, q=número cuántico angular(l)
var('x theta phi')
var('r1 r2', real=True)
var('l m hbar w n Z', positive=True, real=True)

# Perturbación
if Pert.value!='':
    H_p=sympify(Pert.value)
    h_p=eval(Pert.value)
else:
    H_p=0
    h_p=0

# Constantes
h=hbarra.value
a0=5.2917721067e-11
if M.value!='':
    mass=float(eval(M.value))
else:
    mass=1

# Energías y funciones que se desea corregir
n_inf=min(Rang.value)
n_sup=max(Rang.value)

if Problem=='Particle in a one-dimensional box':
    if L.value=='':
        large=1
    else:
        large=float(eval(L.value))
    omega=0
    # Energías del pozo de potencial infinito
    k=n*pi/l
    En=hbar**2*k**2/(2*m)

    # Funciones de onda del pozo de potencial infinito
    Psin=sqrt(2/l)*sin(n*pi*x/l)

    # Límites del pozo definido de 0 a l para sympy
    li_sympy=0
    ls_sympy=l
    # Mismo limites para scipy
    li_scipy=0
    ls_scipy=large

if Problem=='Harmonic oscilator':
    large=0
    if W.value=='':
        omega=1
    else:
        omega=float(eval(W.value))
    # Energías del oscilador armónico cuántico
    En=E_n(n,w)

    # Funciones de onda del oscilador armónico cuántico
    Psin=psi_n(n,x,m,w)

     # Límites del pozo definido de -oo a oo para sympy
    li_sympy=-oo
    ls_sympy=oo
    # Límites del pozo definido de -oo a oo para scipy
    li_scipy=-inf
    ls_scipy=inf

if Problem=='Hydrogen atom (Helium correction)':
    if atomic_number.value=='1 (Show Hydrogen energies)':
        z=1
    if atomic_number.value=='2 (Correct Helium first energy)':
        z=2
    large=0
    omega=0

    # Energías del átomo hidrogenoide
    En=z*E_nl(n,z)

    # Funciones de onda del átomo de hidrógeno
    # Número cuántico l=0
    q=0 # La variable l ya esta siendo utilizada para el largo de la caja por ello se sustituyo por q
    Psin=(R_nl(n,q,r1,z)*R_nl(n,q,r2,z))

     # Límites del átomo de hidrógeno de 0 a oo para sympy
    li_sympy=0
    ls_sympy=oo
    # Límites del átomo de hidrógeno de 0 a oo para scipy
    li_scipy=0
    ls_scipy=inf
```

Para sistemas no degenerados, la corrección a la energía a primer orden se calcula como

$$ E_{n}^{(1)} = \int\psi_{n}^{(0)*} H' \psi_{n}^{(0)}d\tau$$

** Tarea 1 : Programar esta ecuación si conoces $H^{0}$ y sus soluciones. **

```python
def correcion_1st_order_Energy(E_n,Psi_n,H_p,li,ls):
    E1_n=Integral(Psi_n*(H_p)*Psi_n,(x,li,ls)).doit()
    return(E_n+E1_n)
```

```python
# Correción de la energía a primer orden
E=[]
Eev=[]
Ec1=[]
if Problem=='Particle in a one-dimensional box' or Problem=='Harmonic oscilator':
    for i in range(n_inf,n_sup+1):
        E.append(En.subs({n:i}))
        Eev.append(E[i-n_inf].subs({m:mass, l:large, hbar:h}).evalf())
        Ec1.append(correcion_1st_order_Energy(En.subs({n:i}),Psin.subs({n:i}),H_p,li_sympy,ls_sympy))
if Problem=='Hydrogen atom (Helium correction)':
    for i in range(n_inf,n_sup+1):
        E.append(En.subs({n:i}))
        Eev.append(E[i-n_inf])
    if z==2:
        integral_1=Integral(Integral((16*z**6*r1*r2**2*exp(-2*z*(r1+r2))),(r2,0,r1)),(r1,0,oo)).doit()
        integral_2=Integral(Integral((16*z**6*r1**2*r2*exp(-2*z*(r1+r2))),(r2,r1,oo)),(r1,0,oo)).doit()
        integral_total=(integral_1+integral_2)
        Ec1.append(E[0]+integral_total)
```

Y la corrección a la función de onda, también a primer orden, se obtiene como:

 $$ \psi_{n}^{(1)} = \sum_{m\neq n} \frac{\langle\psi_{m}^{(0)} | H' | \psi_{n}^{(0)} \rangle}{E_{n}^{(0)} - E_{m}^{(0)}} \psi_{m}^{(0)}$$

**Tarea 2: Programar esta ecuación si conoces $H^{0}$ y sus soluciones. **

```python
# Correción de las funciones a primer orden
if Pert.value!='':
    if Problem=='Particle in a one-dimensional box' or Problem=='Harmonic oscilator':
        Psi_c=[]
        integrals=np.zeros((n_sup+1,n_sup+1))
        for i in range(n_inf,n_sup+1):
            a=0
            for j in range(n_inf,n_sup+1):
                if i!=j:
                    integ= lambda x: eval(str(Psin.subs({n:j})*(h_p)*Psin.subs({n:i}))).subs({m:mass,l:large,w:omega,hbar:h})
                    integrals[i,j]=integrate.quad(integ,li_scipy,ls_scipy)[0]
                    cte=integrals[i,j]/(En.subs({n:i,m:mass,l:large})-En.subs({n:j,m:mass,l:large})).evalf()
                    a=a+cte*Psin.subs({n:j})
            Psi_c.append(Psin.subs({n:i})+a)
```

**Tarea 3: Investigue las soluciones a segundo orden y también programe las soluciones. **

Y la corrección a la energía a segundo orden, se obtiene como:

 $$  E_{n}^{(2)} = \sum_{m\neq n} \frac{|\langle\psi_{m}^{(0)} | H' | \psi_{n}^{(0)} \rangle|^{2}}{E_{n}^{(0)} - E_{m}^{(0)}} $$

```python
# Correción a la energía a segundo orden
if Pert.value!='':
    if Problem=='Particle in a one-dimensional box' or Problem=='Harmonic oscilator':
        if Correc.value=='2':
            Ec2=[]
            for i in range(n_inf,n_sup+1):
                a=0
                for j in range(n_inf,n_sup+1):
                    if i!=j:
                        cte=((integrals[i,j])**2)/(En.subs({n:i,m:mass,l:large,hbar:h})-En.subs({n:j,m:mass,l:large,hbar:h})).evalf()
                        a=a+cte
                Ec2.append(Ec1[i-n_inf]+a)
```

**A continuación se muestran algunos de los resultados al problema resuelto**

Las energías sin perturbación son:

```python
E
```

$$\left [ \frac{\hbar w}{2}, \quad \frac{3 w}{2} \hbar, \quad \frac{5 w}{2} \hbar, \quad \frac{7 w}{2} \hbar\right ]$$

La correción a primer orden de las energías son:

```python
Ec1
```

$$\left [ \frac{\hbar w}{2} + \frac{1}{2 \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{1}{2 \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + 2 + \frac{\hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{\hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right), \quad \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{2 m}{\hbar} w \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{2 m}{\hbar} w \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{3 w}{2} \hbar + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right), \quad - \frac{18 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{18 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{9 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{9 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{2 m^{2}}{\hbar^{2}} w^{2} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{2 m^{2}}{\hbar^{2}} w^{2} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{17 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{17 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{2 m}{\hbar} w \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 m}{\hbar} w \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{5 w}{2} \hbar + \frac{1}{4 \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{1}{4 \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(9 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{12 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(9 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{12 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + 1 + \frac{\hbar}{4 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{\hbar}{4 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{5 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) + \frac{5 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right), \quad - \frac{122 m^{\frac{3}{2}} w^{\frac{3}{2}}}{3 \hbar^{\frac{3}{2}} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{122 m^{\frac{3}{2}} w^{\frac{3}{2}}}{3 \hbar^{\frac{3}{2}} \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{36 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{36 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{94 \sqrt{m} \sqrt{w}}{3 \sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) + \frac{94 \sqrt{m} \sqrt{w}}{3 \sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) + \frac{26 m^{3} w^{3}}{3 \hbar^{3} \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{26 m^{3} w^{3}}{3 \hbar^{3} \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{4 m^{3} w^{3}}{3 \hbar^{3}} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 m^{3} w^{3}}{3 \hbar^{3}} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{18 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{18 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{74 m^{2} w^{2}}{3 \hbar^{2} \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{74 m^{2} w^{2}}{3 \hbar^{2} \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{4 m^{2}}{\hbar^{2}} w^{2} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{4 m^{2}}{\hbar^{2}} w^{2} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{15 m w}{2 \hbar \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{15 m w}{2 \hbar \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{34 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{34 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{130 m w}{3 \hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{130 m w}{3 \hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{3 m}{\hbar} w \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{3 m}{\hbar} w \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{7 w}{2} \hbar + \frac{1}{2 \pi e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{15 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{1}{2 \pi e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{15 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(18 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{24 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(18 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{24 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{1}{3 \pi e^{\frac{m w}{\hbar}}} \left(\frac{345 \sqrt{\pi}}{4} \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} - \frac{46 \hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{1}{3 \pi e^{\frac{m w}{\hbar}}} \left(\frac{345 \sqrt{\pi}}{4} \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} + \frac{46 \hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{3 \hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{3 \hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{2 \hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) - \frac{2 \hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{2 \hbar}{3 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{105 \sqrt{\pi}}{16} \left(\frac{16 \sqrt{\pi}}{105} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{4} w^{4}}{\hbar^{4}} + \frac{14 m^{3}}{\hbar^{3}} w^{3} + \frac{105 m^{2} w^{2}}{2 \hbar^{2}} + \frac{105 m w}{2 \hbar} + \frac{105}{16}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{7}{2}} \sqrt{\pi}}{m^{\frac{7}{2}} w^{\frac{7}{2}}} \left(- \frac{105 m^{3} w^{3}}{16 \hbar^{3}} - \frac{1995 m^{2} w^{2}}{32 \hbar^{2}} - \frac{5985 m w}{64 \hbar} - \frac{1575}{128}\right)\right) + \frac{2 \hbar}{3 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{105 \sqrt{\pi}}{16} \left(\frac{16 \sqrt{\pi}}{105} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{4} w^{4}}{\hbar^{4}} + \frac{14 m^{3}}{\hbar^{3}} w^{3} + \frac{105 m^{2} w^{2}}{2 \hbar^{2}} + \frac{105 m w}{2 \hbar} + \frac{105}{16}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{7}{2}} \sqrt{\pi}}{m^{\frac{7}{2}} w^{\frac{7}{2}}} \left(- \frac{105 m^{3} w^{3}}{16 \hbar^{3}} - \frac{1995 m^{2} w^{2}}{32 \hbar^{2}} - \frac{5985 m w}{64 \hbar} - \frac{1575}{128}\right)\right) - \frac{9 \sqrt{\hbar}}{2 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{9 \sqrt{\hbar}}{2 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{10 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) - \frac{10 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) - \frac{14 \sqrt{\hbar}}{3 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{105 \sqrt{\pi} \sqrt{m} \sqrt{w}}{16 \sqrt{\hbar}} \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{21 m^{2} w^{2}}{2 \hbar^{2}} - \frac{105 m w}{4 \hbar} - \frac{105}{8}\right) \left(\frac{16 \sqrt{\pi}}{105} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{3} \sqrt{\pi}}{m^{3} w^{3}} \left(\frac{105 m^{2} w^{2}}{16 \hbar^{2}} + \frac{315 m w}{8 \hbar} + \frac{1575}{64}\right)\right) + \frac{14 \sqrt{\hbar}}{3 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{105 \sqrt{\pi} \sqrt{m} \sqrt{w}}{16 \sqrt{\hbar}} \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{21 m^{2} w^{2}}{2 \hbar^{2}} - \frac{105 m w}{4 \hbar} - \frac{105}{8}\right) \left(\frac{16 \sqrt{\pi}}{105} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{3} \sqrt{\pi}}{m^{3} w^{3}} \left(\frac{105 m^{2} w^{2}}{16 \hbar^{2}} + \frac{315 m w}{8 \hbar} + \frac{1575}{64}\right)\right)\right ]$$

Si seleccionaste en los parámetros iniciales una correción a segundo orden entonces...

Las correciones a la energía a segundo orden son:

```python
Ec2
```

$$\left [ \frac{\hbar w}{2} + \frac{1}{2 \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{1}{2 \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + 2 - \frac{1}{w} 7.11189250474996 \cdot 10^{33} + \frac{\hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{\hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right), \quad \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{2 m}{\hbar} w \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{2 m}{\hbar} w \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{3 w}{2} \hbar + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{1}{w} 1.18531541745832 \cdot 10^{34} + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right), \quad - \frac{18 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{18 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{9 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{9 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{2 m^{2}}{\hbar^{2}} w^{2} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{2 m^{2}}{\hbar^{2}} w^{2} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{5 m w}{\hbar \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{17 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{17 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{2 m}{\hbar} w \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 m}{\hbar} w \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{5 w}{2} \hbar + \frac{1}{4 \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{1}{4 \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(\frac{5 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{5 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(9 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{12 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(9 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{12 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + 1 - \frac{1}{w} 2.37063083491666 \cdot 10^{33} + \frac{\hbar}{4 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{\hbar}{4 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{\hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{3 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{5 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) + \frac{5 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right), \quad - \frac{122 m^{\frac{3}{2}} w^{\frac{3}{2}}}{3 \hbar^{\frac{3}{2}} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{122 m^{\frac{3}{2}} w^{\frac{3}{2}}}{3 \hbar^{\frac{3}{2}} \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{36 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{36 \sqrt{m} \sqrt{w}}{\sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) - \frac{94 \sqrt{m} \sqrt{w}}{3 \sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(- \frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) + \frac{94 \sqrt{m} \sqrt{w}}{3 \sqrt{\hbar} \pi e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) + \frac{26 m^{3} w^{3}}{3 \hbar^{3} \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{26 m^{3} w^{3}}{3 \hbar^{3} \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{4 m^{3} w^{3}}{3 \hbar^{3}} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 m^{3} w^{3}}{3 \hbar^{3}} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{18 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{18 m^{2} w^{2}}{\hbar^{2} \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{74 m^{2} w^{2}}{3 \hbar^{2} \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{74 m^{2} w^{2}}{3 \hbar^{2} \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{4 m^{2}}{\hbar^{2}} w^{2} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{4 m^{2}}{\hbar^{2}} w^{2} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{15 m w}{2 \hbar \sqrt{\pi}} \left(- \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) + \frac{15 m w}{2 \hbar \sqrt{\pi}} \left(- \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{\sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) - \frac{34 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{34 m w}{\hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{\sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{\sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{130 m w}{3 \hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{130 m w}{3 \hbar \pi e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{3 m}{\hbar} w \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{3 m}{\hbar} w \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{7 w}{2} \hbar + \frac{1}{2 \pi e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} - \frac{15 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) + \frac{1}{2 \pi e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{2} \left(- 2 \sqrt{\pi} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{2 \sqrt{\hbar}}{\sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m w}{\hbar} - \frac{1}{2}\right) e^{\frac{m w}{\hbar}} + \frac{15 \sqrt{\hbar} \sqrt{\pi}}{2 \sqrt{m} \sqrt{w}}\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(18 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{24 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{1}{\pi e^{\frac{m w}{\hbar}}} \left(18 \sqrt{\pi} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{24 \hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{1}{3 \pi e^{\frac{m w}{\hbar}}} \left(\frac{345 \sqrt{\pi}}{4} \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} - \frac{46 \hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{1}{3 \pi e^{\frac{m w}{\hbar}}} \left(\frac{345 \sqrt{\pi}}{4} \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} + \frac{46 \hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{1}{w} 2.13356775142498 \cdot 10^{34} + \frac{3 \hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) + \frac{3 \hbar}{2 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi}}{4} \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{3 m}{\hbar} w + \frac{3}{4}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{3}{2}} \sqrt{\pi}}{m^{\frac{3}{2}} w^{\frac{3}{2}}} \left(- \frac{3 m w}{4 \hbar} - \frac{3}{8}\right)\right) - \frac{2 \hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) - \frac{2 \hbar}{\pi m w e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi}}{8} \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{15 m^{2} w^{2}}{2 \hbar^{2}} - \frac{45 m w}{4 \hbar} - \frac{15}{8}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{5}{2}} \sqrt{\pi}}{m^{\frac{5}{2}} w^{\frac{5}{2}}} \left(\frac{15 m^{2} w^{2}}{8 \hbar^{2}} + \frac{15 m w}{2 \hbar} + \frac{45}{32}\right)\right) + \frac{2 \hbar}{3 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{105 \sqrt{\pi}}{16} \left(\frac{16 \sqrt{\pi}}{105} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{4} w^{4}}{\hbar^{4}} + \frac{14 m^{3}}{\hbar^{3}} w^{3} + \frac{105 m^{2} w^{2}}{2 \hbar^{2}} + \frac{105 m w}{2 \hbar} + \frac{105}{16}\right) e^{\frac{m w}{\hbar}} - \frac{\hbar^{\frac{7}{2}} \sqrt{\pi}}{m^{\frac{7}{2}} w^{\frac{7}{2}}} \left(- \frac{105 m^{3} w^{3}}{16 \hbar^{3}} - \frac{1995 m^{2} w^{2}}{32 \hbar^{2}} - \frac{5985 m w}{64 \hbar} - \frac{1575}{128}\right)\right) + \frac{2 \hbar}{3 \pi m w e^{\frac{m w}{\hbar}}} \left(\frac{105 \sqrt{\pi}}{16} \left(\frac{16 \sqrt{\pi}}{105} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) \left(\frac{m^{4} w^{4}}{\hbar^{4}} + \frac{14 m^{3}}{\hbar^{3}} w^{3} + \frac{105 m^{2} w^{2}}{2 \hbar^{2}} + \frac{105 m w}{2 \hbar} + \frac{105}{16}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{\frac{7}{2}} \sqrt{\pi}}{m^{\frac{7}{2}} w^{\frac{7}{2}}} \left(- \frac{105 m^{3} w^{3}}{16 \hbar^{3}} - \frac{1995 m^{2} w^{2}}{32 \hbar^{2}} - \frac{5985 m w}{64 \hbar} - \frac{1575}{128}\right)\right) - \frac{9 \sqrt{\hbar}}{2 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{9 \sqrt{\hbar}}{2 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{3 \sqrt{\pi} \sqrt{m} \sqrt{w}}{4 \sqrt{\hbar}} \left(- \frac{m w}{\hbar} - \frac{3}{2}\right) \left(\frac{4 \sqrt{\pi}}{3} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{4 \sqrt{\hbar}}{3 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{3}{2}}}{3 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{3 \hbar \sqrt{\pi}}{4 m w}\right) + \frac{10 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) - \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) - \frac{10 \sqrt{\hbar}}{\pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{15 \sqrt{\pi} \sqrt{m} \sqrt{w}}{8 \sqrt{\hbar}} \left(\frac{m^{2} w^{2}}{\hbar^{2}} + \frac{5 m}{\hbar} w + \frac{15}{4}\right) \left(- \frac{8 \sqrt{\pi}}{15} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + \frac{8 \sqrt{\hbar}}{15 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{3}{2}}}{15 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{5}{2}}}{5 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{2} \sqrt{\pi}}{m^{2} w^{2}} \left(- \frac{15 m w}{8 \hbar} - \frac{45}{16}\right)\right) - \frac{14 \sqrt{\hbar}}{3 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(- \frac{105 \sqrt{\pi} \sqrt{m} \sqrt{w}}{16 \sqrt{\hbar}} \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{21 m^{2} w^{2}}{2 \hbar^{2}} - \frac{105 m w}{4 \hbar} - \frac{105}{8}\right) \left(\frac{16 \sqrt{\pi}}{105} \left(- \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} + 2\right) + \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} - \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} + \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} - \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{3} \sqrt{\pi}}{m^{3} w^{3}} \left(\frac{105 m^{2} w^{2}}{16 \hbar^{2}} + \frac{315 m w}{8 \hbar} + \frac{1575}{64}\right)\right) + \frac{14 \sqrt{\hbar}}{3 \pi \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} \left(\frac{105 \sqrt{\pi} \sqrt{m} \sqrt{w}}{16 \sqrt{\hbar}} \left(- \frac{m^{3} w^{3}}{\hbar^{3}} - \frac{21 m^{2} w^{2}}{2 \hbar^{2}} - \frac{105 m w}{4 \hbar} - \frac{105}{8}\right) \left(\frac{16 \sqrt{\pi}}{105} \operatorname{erfc}{\left (\frac{\sqrt{m} \sqrt{w}}{\sqrt{\hbar}} \right )} - \frac{16 \sqrt{\hbar}}{105 \sqrt{m} \sqrt{w} e^{\frac{m w}{\hbar}}} + \frac{8 \hbar^{\frac{3}{2}}}{105 m^{\frac{3}{2}} w^{\frac{3}{2}} e^{\frac{m w}{\hbar}}} - \frac{4 \hbar^{\frac{5}{2}}}{35 m^{\frac{5}{2}} w^{\frac{5}{2}} e^{\frac{m w}{\hbar}}} + \frac{2 \hbar^{\frac{7}{2}}}{7 m^{\frac{7}{2}} w^{\frac{7}{2}} e^{\frac{m w}{\hbar}}}\right) e^{\frac{m w}{\hbar}} + \frac{\hbar^{3} \sqrt{\pi}}{m^{3} w^{3}} \left(\frac{105 m^{2} w^{2}}{16 \hbar^{2}} + \frac{315 m w}{8 \hbar} + \frac{1575}{64}\right)\right)\right ]$$

Ahora vamos con la función de onda $(\psi)$

```python
form_item_layout = Layout(
    display='flex',
    flex_flow='row',
    justify_content='space-between')

Graph=IntSlider(min=n_inf, max=n_sup, step=1, disabled=False, continuous_update=False, orientation='horizontal',\
                readout=True, readout_format='d')

form_items = [
    Box([Label(value='What function do you want to see?'),
         Graph], layout=form_item_layout)]

form = Box(form_items, layout=Layout(
    display='flex',
    flex_flow='column',
    border='solid 2px',
    align_items='stretch',
    width='40%'))
form
```

La función de onda original es:

```python
Psin.subs({n:Graph.value})
```

$$\frac{\sqrt{2} m^{\frac{3}{4}} w^{\frac{3}{4}} x}{\hbar^{\frac{3}{4}} \sqrt[4]{\pi}} e^{- \frac{m w x^{2}}{2 \hbar}}$$

La correción a primer orden a la función de onda (utilizando todas las funciones en el rango seleccionado) es:

```python
Psi_c[Graph.value-n_inf]
```

$$\frac{\sqrt{2} m^{\frac{3}{4}} w^{\frac{3}{4}} x}{\hbar^{\frac{3}{4}} \sqrt[4]{\pi}} e^{- \frac{m w x^{2}}{2 \hbar}} - \frac{4.83902992837821 \cdot 10^{32} \sqrt{3} \sqrt[4]{m}}{\sqrt[4]{\hbar} \sqrt[4]{\pi} w^{\frac{3}{4}}} \left(\frac{8 x^{3}}{\hbar^{\frac{3}{2}}} m^{\frac{3}{2}} w^{\frac{3}{2}} - \frac{12 x}{\sqrt{\hbar}} \sqrt{m} \sqrt{w}\right) e^{- \frac{m w x^{2}}{2 \hbar}} + \frac{2.37063083491664 \cdot 10^{33} \sqrt{2} \sqrt[4]{m}}{\sqrt[4]{\hbar} \sqrt[4]{\pi} w^{\frac{3}{4}}} \left(\frac{4 m}{\hbar} w x^{2} - 2\right) e^{- \frac{m w x^{2}}{2 \hbar}} - \frac{6.70515655623796 \cdot 10^{33} \sqrt[4]{m}}{\sqrt[4]{\hbar} \sqrt[4]{\pi} w^{\frac{3}{4}}} e^{- \frac{m w x^{2}}{2 \hbar}}$$

Vamos a graficarlas para verlas mejor...

La función de onda original es:

```python
if Problem=='Particle in a one-dimensional box':
    plot(eval(str(Psin)).subs({n:Graph.value,m:mass,l:large,w:omega,hbar:h}),xlim=(li_scipy,ls_scipy),\
         title='$\psi_{%d}$'%Graph.value)
if Problem=='Harmonic oscilator':
    plot(eval(str(Psin)).subs({n:Graph.value,m:mass,l:large,w:omega,hbar:h}),xlim=(-10*h/(mass*omega),10*h/(mass*omega)),\
         title='$\psi_{%d}$'%Graph.value)
if Problem=='Hydrogen atom (Helium correction)':
    print('Densidad de probabilidad para un electrón')
    plot(eval(str((4*pi*x**2*R_nl(Graph.value,q,x,z)**2))),xlim=(0,10),ylim=(0,20/Graph.value), title='$\psi_{%ds}$'%Graph.value)
    print('Tome en cuenta que debido a la dificultad para seleccionar los límites de la gráfica se muestran bien los primeros\n\
3 estados. A partir de ahí visualizar la gráfica se complica.')
```

La corrección a la función de onda es:

```python
if Problem=='Particle in a one-dimensional box':
    if Pert.value!='':
        plot(eval(str(Psi_c[Graph.value-n_inf])).subs({n:Graph.value,m:mass,l:large,w:omega,hbar:h}),\
             xlim=(li_scipy,ls_scipy),title='$\psi_{%d}$'%Graph.value)
    if Pert.value=='':
        print('No se ingreso ninguna perturbación')
if Problem=='Harmonic oscilator':
    if Pert.value!='':
        plot(eval(str(Psi_c[Graph.value-n_inf])).subs({n:Graph.value,m:mass,l:large,w:omega,hbar:h}),\
             xlim=(-10*h/(mass*omega),10*h/(mass*omega)),title='$\psi_{%d}$' %Graph.value)
    if Pert.value=='':
        print('No se ingreso ninguna perturbación')
if Problem=='Hydrogen atom (Helium correction)':
    print('Este programa no corrige las fucniones de un átomo hidrogenoide')
```

**Tarea 4.  Resolver el átomo de helio aplicando los programas anteriores.**

Para resolver el átomo de helio se utilizaron los conceptos, que sirvieron como base para las primeras tareas. Sin embargo, en el Apéndice 1 viene con mayor detalles las consideraciones tomadas para resolver el problema.

## Apéndice 1

Para el cálculo a las correciones del átomo de Helio se tomó en cuenta lo siguiente...

La función de onda del átomo de Helio puede ser representada como:

$$ \psi_{nlm} = \psi(r1)_{nlm} \psi(r2)_{nlm}$$

Donde, para el estado fundamental:

$$ \psi(r_{1}.r_{2})_{100} = \frac{Z^{3}}{\pi a_{0}^{3}} e^{\frac{-Z}{a_{0}}(r_{1}+r_{2})}$$

Y la perturbación sería el término de repulsión entre los dos electrones, es decir:

$$ H'= \frac{e^{2}}{r_{12}}=\frac{e^{2}}{|r_{1}-r_{2}|}$$

Finalmente la correción a primer orden de la energía sería:

$$ E^{1}= \langle\psi_{n}^{(0)} | H' | \psi_{n}^{(0)} \rangle =\frac{Z^{6}e^{2}}{\pi^{2} a_{0}^{6}} \int_{0}^{2\pi}\int_{0}^{2\pi}\int_{0}^{\pi}\int_{0}^{\pi}\int_{0}^{\infty}\int_{0}^{\infty} \frac{e^{\frac{-2Z}{a_{0}}(r_{1}+r_{2})}}{r_{12}} r_{1}^{2}r_{2}^{2}sen{\theta_{1}}sen{\theta_{2}} dr_{2} dr_{1} d\theta_{2} d\theta_{1} d\phi_{2} d\phi_{1}$$

Se utiliza una expansión del termino de repulsión con los armónicos esféricos y se integra la parte angular. Una vez hecho eso, la integral queda expresada de la siguiente manera:

$$ E^{1}= \frac{16Z^{6}e^{2}}{a_{0}^{6}} \left[\int_{0}^{\infty} r_{1}^{2} e^{\frac{-2Z}{a_{0}}r_{1}} \left(\int_{0}^{r_{1}} \frac{r_{2}^{2}}{r_{1}} e^{\frac{-2Z}{a_{0}}r_{2}} dr_{2}+\int_{r_{1}}^{\infty}r_{2} e^{\frac{-2Z}{a_{0}}r_{2}}dr_{2}\right) dr_{1} \right]$$

**Tarea 5: Método variacional-perturbativo. **

Este método nos permite estimar de forma precisa $E^{(2)}$ y correcciones perturbativas de la energía de órdenes más elevados para el estado fundamental del sistema, sin evaluar sumas infinitas. Ver ecuación 9.38 del libro.

```python

```

**Tarea 6. Revisar sección 9.7. **

Inicialmente a mano, y sengunda instancia favor de intentar programar sección del problema, i.e. integral de Coulomb  e integral de intercambio.

```python

```