mis·cel·la·ne·a
# Things to put at the beginning of a jupyter notebook
import numpy as np
import matplotlib.pyplot as plt
%config InlineBackend.figure_formats=['svg']
%load_ext autoreload
%autoreload 2
np.set_printoptions(linewidth=200)
#plt.style.use('ggplot')
#from matplotlib import rcParams
#rcParams['font.family'] = 'serif'
#rcParams['font.sans-serif'] = ['Computer Modern Roman']
GaussianIntegrator[{coeff_, exp_}, var_] :=
Module[{a, b, c, aa, bb, cc},
{c, b, a} = Series[exp + aa var^2 + var bb + cc, {var, 0, 2}][[3]];
{coeff Sqrt[\[Pi]/-a], (b^2)/(-4 a) + c} /. {aa -> 0, bb -> 0,
cc -> 0}]
gi=GaussianIntegrator
psi[n_,x_]:=Sqrt[1/(2^n n! Sqrt[Pi])] Exp[-x^2/2] HermiteH[n,x]