# Sage and Maxima expression not compatible

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 close merge delete

Sort by » oldest newest most voted

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)

more