shamovic

15 Reputation

3 Badges

7 years, 89 days

MaplePrimes Activity


These are questions asked by shamovic

Hi,

 

I am trying to make Maple replace some expressions with variables so that I'll be able to get the coefficients of the resulting polynomial. 

I have the following piece of code:

h := map(proc(x) convert(x,parfrac,s,complex) end proc,convert(f,parfrac,t,complex));

for sub_var in subs do
               h:=applyrule(sub_var[1]=1/sub_var[2],h);

end do;

subs is a list automatically generated in a different procedure, here is a sample list:

[[t-3*I, a1], [t+3*I, b1], [s-3*I, c1], [s+3*I, d1], [t-.4948716594-.4285714286*I, a2], [t-.4948716594+.4285714286*I, b2], [s-.4948716594-.4285714286*I, c2], [s-.4948716594+.4285714286*I, d2], [t+.4948716594-.4285714286*I, a3], [t+.4948716594+.4285714286*I, b3], [s+.4948716594-.4285714286*I, c3], [s+.4948716594+.4285714286*I, d3]]

f is a rational function that breaks up nicely into partial fraction due to theoretical reasons. here is a sample:
f: = (1/2)*(3969*I)*(35*s^3*t^3+21*s^3*t-9*s^2*t^2+21*s*t^3+45*s^2+63*s*t+45*t^2+27)*(t^2+1)*(s^2+1)/(((27*I)*t^2+7*t^3-9*I-21*t)*((27*I)*s^2-7*s^3-9*I+21*s)*((27*I)*s^2+7*s^3-9*I-21*s)*((27*I)*t^2-7*t^3-9*I+21*t))
These particular samples have algebraic numbers in them. and that makes apply rule fail, it seems to only work if the numbers are rational. Any idea on how can I fix that? Alternatively, replace applyrule all together with something that actually works?

Thanks

Hi,

I would like to do some computations with Maple using elliptic functions. The implementation in Maple wants me to provide the g2 and g3 invariants. However, what I have is the half-periods. Does Maple have a function, that calculates the invariants from the half-periods? I know I can do that myself, but I'd like to write something concise and probably the output of a built-in function will be precisely, what the other functions are looking for.

Thanks in advance

Page 1 of 1