Ask Your Question
0

Sage and Maxima expression not compatible

asked 2014-08-25 11:07:44 +0100

god.one gravatar image

updated 2014-08-25 11:14:07 +0100

Hi,

I got another problem relating to this question http://ask.sagemath.org/question/8137... and many other of that kind (sorry for opening another question). If I use

sum(-1**(i+1)/(2*i-1)**3*(sin(pi*(2*i-1)/2*(r1+r2))*sin(pi*(2*i-1)/2*(r1-r2))),i,1,oo)

in the shell, I get

TypeError: unable to make sense of Maxima expression 'imagpart(f[4,3]([1/2,1/2,1/2,1],[3/2,3/2,3/2],e^-(2*I*pi*r1)))' in Sage

I read in http://trac.sagemath.org/ticket/9825 that the problem concerns the temporary variables. But is there a possibility to reformulate the problem to get to the solution? Btw, I'm using Sage v6.2 on a LinuxMint machine.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2014-08-25 16:44:31 +0100

FrédéricC gravatar image

This works in the developement version 6.4.beta1. This should work the same in 6.3.

sage: sum(-1**(i+1)/(2*i-1)**3*(sin(pi*(2*i-1)/2*(r1+r2))*sin(pi*(2*i-1)/2*(r1-r2))),i,1,oo)
-1/4*(-I*imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r1))) - I*imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r1))) - real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r1))) - real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r1))))*cos(pi*r1) - 1/4*(I*imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r2))) + I*imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r2))) + real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r2))) + real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r2))))*cos(pi*r2) - 1/4*(imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r1))) - imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r1))) - I*real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r1))) + I*real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r1))))*sin(pi*r1) + 1/4*(imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r2))) - imag_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r2))) - I*real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(2*I*pi*r2))) + I*real_part(hypergeometric((1/2, 1/2, 1/2, 1), (3/2, 3/2, 3/2), e^(-2*I*pi*r2))))*sin(pi*r2)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-25 11:07:44 +0100

Seen: 300 times

Last updated: Aug 25 '14