Subject: The tail of the series (made a mistake, sorry)
From: Richard Hennessy
Date: Mon, 13 Apr 2009 19:29:24 -0400
I got it.
(%i11) hbar:5;
(out11) 5
(%i12) mu:3;
(out12) 3
(%i13) m:3;
(out13) 3
(%i14) 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
)$
(%i15) the_error_odd_states(x,energy,hbar,masselectron,degree):=(energy^(degree/2)*masselectron^(degree/2)*x^degree)/(hbar^(degree)*product((i+1)*(2*i+1),i,1,(degree/2)-1));
(out15) the_error_odd_states(x,energy,hbar,masselectron,degree):=(energy^(degree/2)*masselectron^(degree/2)*x^degree)/(hbar^degree*product((i+1)*(2*i+1),i,1,degree/2-1))
(%i16) the_error_even_states(x,e,hbar,m,degree):=(-1)^((degree-1)/2)*x^degree*e^((degree-1)/2)/prod(hbar^2/m*(n)*(2*n+1),n,1,(degree-1)/2);
(out16) the_error_even_states(x,e,hbar,m,degree):=((-1)^((degree-1)/2)*x^degree*e^((degree-1)/2))/product(hbar^2/m*n*(2*n+1),n,1,(degree-1)/2)
(%i17) block(ratcoeff(f(x,e,5,degree),e,degree/2)*e^(degree/2)=the_error_odd_states(x,e,5,3,degree)),degree=48;
(out17) (9*e^24*x^48)/83768646138196943814948608778504421934485435485839843750000000000000000000000=(9*e^24*x^48)/83768646138196943814948608778504421934485435485839843750000000000000000000000
(%i18) block(ratcoeff(f(x,e,4,degree),e,(degree-1)/2)*e^((degree-1)/2)=the_error_even_states(x,e,5,3,degree)),degree=47;
(out18) -(9*e^23*x^47)/418843230690984719074743043892522109672427177429199218750000000000000000000=-(9*e^23*x^47)/418843230690984719074743043892522109672427177429199218750000000000000000000
Rich
----- Original Message -----
From: Richard Hennessy
To: Maxima List
Sent: Monday, April 13, 2009 4:19 PM
Subject: Re: [Maxima] The tail of the series (made a mistake, sorry)
/* 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: 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