| 1 | initial version |
Not an answer, but a comment : giac's answer seems wrong.
Integrating integrand then differentiating it wrt x should give back, if not the same expression, at least an expression equal to Integrand. Checking formally such an equality isn't obvious ; however, one can plot the expressions and get numerical hints.
Comparing the integrand to the two expressions returned by fricas, the one returned by maxima, the one returned by mathematica and the one obtained via giac, one gets :
plot([integrand.subs(D), foo[0].diff(x).subs(D)-1/5, foo[1].diff(x).subs(D)+1/5, integrand.subs(D).integrate(x).diff(x)+2/5, mathematica.Integrate(integrand,x).sage().diff(x).subs(D)-2/5, giac.integrate(*map(lambda u:u._giac_(), (integrand, x)))._sage_().diff(x).subs(D)+3/5], (-pi, pi), ymin=-5, ymax=5, legend_label=["I", "F0", "F1", "Mx", "Ma", "G"])

All those expressions seem equal except for the one returned by giac.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.