Expand description
Trigonometric simplification (Gap analysis §3.3) — identity-driven rewrites over the
CAS’s Sin/Cos/Tan nodes that plain simplify
cannot do (it knows only constant folding and algebraic identities).
Implemented identities, each value-preserving for all real inputs:
- Pythagorean:
k·sin²(u) + k·cos²(u) → k(any common scalark, either order), and1 − sin²(u) → cos²(u),1 − cos²(u) → sin²(u). - Parity:
sin(−u) → −sin(u),cos(−u) → cos(u),tan(−u) → −tan(u). - Quotient:
sin(u)/cos(u) → tan(u).
Applied bottom-up to a bounded fixpoint and interleaved with the base simplify, so the
Pythagorean collapse also fires on nested sums after the algebra normalises them.
Functions§
- simplify_
trig - Simplify trigonometric structure in
expr, layered on the always-sound basesimplify.