Hello,
> Copy-pasting your expression into my Maxima gave me an "Illegal use of
> delimiter ) ..." error. I don't have time at the moment to investigate
> it, but have you tried to set "numer : true;"
>
> HTH
> Milan
Sorry, I only posted a snippet of code, the entire script is here:
go(n1) := block ( [this],
n:n1,
array(a,n,n),
array([Cpp,K],n),
m:1,
C[0]:c,
Cpp[0]:-c,
K[0]:1,
for i thru n do (
C[i]:0,
Cpp[i]:0,
C[i]:sum(a[i,j]*c^(2*j+1),j,1,i),
Cpp[i]:sum(a[i,j]*(-(2*j+1)^2*c^(2*j+1)+(2*j
+1)*(2*j)*c^(2*j-1)),j,1,i) ),
psi:sum(b^(2*i+1)*C[i], i,0,n),
lam:sum(b^(2*i)*K[i], i,0,n),
psisq:0,
for j:0 thru n-1 do (
this:0,
for k:0 thru j do (
this:this+coeff(psi,b,2*k+1)*coeff(psi,b,2*(j-k)+1) ),
psisq:psisq+this*b^(2*j+2) ),
psioddpower[0]:psi,
for i thru n do (
psioddpower[i]:0,
for j thru n-i+1 do (
this:0,
for k thru j do (
this:this+coeff(psioddpower[i-1],b,2*(i
+k)-3)*coeff(psisq,b,2*(j-k)+2) ),
psioddpower[i]:psioddpower[i]+this*b^(2*(i+j)-1) ) ),
psievenpower[1]:psisq,
for i:2 thru n do (
psievenpower[i]:0,
for j thru n-i+1 do (
this:0,
for k thru j do (
this:this
+coeff(psievenpower[i-1],b,2*(j-k)+2*i-2)*coeff(psisq,b,2*k ) ),
psievenpower[i]:psievenpower[i]+this*b^(2*(i+j)-2) ) ),
sinpsi:0,
for i:0 thru n do (
sinpsi:sinpsi+(-1)^i/(2*i+1)!*psioddpower[i] ),
cospsi:1,
for i thru n do (
cospsi:cospsi+(-1)^i/(2*i)!*psievenpower[i] ),
lsinp:0,
for j:0 thru n do (
this:0,
for k:0 thru j do (
this:this
+coeff(collectterms(expand(lam),b),b,2*k)*coeff(collectterms(expand(sinpsi),b),b,2*(j-k)+1) ),
lsinp:lsinp+this*b^(2*j+1) ),
for i thru n do (
A:Cpp[i]+coeff(lsinp,b,2*i+1),
for j:0 thru i-1 do (
a[i,i-j]:solve(coeff(collectterms(expand(A),c),c,2*(i-j)+1),a[i,i-j]) ),
K[i]:solve(coeff(collectterms(expand(A),c),c,1),K[i]) )
) $