On Wed, Mar 10, 2010 at 10:11 PM, Janek Kozicki <janek_listy at wp.pl> wrote:
> Hi,
>
> integrate(sum(1/(n^4+x^2), n, 1, inf),x,0,inf);
>
> by hand + using maxima to calculate some small parts of it,
> I eventually reached the result, which is pi^3/12.
>
> I wonder if it is possible to calculate in maxima straight off. Is it?
>
> What I did, was replacing by hand arctan(0) with 0, separately
> calculating limits and so on. Took a bit of time, and mostly I did it
> myself on paper, just checking some parts with maxima. But still I'm
> not even sure if my final result is correct ;)
>
> question is - how to do it in a "clean" way in maxima?
You can compute the same result with a little function which changes
the order of summation and limit:
(%i1) change_lim_sum(expr) :=
if mapatom(expr) then expr
else if inpart(expr, 0)=nounify(limit) and inpart(expr, 1,
0)=nounify(sum) then
substpart(
substpart(inpart(expr, 1, 1), expr, 1),
inpart(expr, 1), 1)
else map(change_lim_sum, expr)$
(%i2) integrate(sum(1/(n^4+x^2), n, 1, inf),x,0,inf);
(%o2) limit((sum(atan(x/n^2)/n^2,n,1,inf)),x,inf,minus)-limit(sum(atan(x/n^2)/n^2,n,1,inf),x,0,plus)
(%i3) change_lim_sum(%);
(%o3) (sum(limit(atan(x/n^2),x,inf,minus)/n^2,n,1,inf))-sum(limit(atan(x/n^2),x,0,plus)/n^2,n,1,inf)
(%i4) ev(%, limit, simpsum);
(%o4) %pi^3/12
Andrej