On Feb 1, 4:47 pm, Simon <simonjty...@gmail.com> wrote: > Hi, this is hopefully an easy question: > > As a simple exercise, I'm trying to show that \int_0^{2\pi} e^{i (m-n) > x}dx = 2\pi\delta_{mn} for integer m, n. > Here's how I did it: > > sage: var('m,n'); w = SR.wild(0); > sage: assume(n, 'integer');assume(m, 'integer') > sage: int = integrate(e^(i*(m-n)*x),x,0,2*pi) > sage: print int.limit(m=n) > sage: print int.subs({e^(w):cosh(w)+sinh(w)}).simplify_trig() > 2*pi > 0 > > The bit I don't like is using the substitution... it should not be > nesc. The problem, I think, lies at > > sage: sin(2*pi*n).simplify_trig() # this works > sage: e^(i*2*pi*m).simplify_full() # this doesn't work > 0 > e^(2*I*pi*m)
In Maxima you would use rectform to convert the expression from polar to rect form: sage: int._maxima_().rectform() 0 sage: e^(i*2*pi*m)._maxima_().rectform() e^(2*I*pi*m) sage: exp(i*2*pi*m)._maxima_().rectform() 1 HTH, Andrej -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org