Hi Maple QA! There is an urgent need for action here!
Please consider:
restart;
egfCoeff := proc(egf, n) local k, c, j, ser;
ser := taylor(egf(x, z), z=0, n + 1):
c := k -> k! * normal(coeff(ser, z, k)):
[seq(coeff(c(n), x, k), k = 0..n)]
end:
omg := (x, z) -> ((exp(z) + 2 * exp(-cos(Pi / 5) * z) * cos(sin(Pi / 5) * z)
+ 2 * exp(cos((2 * Pi) / 5) * z) * cos(sin((2 * Pi) / 5) * z) ) / 5)^x:
t := time();
egfCoeff(omg, 5): simplify(%);
egfCoeff(omg, 10): simplify(%);
egfCoeff(omg, 15): simplify(%);
egfCoeff(omg, 20): simplify(%);
time() - t;
This takes 60 sec on my machine.
Now compare with SageMath:
def egfList(egf, n) -> list[int]:
x, z = var("x, z")
t = egf(x, z).taylor(z, 0, n)
return (factorial(n) * t.coefficient(z, n)).list()
def omg(x, z):
return ((exp(z) + 2 * exp(-cos(pi / 5) * z) * cos(sin(pi / 5) * z) + 2 * exp(cos((2 * pi) / 5) * z) * cos(sin((2 * pi) / 5) * z) ) / 5)^x
print(egfList(omg, 5))
print(egfList(omg, 10))
print(egfList(omg, 15))
print(egfList(omg, 20))
This takes less than 0.2 sec on my machine. In other words,
SageMath is more than 300 times faster than Maple 2023 here!
Also, the output in Jupyter Notebooks doesn't work in any useful way, as you can see from the last two threads.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)