I found a few unexpected behaviors. There's good support for many of the inference rules. When I tried to apply Sage to more advanced uses, either I don't understand the math well enough, or support in Sage doesn't exist.
Expectation value doesn't render Latex
Expectation values are used in the variance relation identity. I was impressed by the ability of Sage to use Expectation value from SymPy. x=var('x') from sympy.stats import E # expectation value expr1=E((x-E(x))^2)==E(x^2)-(E(x))^2 expr2=E(x^2-2*x*E(x)+E(x)^2)==E(x^2)-(E(x))^2 print(bool(expr1.lhs() == expr2.lhs())) expr3=E(x^2)-2*E(x)*E(x)+E(x)^2==E(x^2)-(E(x))^2 print(bool(expr3.lhs() == expr2.lhs()))
True
True
However, I wasn't able to display the content in LaTeX:
print(latex(expr3))
0 == 0
This is unfortunate but not a blocker
Real Part of Expression isn't what I was expecting
Sage doesn't produce the output I expected from .real_part()
Symbolic cross-products work as desired h,j,k=var('h,j,k') m,n,p=var('m,n,p') E = vector(SR, [h,j,k]) F = vector(SR, [m,n,p]) print(E.cross_product(F)) (-k*n + j*p, k*m - h*p, -j*m + h*n) Other vector calculus operations appear to lack support for symbolic manipulation https://en.wikipedia.org/wiki/Del#Gradient https://en.wikipedia.org/wiki/Del#Divergence https://en.wikipedia.org/wiki/Del#Curl I don't quite understand what's being done with the following: forget() V = VectorSpace(SR,3) h,j,k=var('h,j,k') m,n,p=var('m,n,p') E = vector(SR, [h,j,k]) print(E.curl([1,2,3])) print(E.div([1,2,3])) (0, -1, 1) 1