#6465: Derivative D acts wrongly on symbolic integration
--------------------------------------------------------------+-------------
Reporter: gmhossain | Owner:
Type: defect | Status:
needs_review
Priority: critical | Milestone:
sage-4.3.3
Component: symbolics | Keywords:
Author: Burcin Erocal, Golam Mortuza Hossain | Upstream:
N/A
Reviewer: Tim Dumol, Karl-Dieter Crisman, Ross Kyprianou | Merged:
Work_issues: |
--------------------------------------------------------------+-------------
Changes (by rossk):
* reviewer: Tim Dumol, Karl-Dieter Crisman => Tim Dumol, Karl-Dieter
Crisman, Ross Kyprianou
Comment:
The patch solves the stated problem without loss of functionality (at
least in the tests below). +1 for positive review.
{{{
sage: f(x) = function('f',x)
sage: g = integrate(f(x),x)
sage: g.diff(x)
f(x)
sage: integrate(f(x),x).diff(x)
f(x)
sage: h(x,y) = function('h',x,y)
sage: kx = integrate(h(x,y),x)
sage: kx
integrate(h(x, y), x)
sage: kx.diff(x)
h(x, y)
sage: kxy = integrate( integrate(h(x,y),x), y)
sage: kxy
integrate(integrate(h(x, y), x), y)
sage: kxy.diff(y).diff(x)
h(x, y)
sage: kxy.diff(x).diff(y)
h(x, y)
sage: kxy.diff(x)
integrate(h(x, y), y)
sage: integrate(1/(2*x+1)^2, x, 0, 1)
1/3
sage: loads(dumps(integrate(1/(2*x+1)^2, x, 0, 1))) == 1/3
True
sage: integrate(1/(2*x+1)^2, x, 0.0, 1.0)
0.333333333333
sage: integrate(1/(2*x+1)^2, x, 0, 1.0)
0.333333333333
sage: integrate(1/(2*x+1)^2, x, CC(0), 1.0)
0.333333333333
sage: integrate(x/(1+x^2),x)
1/2*log(x^2 + 1)
sage: integrate(tan(x),x)
log(sec(x))
}}}
There is one issue (that is not necessarily a part of this ticket).
I may be wrong but I'm reasonably sure that in general that
integrate( integrate(h(x,y),x), y).diff(y).diff(x) <>
integrate( integrate(h(x,y),x), y).diff(x).diff(y)
But the following seems to imply it is (both are equal to h(x, y) )
{{{
sage: kxy = integrate( integrate(h(x,y),x), y)
sage: kxy
integrate(integrate(h(x, y), x), y)
sage: kxy.diff(y).diff(x)
h(x, y)
sage: kxy.diff(x).diff(y)
h(x, y)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6465#comment:20>
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.