Ask Your Question
0

Call error for integers (when I haven't declared any.)

asked 2017-09-23 03:17:11 +0100

Andres Mejia gravatar image

I'm trying to define a pretty atrocious function (that I eventually want to solve for zeroes) in three variables, k,j,N.

I tried to just use

f=sin(2*k*2*pi/N)*sin((k+1)*2*pi/N)*sin((k-1)*2*pi/N)*sin((2*j+2)*2*pi/N)*sin^2(j*2*pi/N)*sin(6*pi/N)*sin(4*pi/N)*sin(2*pi/N)+sin(2*j*2*pi/N)*sin((j+1)*2*pi/N)*sin((j-1)*2*pi/N)*sin((2*k+2)*2*pi/N)*sin(k*2*pi/N)*sin(k*2*pi/N)*sin(6*pi/N)*sin(4*pi/N)*sin(2*pi/N)+sin((k-1)*2*pi/N)*sin((2*k+2)*2*pi/N)*sin(k*2*pi/N)*sin((2*j+2)*2*pi/N)*sin(j*2*pi/N)*sin(j*2*pi/N)*sin(12*pi/N)*sin(4*pi/N)*sin(2*pi/N)+sin((j-1)*2*pi/N)*sin((2*j+2)*2*pi/N)*sin(j*2*pi/N)*sin((2*k+2)*2*pi/N)*sin(k*2*pi/N)*sin(k*2*pi/N)*sin(12*pi/N)*sin(4*pi/N)*sin(2*pi/N)-sin((k-1)*2*pi/N)*sin((j-1)*2*pi/N)*sin((2*k+2)*2*pi/N)*sin((2*j+2)*2*pi/N)*sin(k*2*pi/N)*sin(j*2*pi/N)*sin(6*pi/N)*sin(2*pi/N)* sin(8*pi/N)-sin(12*pi/N)*sin(4*(pi/N))*sin(4*(pi/N))*sin((2*k+2)*2*pi/N)*sin((2*j+2)*2*pi/N)*sin(j*2*pi/N)*sin(j*2*pi/N)*sin(k*2*pi/N)*sin(k*2*pi/N)

but I'm getting:

TypeError: 'sage.rings.integer.Integer' object is not callable

why is this, I already had that

assume(k,'real')
assume(pi/2>k>0)
assume(j,'real')
assume(pi/2>j>0)
assume(N,'real')
assume(N>0)

so what can I do to fix this error?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-23 07:20:07 +0100

fidbc gravatar image

updated 2017-09-23 07:22:21 +0100

Your code contains syntax errors. One of the problems seems to be:

sin^2(j*2*pi/N)

This is being interpreted as sin^(2(j*2*pi/N)), which is problably not what you meant. Did you mean sin(j*2*pi/N)^2?

Seems like this is the only error.

edit flag offensive delete link more

Comments

sigh I can't believe that I did not see this. Thank you

Andres Mejia gravatar imageAndres Mejia ( 2017-09-23 17:01:25 +0100 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2017-09-23 03:17:11 +0100

Seen: 370 times

Last updated: Sep 23 '17