#3520: bug in integrating sqrt
----------------------+-----------------------------------------------------
Reporter: wdj | Owner: gfurnish
Type: defect | Status: new
Priority: major | Milestone: sage-4.1.2
Component: calculus | Keywords:
Reviewer: | Author:
Merged: |
----------------------+-----------------------------------------------------
Comment(by kcrisman):
With the new symbolics and Maxima 5.19.1:
{{{
sage: sqrt(25-x)*sqrt(1+1/(4*(25-x)))
sqrt(-1/4/(x - 25) + 1)*sqrt(-x + 25)
sage: f = _
sage: f.integral(x)
1/12*(4*I*x - 101*I)*sqrt(4*x - 101)
sage: f.integral(x,9,16)
-37/12*sqrt(37) + 65/12*sqrt(65)
sage: f.nintegral(x,9,16)
(24.9153783348643, 2.7661626694613149e-13, 21, 0)
sage: g = f.simplify_radical()
sage: g.integral(x,9,16)
37/12*sqrt(37) - 65/12*sqrt(65)
sage: ans = g.integral(x,9,16)
sage: ans.real()
37/12*sqrt(37) - 65/12*sqrt(65)
sage: RR(ans.real())
-24.9153783348643
}}}
Maxima can now integrate the original one, but still gives the wrong
simplification (?) of f. It seems to be choosing the wrong square root of
negative one, as it were, since
{{{
sage: j = -g
sage: j.integrate(x,9,16)
-37/12*sqrt(37) + 65/12*sqrt(65)
}}}
So the real problem is in simplify_radical().
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3520#comment:2>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---