smht

44 Reputation

3 Badges

19 years, 327 days

MaplePrimes Activity


These are questions asked by smht

Dear all,

Dear all, I am trying to write a little program (called "rcltnn") which calculates a recurrence. The problem: Maple does not return numbers but strings which arrise from the recurrence. Example: for n=4 I expect to get rcltnn(n=4)=95, but Maple gives 15+7*rcltnn(2)+6*rcltnn(3) Actually, that string is correct but not fully evaluated. We have rcltnn(2)=2 and rcltnn(3)=11 (further values are rcltnn(1)=1 and rcltnn(0)=0). Here my program (I have played with many versions of this program) rctlnn := proc (n::integer) global j, rctlnn; option remember; if n = 0 then rctlnn := 0 else rctlnn := combinat:-bell(n); for j from 2 to n-1 do rctlnn := rctlnn+combinat:-stirling2(n,j)*rcltnn(j) end do; end if end proc;
I am trying to solve (numerically) the following system of differential equations using dsolve (Maple 9): DGLS:=seq(seq(diff(B[i,k](t),t)=add(add(W(j,l,i,k)*B[j,l](t)-W(i,k,j,l)*B[i,k](t),l=1..N),j=1..N),k=1..N),i=1..N); The problem is posed by the coefficients W(i,k,j,l). I want to make the W(i,j,k,l) dependent on the unknown functions B[i,k](t). For that purpose I wrote a Maple program W := proc(i::integer, k::integer, j::integer, l::integer) which calculates a "transition probability" Wtrans. If Wtrans does not depend on the B[j,l] (e.g. Wtrans:=1/N^2;), everything works nice. However, if I try to use the B[i,k] somehow (e.g. if NKrit_jl > B[j,l] then Wtrans := 0.5 fi;), then error messages from the procedure W result like "Error, invalid terms in product".
Page 1 of 1