On Wed, Dec 23, 2009 at 10:10 PM, Ben Woodruff <bmwoodr...@gmail.com> wrote:
> Hi all. This is my first post to the discussions groups I've been
> following for the last 4 months.  I used Sage in my first semester
> calculus class this last semester, and plan to move every class I can
> over to Sage during the next few years.  Giving the students something
> they can use anywhere they go without forking over thousands of
> dollars has a huge advantage.  As such, I'm going to start doing a
> better job of posting errors when they arise and I can't figure out
> how to resolve them.
>
> Here is the issue.  When I evaluate
>
> sage: var('t')
> sage: integrate(sec(t)*tan(t),t,0,pi/3)
>
> I get the error message
>
>>Traceback (click to the left for traceback)
>>...
>>Is  cos(t)  positive, negative, or zero?
>
> I can get the correct solution of 1 by executing
>
> sage: var('t')
> sage: F(t)=integrate(sec(t)*tan(t),t)
> sage: F(pi/3)-F(0)
>
> Similar issues arise with other trig functions.  The command
>
> sage: integrate(csc(x)*cot(x),x,pi/3,pi/2)
>
> gives the error message
>
>>Traceback (click to the left for traceback)
>>...
>>Is  sin(x)  positive, negative, or zero?
>
> Any ideas why Sage cannot complete this definite integral? I would
> prefer to have Sage give the answers without using an assuming
> commands, since by specifying the bounds are between 0 and pi/3 I am
> already declaring cos(x)>0 and x to be real.
>
> Could this be related to
> http://trac.sagemath.org/sage_trac/ticket/6956

No.

The problem -- which is a serious one -- is that Sage's symbolic
integration is by default done using Maxima (this is currently the
main way in which Maxima is used in Sage; the other big way is for
solving symbolic equations).  Maxima has a somewhat weak assumptions
system and was designed in the 1960s when the assumption that a user
was at the terminal happily answering questions -- a sort of
conversation -- was considered reasonable.

Sympy is the only other program in Sage that does symbolic
integration, and you can access it by doing for example

 sage: integrate(sin(t),t,0,pi/3, algorithm='sympy')

However, it only works on a small class of fairly simple integrals.

Until we Sage developers write our own symbolic integration
implementation, we'll continue to have similar issues to what you
complain about above.  I'm for doing that.

In the meantime, I hope we can find ways around the issues that arise
by using assume.

 -- William

-- 
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

Reply via email to