def psi_n(n, x, m, omega):
 (n, x, m, omega) = map(S, [n, x, m, omega])
 nu = ((m * omega) / hbar)
 C = (((nu / pi) ** (S(1) / 4)) * sqrt((1 / ((2 ** n) * factorial(n)))))
 return ((C * exp((((- nu) * (x ** 2)) / 2))) * hermite(n, (sqrt(nu) * x)))

def psi_n ( n , x , m , omega ) : ( n , x , m , omega ) = map ( S , [ n , x , m , omega ] ) nu = ( ( m * omega ) / hbar ) C = ( ( ( nu / pi ) ** ( S ( 1 ) / 4 ) ) * sqrt ( ( 1 / ( ( 2 ** n ) * factorial ( n ) ) ) ) ) return ( ( C * exp ( ( ( ( - nu ) * ( x ** 2 ) ) / 2 ) ) ) * hermite ( n , ( sqrt ( nu ) * x ) ) )
returns the wavefunction psi_{n} for the one-dimensional harmonic oscillator .