On Wednesday, 16 April 2014 01:24:25 UTC-3, John H Palmieri wrote: > > I'm guessing that the issue is that your integrand simplifies when q=1 -- > at least one term becomes zero -- but you do the integral before doing this > simplification. Maybe the symbolic integration is not valid when q=1. If > you plug in the parameters before integrating, you get something very > different from Sage. Adding these two lines > > qs=integral(((TVcoff(t))^2/moff).subs(**params),t, d*pi/omega, 2*pi/omega) > # substitute before integrating > Nqs = qs.subs(**params).n() > > gives me something close to Maple's answer: > > sage: Nps > 1057.74513808638 + 3.42074504083530*I > sage: Nqs > 0.0164729319512844 + 5.58793544769287e-9*I > > Indeed, that looks good. I still don't understand what you mean by "the symbolic integration is not valid when q=1". I would think substituting before or after should not make a difference. Also, I remember that I attempted to simplify before integrating before, mainly to speed up calculations, but had some bad experience with real numbers and maxima. I can't recall the precise details right now, but after that I "learned" to defer substitution to the very end. That is until now. I love SAGE, but these things, i.e. having to know special cases and how to handle them, make using it much more difficult, especially for a non-power user as me. Thanks for pointing out how to avoid this issue.
Jorge -- 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.