Gary wrote:

> I've been trying to evaluate a symbolic double integral but am
> perplexed by the unevaluated tan(pi/2) expressions in the result since
> tan(pi/2) is undefined. What am I missing here and what do I need to
> do to get this to evaluate to the correct value of
> (4*pi - 3*sqrt(3))*a^2/6?

> sage input:
> ***************************************************************
> var('a r theta')
> assume(a > 0)
> integral(integral(r, r, a*csc(theta), 2*a), theta, pi/6, pi/2)
> ***************************************************************
>
> sage output:
> *********************************************************************
> (2*pi*tan(pi/2) + 1)*a^2/(2*tan(pi/2)) - (2*pi + 3*sqrt(3))*a^2/6
> *********************************************************************

Sage punts to Maxima to do symbolic integrals.
In this case, Maxima computed an antiderivative and plugged
in the limits of integration. You can coax Maxima into doing
the right thing by computing a limit:

assume (a > 0, bb > 0, bb > %pi/6);
integrate (integrate (r, r, a*csc(theta), 2*a), theta, %pi/6, bb);
 => (4*a^2*bb*tan(bb)+a^2)/(2*tan(bb))-(2*%pi+3*sqrt(3))*a^2/6
limit (%, bb, %pi/2, minus);
 => (4*%pi-3*sqrt(3))*a^2/6

I guess Maxima could apply the limit automatically -- that
shouldn't change the result for most integrals, but gets the
correct result in cases like this. Opinions from the Maxima
crowd are welcome.

best

Robert Dodier

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to