1 | initial version |
This is because when you declare a symbolic expression like f(th) = abs(sin(th))
it has no knowledge of the range of spherical coordinates on E
. There are two solutions to your issue:
1/ Stick to Sage's standard symbolic expression but use a better simplifying function, which takes into account the range of spherical coordinates in Euclidean space:
sage: E.<xi,th,ph> = EuclideanSpace(coordinates='spherical')
sage: f(th) = abs(sin(th))
sage: from sage.manifolds.utilities import simplify_chain_real
sage: simplify_chain_real(f(th))
sin(th)
See the documentation of simplify_chain_real for details.
2/ Use chart functions instead of mere symbolic expressions:
sage: E.<xi,th,ph> = EuclideanSpace(coordinates='spherical')
sage: X = E.spherical_coordinates(); X
Chart (E^3, (xi, th, ph))
sage: f = X.function(abs(sin(th)))
sage: f
abs(sin(th))
sage: f.simplify()
sin(th)