From: Barton W. <wil...@us...> - 2008-05-12 17:16:40
|
Update of /cvsroot/maxima/maxima/share/orthopoly In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20818/share/orthopoly Modified Files: variational_method.dem Log Message: o Append another demo of a variational method. Index: variational_method.dem =================================================================== RCS file: /cvsroot/maxima/maxima/share/orthopoly/variational_method.dem,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- variational_method.dem 23 Dec 2005 13:46:58 -0000 1.3 +++ variational_method.dem 12 May 2008 17:16:34 -0000 1.4 @@ -89,3 +89,25 @@ remfunction(ham,"<<",f); remvalue(n,psi,vars,min_this,eqs,m_det,solve_ord,pows,unks,eq,ans); assume_pos : false; + + +/* Let's apply a variational method to the potential x^2 / 2 + x^4. We'll assume +a trial wavefuction of the form qo * exp(-%alpha * abs(x)^(2*n) / 2) where the +parameters are %alpha and n. See "Post-Gaussian variational method for quantum anharmonic +oscillator," by Akihiro Ogura." */ + +kill(all)$ +assume(qo > 0, %alpha > 0, n > 1/2)$ +f : qo * exp(-%alpha * abs(x)^(2*n) / 2); +1 = integrate(f^2,x,minf,inf); +solve(%,qo); +f : subst(second(%), f); +v : x^2 / 2 + x^4$ +ham(f) := -diff(f,x,2) / 2 + v * f$ +energy : integrate(f * ham(f),x,minf,inf); +eqs : [diff(energy,n), diff(energy,%alpha)]$ +load(mnewton)$ +newtonepsilon : 1.0e-15$ +sol : mnewton(eqs,[n,%alpha],[1.1, 2.0]); +subst(sol, energy); + |