Can someone help



I have to supply more information.  Allowed_Energy_Level_10 is a big float and fpprec is set to 1000.  The real number of terms I am using is more like 5000, not 50000.   I don't remember the value of Allowed_Energy_Level_10 but I do know this allowed energy level (call it Allowed_Energy_Level_X).

Allowed_Energy_Level_X:4.6967953868636461962245324300629487566342922979784898938510324390563892398187428b0;

I am trying to compute 

block([fpprec],fpprec:1000,s:f(6,Allowed_Energy_Level_X, 5000),fpprec:80,bfloat(s));

I get the wrong answer by many orders of magnitude.

The answer I get is 

-2.3000493895464568474710462067030855280467870010043294040239206897306707068249397b-7

which is not even in the ballpark.

Help, I will provide any information requested.

Rich


 ------------Original Message------------
From: "Richard Hennessy"<rvh2007 at comcast.net>
To: "Maxima List" <maxima at math.utexas.edu>
Date: Mon, Sep-1-2008 0:14 AM
Subject: Can someone help

Does anyone have the willingness and ability to write the function f(x,y,50000) in a way that is the fastest possible (or at least a speed improvement factor of (let's say to be conservative) 3 or better.

f(x,Energy,terms):=
block
([c,p,n,hbar,m,mu],
    c[-4]:0,c[-3]:0,c[-2]:0,c[-1]:0,c[0]:1,c[1]:0,mu:1,
    for n: 2 thru terms do (c[n]:(mu * c[n-6] - c[n-2] * Energy)/(n * (n - 1) * hbar^2/(2*m))),
    p:c[0],
    for n: 1 thru terms do (p:p + c[n]*x^n),
    p
)$

f(10,Allowed_Energy_Level_10,50000);

FYI  It is the solution to Shrodinger for mu*x^4 potential.

Thanks,

Rich