1 | initial version |
There are far more simplify methods. expr.simplify?
gives a hint:
See also: "simplify_full()", "simplify_trig()", "simplify_rational()", "simplify_rectform()", "simplify_factorial()", "simplify_log()", "simplify_real()", "simplify_hypergeometric()", "canonicalize_radical()"
In this case simplify_trig
will do the job.
var('u')
expr = 1-cos(u)^2
expr.simplify_trig()