On Wednesday, July 2, 2014 4:33:33 PM UTC-7, Chris Maness wrote:
>
> I don't see what the issue is with the code below: 
>
> phinS=e^(i*n*pi*x/a); 
> phim=e^(-i*m*pi*x/a); 
> a=var('a'); 
> assume(a > 0); 
> n=1; 
> m=1; 
> integrate(phinS*phim,x,-a,a) 

 
For one thing, it doesn't execute, and it doesn't produce the error message 
that you mention. n,m,a are not defined when the assignments to phinS and 
phim are executed, so they don't succeed.

Fixing the order of execution leads to a straightforward answer for me:

sage: a=var('a');
sage: assume(a > 0);
sage: n=1;
sage: m=1; 
sage: phinS=e^(i*n*pi*x/a);
sage: phim=e^(-i*m*pi*x/a); 
sage: integrate(phinS*phim,x,-a,a) 
2*a

so I suspect you had other, inconsistent definitions lying around when you 
ran into the error. It's always good to try and see if you can reproduce 
results in a fresh sage session, with a small and concise script (you had 
the latter, but you didn't try to run it in a fresh session)

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to