370 Reputation

8 Badges

10 years, 126 days

MaplePrimes Activity

These are replies submitted by digerdiga

@acer Then I'm wondering about the weird errors beyond the epsilon specification typical for the _MonteCarlo methods.


Besides what is the precise issue Maple has before Changing phi2 -> phi2*s.

I would assume it is the exact same, but apparently not for maple.

Why is for numerical purposes a fixed integration interval easier to handle than an interval depending on another integration variable?

@acer Hey thanks, didn't think of reintegrating it symbolically ;)

@vv Any idea why only the MonteCarlo methods seem to work?

@Mariusz Iwaniuk Probably you are right, because of the phi2 integration which is antisymmetric with respect to 0..Pi and Pi..2Pi.

Replace the ingerand by its absolute value.


PS: Actually I just replaced 0..2Pi by 0..Pi and now I get a value, but only using _MonteCarlo and still not with the NAG methods.

Good to know, but yes it was only for illustration, so thanks all.

@ecterrab Thanks for that! By the time I was writing this I was using Maple2015. Now with 2018 I get the same output as you, but with 2015 the time was pretty surely on the 4th position and the expansion was not d_(x1), but some \partial(x1), at least in the 2d-visualization.

Also the metric was not collected when using the line_element command.


Overall "signature" has different meanings depending on where and how it is used? Obviously it is the signature I change using the Redefine command. But the signature in Setup has no real information, except telling me the sign of the minkowski metric in the local tetrad frame?

@ecterrab Mind me if I reopen this thread, but I think it best fits here.

Above you explained how to change the signature; in particular changing time from 4th to 0th. However it does not seem to work for a general metric. For instance



Setup(mathematicalnotation = true, signature = `+---`, metric = [15, 23, 2]);





does nothing to the signature in changing it from 4th to 0th.



Another question regarding the line-element:

It is expanded/displayed by symbols \partial(x1), \partial(x2) and so on...Is it possible to collect() for \partial(x1),\partial(x2) ?

@Carl Love No I don't. Here is what I was trying to do. Maybe it is possible to do it better some other way, so let me know.




restart; n := 4; s := [1, 2]; define(A, 'linear'); define(B, 'linear'); OL := proc (s::list) local r; r := s; r[1] := -s[1]; r[2] := s[2]+1; r end proc; o1 := OL(s); OR := proc (s::list) local r; r := [s[1], 2, seq(s[i], i = 2 .. nops(s))] end proc; o2 := OR(s); Oe := proc (s::list) local r; r := s[1]*(product(1/factorial(s[i]), i = 2 .. nops(s))) end proc; `~`[Oe]([o1, o2]); ((A+B)@@(n-1))(s); o := [op(%)]; eval(o, [A = OL, B = OR]); r := `~`[Oe](%); factorial(n)*add(r), bernoulli(n)



[1, 2]


proc (s::list) local r; r := s; r[1] := -s[1]; r[2] := s[2]+1; r end proc


[-1, 3]


proc (s::list) local r; r := [s[1], 2, seq(s[i], i = 2 .. nops(s))] end proc


[1, 2, 2]


proc (s::list) local r; r := s[1]*(product(1/factorial(s[i]), i = 2 .. nops(s))) end proc


[-1/6, 1/4]


A(A(A([1, 2])))+A(A(B([1, 2])))+A(B(A([1, 2])))+A(B(B([1, 2])))+B(A(A([1, 2])))+B(A(B([1, 2])))+B(B(A([1, 2])))+B(B(B([1, 2])))


[A(A(A([1, 2]))), A(A(B([1, 2]))), A(B(A([1, 2]))), A(B(B([1, 2]))), B(A(A([1, 2]))), B(A(B([1, 2]))), B(B(A([1, 2]))), B(B(B([1, 2])))]


[[-1, 5], [1, 4, 2], [1, 3, 3], [-1, 3, 2, 2], [1, 2, 4], [-1, 2, 3, 2], [-1, 2, 2, 3], [1, 2, 2, 2, 2]]


[-1/120, 1/48, 1/36, -1/24, 1/48, -1/24, -1/24, 1/16]


-1/30, -1/30





Download binary_tree_-_mapleprimes.mw

@Carl Love hm, ok.

Though now I'm stuck here:

((A+B)@@2)(s)=A(A([1, 2])+B([1, 2]))+B(A([1, 2])+B([1, 2]))

And maple can't evaluate, because my functions return lists of different length which can not be added.

I guess I need to tell maple that A and B are linear operators and evaluate each operand separately.


Can I specify A and B being linear?

edit: I guess define(A,linear) will do.

@acer Actually it seems when I use plot(f2(m),m=3..10) it is very slow but plot(f2,3..10) is quick.

Why is that?

@Kitonum Note that the complex integral (as a continuous contour) yields

int(exp(-z)/(1-z),z=0..infinity) = int(exp(-z)/(1-z),z=0..infinity,CauchyPrincipalValue=true) + int(exp(-1-epsilon*exp(I*t))/(-epsilon*exp(I*t))*I*epsilon*exp(I*t),t=Pi..0)

The second integral is in the limit epsilon=0 just

I*int(exp(-1),t=0..Pi) = I*Pi*exp(-1)


So I presume Maple evaluates the LHS to Ei(1)/exp(1) and not the CPV.

@Mariusz Iwaniuk Is add() faster than sum() ??

@Carl Love This was new to me. Thanks!

@sand15 Yes I'm aware of that...

As I said; I just oversaw that the double, triple, ... terms actually diverge too. Otherwise there would have been some serious flaw.

@vv Ah you are right. The double sum is indeed infinity

1/2*1/3 + 1/2*1/4 + ... + 1/3*1/4 + ... = 1/2*( (1/2 + 1/3 + 1/4 + ...)^2 - (1/2^2 + 1/3^2 + 1/4^2 + ...) )

where the first square is infinite....

3 4 5 6 7 8 9 Last Page 5 of 19