ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 14 Mar 2011 08:21:54 +0100No simplification is done to invert trigonometric functions ?https://ask.sagemath.org/question/7994/no-simplification-is-done-to-invert-trigonometric-functions/I noticed that $\cos(\pi/6)$ gives $(1/2)\sqrt{3}$ as expected but $\arccos((1/2)\sqrt{3})$ gives $\arccos((1/2)\sqrt{3})$.
Is it a missing feature or is there an option that you must call explicitely to obtain $\arccos((1/2)\sqrt{3})=\pi/6$ ?
Thanks for your answerSun, 13 Mar 2011 10:27:57 +0100https://ask.sagemath.org/question/7994/no-simplification-is-done-to-invert-trigonometric-functions/Comment by kcrisman for <p>I noticed that $\cos(\pi/6)$ gives $(1/2)\sqrt{3}$ as expected but $\arccos((1/2)\sqrt{3})$ gives $\arccos((1/2)\sqrt{3})$.</p>
<p>Is it a missing feature or is there an option that you must call explicitely to obtain $\arccos((1/2)\sqrt{3})=\pi/6$ ?</p>
<p>Thanks for your answer</p>
https://ask.sagemath.org/question/7994/no-simplification-is-done-to-invert-trigonometric-functions/?comment=21999#post-id-21999Unrelated to your question, you can used LaTeX-type markup to write on this site. Try to edit your question to see the syntax, which I've edited for you.Mon, 14 Mar 2011 08:21:54 +0100https://ask.sagemath.org/question/7994/no-simplification-is-done-to-invert-trigonometric-functions/?comment=21999#post-id-21999Answer by Mike Hansen for <p>I noticed that $\cos(\pi/6)$ gives $(1/2)\sqrt{3}$ as expected but $\arccos((1/2)\sqrt{3})$ gives $\arccos((1/2)\sqrt{3})$.</p>
<p>Is it a missing feature or is there an option that you must call explicitely to obtain $\arccos((1/2)\sqrt{3})=\pi/6$ ?</p>
<p>Thanks for your answer</p>
https://ask.sagemath.org/question/7994/no-simplification-is-done-to-invert-trigonometric-functions/?answer=12186#post-id-12186You need to explicitly call `trig_simplify` for it to do the simplification in the other direction:
sage: f = arccos(1/2*sqrt(3)); f
arccos(1/2*sqrt(3))
sage: f.trig_simplify()
1/6*pi
Sun, 13 Mar 2011 11:18:35 +0100https://ask.sagemath.org/question/7994/no-simplification-is-done-to-invert-trigonometric-functions/?answer=12186#post-id-12186