#8624: integral of abs(cos(x))*sin(x) gives false results
-----------------------------+----------------------------------------------
Reporter: jeroen | Owner: burcin
Type: defect | Status: needs_work
Priority: minor | Milestone: sage-4.4.3
Component: calculus | Keywords:
Author: Jason Grout | Upstream: N/A
Reviewer: Burcin Erocal | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by kcrisman):
> {{{
> **********************************************************************
> File ".../devel/sage-t/sage/functions/piecewise.py", line 780:
> sage: f.integral()
> Expected:
> Piecewise defined function with 1 parts, [[(-Infinity, +Infinity), x
|--> -integrate(e^(-abs(x)), x, x, +Infinity)]]
> Got:
> Piecewise defined function with 1 parts, [[(-Infinity, +Infinity), x
|--> -1/2*((sgn(x) - 1)*e^(2*x) - 2*e^x*sgn(x) + sgn(x) + 1)*e^(-x) - 1]]
> **********************************************************************
> }}}
This is actually ok, because it is supposed to return an antiderivative,
not a definite integral. It is fantastically more complicated than it has
to be, but it would simplify to
{{{
x>0: x --> -e^(-x)
x<0: x --> e^x
}}}
which is indeed the correct antiderivative.
> Maple simply gives 2 for this one:
Which is clearly correct, and indeed given by the previous line in the
file:
{{{
sage: f.integral(definite=True)
2
}}}
So if this really is all the errors (I will check this with the new Maxima
package momentarily), then I would say positive review once the z... are
reverted to actual numbers. I thought of another reason for this - the
user reading documentation might be confused about that if they didn't see
the actual output.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8624#comment:11>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.