# [Maxima] The tail of the series (made a mistake, sorry)

Richard Hennessy rich.hennessy at verizon.net
Mon Apr 13 15:19:30 CDT 2009

```/* the formula */
the_error_odd_states(x,energy,hbar,masselectron,terms):=(energy^(terms/2)*masselectron^(terms/2)*x^terms)/(hbar^2*product(hbar^2*(i+1)*(2*i+1),i,1,(terms/2)-1));

Rich

----- Original Message -----
From: Richard Hennessy
To: Maxima List
Sent: Monday, April 13, 2009 4:16 PM
Subject: Re: [Maxima] The tail of the series

I don't know if there is a simple relation between quantum number and energy so you have to enter both into the formula.  Finding the energy from the quantum number is hard and I can't find a way to do it easily except by numerical methods.

The series f applies here to a one dimentional electron satisfying:

-hbar^2 * 'diff(f(energy,x,qn,inf), x, 2)/(2*m) + mu * x^4 * f(energy,x,q,inf) = energy * f(e,x,q,inf)

Interestingly the qn (quantum number) and the value of mu does not appear in the error formula but qn is required to be an odd positive integer.

I split the constant out of the series definition

/* the series */
hbar:5;
mu:3;
m:3;

f(xval,energy,qn,t):=
block
([a,p,i,j,acc,cnter,y1,y2,y3,y4,x,y,yt,e,maxterms:t],x:xval,e:energy,
a[-5]:0,a[-4]:0,a[-3]:0,a[-2]:0,a[-1]:0,a[0]:if mod(qn, 2)=1 then 1 else 0,a[1]:if mod(qn,2)=0 then 1 else 0,
y1:0,y2:0,y3:0,y4:0,cnter:0,j:0,
if mod(qn,2) = 1 then (y:a[0],acc:1) else (y:a[1]*x, acc:x),
if mod(qn,2) = 0 and xval = 0 then
y:0
else
(
for i: 2 + if mod(qn,2)=1 then 0 else 1 thru maxterms step 2 do (
a[i]:2 * m / hbar^2 * (mu * a[i-6] - a[i-2] * e)/(i * (i - 1)),
acc:acc*x*x,
yt:acc*a[i],
y:y+yt,
j:j+1
)
),
y
)\$

the error is still

the_error_odd_states(x,energy,hbar,m,terms):=(energy^(terms/2)*masselectron^(terms/2)*x^terms)/(hbar^2*product(hbar^2*(i+1)*(2*i+1),i,1,(terms/2)-1));

which always holds for a sufficiently large value for terms (and for any larger value).

Rich

----- Original Message -----
From: Richard Hennessy
To: Maxima List
Sent: Monday, April 13, 2009 1:54 PM
Subject: [Maxima] The tail of the series

I came up with this formula for an electron in the x^4 potential.  I found a formula for the error term for the tail of the series that that works for odd quantum numbers

/* the series */
f(xval,energy,qn,t):=
block
([a,p,i,j,acc,cnter,y1,y2,y3,y4,hbar,m,mu,x,y,yt,e,maxterms:t],x:xval,e:energy,
a[-5]:0,a[-4]:0,a[-3]:0,a[-2]:0,a[-1]:0,a[0]:if mod(qn, 2)=1 then 1 else 0,a[1]:if mod(qn,2)=0 then 1 else 0,
hbar:5,
mu:3,
m:3,
y1:0,y2:0,y3:0,y4:0,cnter:0,j:0,
if mod(qn,2) = 1 then (y:a[0],acc:1) else (y:a[1]*x, acc:x),
if mod(qn,2) = 0 and xval = 0 then
y:0
else
(
for i: 2 + if mod(qn,2)=1 then 0 else 1 thru maxterms step 2 do (
a[i]:2 * m / hbar^2 * (mu * a[i-6] - a[i-2] * e)/(i * (i - 1)),
acc:acc*x*x,
yt:acc*a[i],
y:y+yt,
j:j+1
)
),
y
)\$

/* the formula */
the_error_odd_states(x,energy,hbar,masselectron,terms):=(energy^(terms/2)*masselectron^(terms/2)*x^terms)/(hbar^2*product(hbar^2*(i+1)*(2*i+1),i,1,(terms/2)-1));

block(ratcoeff(f(x,e,5,i),e,i/2)*e^(i/2)),i=48;
(9*e^24*x^48)/83768646138196943814948608778504421934485435485839843750000000000000000000000

the_error_odd_states(x,e,5,3,48);
(9*e^24*x^48)/83768646138196943814948608778504421934485435485839843750000000000000000000000

I still have to do it for the even ones.

Pretty cool.  I wonder if I will get a value for %pi by taking the even and odd cases together.

Rich

--------------------------------------------------------------------------------

_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20090413/f5495f62/attachment.htm
```