[GiNaC-list] trigonometric identity s2+c2=1

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Fri Jul 19 20:21:10 CEST 2019


>>>>> On Fri, 19 Jul 2019 19:59:09 +0200, Dario Pellegrini <pellegrini.dario at gmail.com> said:

    DP> I noticed that GiNaC does not apply the simplification:
    DP> cos(x)^2+sin(x)^2 = 1 for any x in R Is there any way for me to
    DP> force this substitution in my expressions? That would greatly
    DP> simplify them...

    The following works for me:

.subs(power(cos(wild(0)),2)==1-power(sin(wild(0)),2),subs_options::algebraic).normal();
-- 
Vladimir V. Kisil                 http://www.maths.leeds.ac.uk/~kisilv/
  Book:     Geometry of Mobius Transformations     http://goo.gl/EaG2Vu
  Software: Geometry of cycles          http://moebinv.sourceforge.net/


More information about the GiNaC-list mailing list