ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 12 Apr 2018 14:03:55 -0500evaluate (simplify) trigonometric expressionhttps://ask.sagemath.org/question/41993/evaluate-simplify-trigonometric-expression/
t = var('t')
R = vector ((3*cos(t), 3*sin(t), 4*t))
dRdt = R.diff(t)
show(dRdt)
ds = dRdt.norm()
show(ds)
when I try to show ds it gives mi a trigonometric expression which is actually is equal to 5.
I tried simplify() and trig_simplify but it didn't help...
Any tips are welcome.
Thanks in advanceThu, 12 Apr 2018 12:13:32 -0500https://ask.sagemath.org/question/41993/evaluate-simplify-trigonometric-expression/Answer by Emmanuel Charpentier for <pre><code>t = var('t')
R = vector ((3*cos(t), 3*sin(t), 4*t))
dRdt = R.diff(t)
show(dRdt)
ds = dRdt.norm()
show(ds)
</code></pre>
<p>when I try to show ds it gives mi a trigonometric expression which is actually is equal to 5.
I tried simplify() and trig_simplify but it didn't help...</p>
<p>Any tips are welcome.
Thanks in advance</p>
https://ask.sagemath.org/question/41993/evaluate-simplify-trigonometric-expression/?answer=41994#post-id-41994Well...
sage: R=vector([3*cos(t),3*sin(t),4*t]);R
(3*cos(t), 3*sin(t), 4*t)
sage: with assuming(t,"real"): (R.diff(t).norm()^2).trig_reduce().sqrt()
5
or even :
sage: with assuming(t,"real"): R.diff(t).norm().trig_reduce()
5
Is that acceptable to you ?
Thu, 12 Apr 2018 14:03:55 -0500https://ask.sagemath.org/question/41993/evaluate-simplify-trigonometric-expression/?answer=41994#post-id-41994