Ask Your Question

recognize form sin(x)^2 + cos(x)^2 = 1

asked 2014-08-16 11:17:01 -0500

mgass gravatar image

Is there a way to tell sage that expressions like sin(x)^2 + cos(x)^2 are equivalent to 1? So, for instance, sage would replace/simplify an expression like sin(t+1)^2 + cos(t+1)^2 with 1.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-16 12:58:19 -0500

mgass gravatar image

Looks like trig_simplify() does the job:

f(t) = cos(t+1)^2 + sin(t+1)^2 f.trig_simplify()

t |--> 1

Where would I find this in the sage documentation if I did not know the name of the method (trig_simplify()) ?

edit flag offensive delete link more


You're looking to use a trig identity to simplify your expression. Searching "trig identity" on the sagemath website gives [this page]( as the first result and searching "trig simplify" gets you results, too. Likewise, googling "sagemath trig" gives 1 (!) result, the page linked above. A problem with simplifying is that there can be multiple simplified form [cos(2x), cos^2(x)-sin^2(x), 2cos^2(x)-1, 1-2sin^2(x)]. Which form result should be given as simplified?

dazedANDconfused gravatar imagedazedANDconfused ( 2014-08-16 13:40:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-08-16 11:17:01 -0500

Seen: 293 times

Last updated: Aug 16 '14