![]() | 1 | initial version |
Workaround :
sage: maxima_calculus.diff(*map(lambda u:u._maxima_(), (E(beta), beta)))._sage_()
-2*beta^2*sum(X(k)^2*sin(theta(k))/(beta^2*X(k) + 1)^2, k, 1, n) + sum(X(k)*sin(theta(k))/(beta^2*X(k) + 1), k, 1, n)
i. e. :
−2β2n∑k=1X(k)2sin(θ(k))(β2X(k)+1)2+n∑k=1X(k)sin(θ(k))β2X(k)+1
which is, up to the order of the terms, what Maxima returns...
What Sage does :
sage: E(beta).diff(beta)
-(2*beta^2*X(k)^2*sin(theta(k))/(beta^2*X(k) + 1)^2 - X(k)*sin(theta(k))/(beta^2*X(k) + 1))*D[0](sum)(beta*X(k)*sin(theta(k))/(beta^2*X(k) + 1), k, 1, n)
contains D[0](sum)(beta*X(k)*sin(theta(k))/(beta^2*X(k) + 1)
, which is pure, unadulterated, two-hundred-proof nonsense...
This is a bug and should be reported as such.
HTH,