Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 6 years ago

johanneh gravatar image

Express the derivative in the Hamiltonian operator in sage

I want to compute the expectation value of the energy H for a quantum system with the wave function ψ(x). This is done with H=ψˆHψdx where ˆH=22md2dx2+V(x) is the Hamiltonian operator for some potential V(x). How do I express ddx in sage if I don't know on which function it will be applied?

I know it is possible to use psi.diff(x), but is there a way to declare the operator so that it automatically does the derivative when it is multiplied with some function?