Parser for Potential Equations

Psi Spectrum allows the user to specify a custom potential in the form of a function of x. When composing such an equation, the user should remember that the graph width is preset at 8 units.

Choose ‘Parser’ from the ‘Potential’ menu. The following window should appear.

Enter the potential equation and press ‘OK’.

The following is a list of functions available to the parser:

• abs -absolute value
• exp -exponential
• int,frac -integer and fractional part of argument
• re,im -real and imaginery part of complex num
• sqrt,sqr -square root and square
• log,ln -logarithms of base 10 and e
• H -unit step (1 if x>0 and 0 otherwise)
• sgn -sign (-1 if x<0, 0 if x=0, 1 if x>0)
• rand -random number from 0 to 1
• trigonometric and hyperbolic functions:
• sin, cos, tan, csc, sec, cot, sinh, cosh, tanh, csch, sech, coth, arcsin, arccos, arctan, arcsinh, arccosh, arctanh
• constants : pi=3.14159, e=2.71828, i=sqrt(-1)
• operations : +, -, *, /, ^, !
• shortcuts : r=sqrt(x^2+y^2) and c=x+i*y
• parenthesis: [,{,(,),},]