Mr. Marko Riedel

## 390 Reputation

8 years, 363 days
B.Sc. Computer Science UBC 1994, M.Sc. Computer Science UofT 1996.

## Euler-Maclaurin Summation....

Maple

Greetings to all.

A basic Euler-MacLaurin Summation recently appeared at this Math.Stackexchange Link . Several users computed an asymptotic expansion for the sum given by sum(1/k^sigma, k=1..n) with sigma a parameter between zero and one. E.g. for sigma=1/3 we find

```       2/3
3 n                     1           1           7            13            247
------ + Zeta(1/3) + -------- - --------- + ---------- - ----------- + ------------
2                     (1/3)       (4/3)         10/3          16/3           22/3
2 n        36 n        4860 n       26244 n       590490 n
```

Comparing this with Euler-Maclaurin Maple produces the following:

```> eulermac(1/n^(1/3), n, 8);
2/3
3 n         1           1           7            13            247             1
------ - -------- - --------- + ---------- - ----------- + ------------ + O(-------)
2         (1/3)       (4/3)         10/3          16/3           22/3      (28/3)
2 n        36 n        4860 n       26244 n       590490 n         n
```

The sign on the second term is incorrect. I would be curious to know what is happening here. BTW Mathematica also yields a plus sign on this term, same as what was obtained at the link.

Thank you for any comments you may have.

Marko Riedel

## Using a tilde character in the profile U...

MaplePrimes

Greetings to all.

My apologies if this is a repeat, I could not ascertain if this question has been asked before. I am not able to enter a tilde in my home page URL in my profile. I used the escape sequence %7E as a workaround. This does not work in all browsers however, e.g. the page displays correctly in Chrome but not in Firefox. How to enter the tilde into my profile URL? (The tilde is commonly used to indicate the directory public_html in a user's home directory by the Apache web server.) Thank you.

Marko Riedel

## Investigating the limits of the Maple in...

Maple 18

Greetings to all. The title describes it well, I am writing about testing the limits of the Maple integration engine. A recent discussion at math.stackexchange.com features a family of integrals that involve the product of a power of the natural logarithm and a rational function, more precisely,

`int((log(x))^n/(x^3+1), x=0..infinity);`

These integrals can be evaluated recursively as described at the MSE link using a technique that generalizes to other types of rational factors. Unfortunately Maple apparently only finds a simple closed form for a few small initial values of n. The following transcript of a Maple session illustrates the problem. Mathematica was successful here. Also observe the memory allocation in the Maple session.

```    |\^/|     Maple 18 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014
<____ ____>  Waterloo Maple Inc.
|       Type ? for help.
alpha := (n, k) ->

n
-1/3 exp(1/3 I Pi + 2/3 I Pi k) (1/3 I Pi + 2/3 I Pi k)

Q := proc(n)
local res;
option remember;
if n = 0 then return 2/9*sqrt(3)*Pi end if;
res := -add(alpha(n + 1, k), k = 0 .. 2)/(n + 1) - add(
binomial(n + 1, p)*(2*I*Pi)^(n - p)*Q(p),
p = 0 .. n - 1)/(n + 1);
simplify(res)
end proc

infinity
/               n
|          log(x)
VERIF := n ->  |          ------- dx
|           3
/           x  + 1
0

> Q(6);
7  1/2
910 Pi  3
------------
6561

> VERIF(6);
memory used=3.8MB, alloc=40.3MB, time=0.18
7  1/2
9890 Pi  3       490    5  1/2
------------- + ----- Pi  3    Psi(1, 1/3)
177147       19683

490    5  1/2                10    3  1/2            2
+ ----- Pi  3    Psi(1, 2/3) + ---- Pi  3    Psi(1, 1/3)
19683                        2187

20   1/2   3
+ ---- 3    Pi  Psi(1, 2/3) Psi(1, 1/3)
2187

10    3  1/2            2    40                 4
+ ---- Pi  3    Psi(1, 2/3)  + ----- Psi(2, 2/3) Pi
2187                         19683

10   1/2               3
+ ---- 3    Pi Psi(1, 1/3)
2187

10               1/2               2
+ --- Psi(1, 2/3) 3    Pi Psi(1, 1/3)
729

10   1/2                           2
+ --- 3    Pi Psi(1, 1/3) Psi(1, 2/3)
729

10   1/2               3    40     4
+ ---- 3    Pi Psi(1, 2/3)  - ----- Pi  Psi(2, 1/3)
2187                        19683

20             2  1/2
+ ---- Psi(2, 2/3)  3    Pi
6561

40               1/2
- ---- Psi(2, 2/3) 3    Psi(2, 1/3) Pi
6561

40    2
+ ---- Pi  Psi(2, 2/3) Psi(1, 1/3)
2187

40    2
+ ---- Pi  Psi(2, 2/3) Psi(1, 2/3)
2187

20   1/2            2
+ ---- 3    Psi(2, 1/3)  Pi
6561

40    2
- ---- Pi  Psi(1, 1/3) Psi(2, 1/3)
2187

40    2
- ---- Pi  Psi(1, 2/3) Psi(2, 1/3)
2187

> evalf(Q(6));
725.5729634

> evalf(VERIF(6));
725.5729630

> quit
memory used=22.4MB, alloc=44.3MB, time=0.47
Mathematica 10.0 for Linux x86 (64-bit)

In:= Integrate[Log[z]^6/(1+z^3), {z, 0, Infinity}]

7
910 Pi
Out= ------------
2187 Sqrt

In:= N[Out]

Out= 725.573

In:=
```

My question for you all is what the appropriate techniques would be to get Maple to at least simplify the rather involved output from the integration engine to obtain a match of the closed form from the recursive equation.

Best regards, Marko Riedel.

cl-maple.txt

## Dihedral symmetry: Perl vs Maple...

Maple 2016

Greetings to all. I am writing to present a Maple computation that is somewhat of a programming challenge. A recent Post at Math.Stackexchange.Com asked to compute the number of inequivalent colorings of the vertices and edges of a regular hexagon with two colors available for the vertices and three colors for the edges (vertex colors different from edge colors) under the simultaneous action of the dihedral group D6 on the vertices and edges. This is a standard application of Burnside's Lemma and can be computed very straightforwardly using a negligible amount of computing resources. Important: this is the accepted method, it is documented at the MSE link and it works quite well. The answer is that there are 4183 unique configurations.

Now how to profit from this experience. A question naturally appears at this point: can we optimize the Maple code so as to bring it into the range of the parameters of the Perl? Here we permit all sorts of optimizations that may occur to the Maple coder other than using Burnside where the motivation is that for many of us including myself there always remain additional Maple programming techniques to learn and acquire. I hope this makes for an enjoyable exercise and I am looking forward to seeing a Maple implementation that can compete with the Perl. This is not code golf but conciseness is a plus.

hex-maple.txt

hex-pl.txt

Happy computing!

Best regards, Marko Riedel

PS: I suspect working with hash tables rather than sets may be a start.

## Computing a complex residue...

Maple 18

Greetings to all.

With the following matter I am betting on there being a simple mistake on my part due to fatigue owing to a challenging session of intense computing. The following link at Math.Stackexchange.Com points to a computation involving complex residues. Consult the link for additional details.

I usually verify my computations with Maple, I did the same this time. Thereby I happened on a curious phenomenon which I have documented below. Please study the session data provided, I believe it speaks for itself.

```user@host:~\$ math
Mathematica 10.0 for Linux x86 (64-bit)

In:= Residue[z^2/(z^4 + 2*z^2 + 2)^2, {z, 2^(1/4)*Exp[3*Pi*I/8]}]

1/8      1/4
(-1)    ((-1)    + Sqrt)
Out= ----------------------------
1/4      1/4           3
16 2    ((-1)    - Sqrt)

In:= N[%]

Out= 0.117223 - 0.0083308 I

In:=
user@host:~\$ maple
|\^/|     Maple 18 (X86 64 LINUX)
._|\|   |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2014
<____ ____>  Waterloo Maple Inc.
|       Type ? for help.
> residue(z^2/(z^4 + 2*z^2 + 2)^2, z=2^(1/4)*exp(3*Pi*I/8));
0

> quit
memory used=0.9MB, alloc=8.3MB, time=0.07
user@host:~\$
```

I am looking forward to learning what the correct syntax is to get the residue in this case and I hope I can assist other users who might have run into the same problem. I will cancel the question should it turn out to be trivial and of little potential use to the community.

Best regards,

Marko Riedel

Post Scriptum. Being a programmer myself I would be curious to learn more about the algorithms that are deployed here and how and why they did not succeed.

 1 2 3 4 Page 1 of 4
﻿