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.Tue, 31 Mar 2015 17:12:14 +0200working on part of an expressionhttps://ask.sagemath.org/question/26397/working-on-part-of-an-expression/ I came across a complicated expression containing cos(4*t). I wanted to change it to 1-sin(2*t)^2. The tools are
trig_reduce, trig_expand, and trig_simplify. One of them expresses everything in trig functions of t and the other
two are useless. And all three will work on the entire expression, not just on one part. So this is a very general
question: how can I get sage to do something to just one part of an expression, rather than the whole expression?
(I suppose I could extract the part, work on it, and then substitute the result back in, but that would be difficult!)
And even on a standalone basis, I don't know how to change cos(4*t) to 1-sin(2*t)^2.beesonTue, 31 Mar 2015 17:12:14 +0200https://ask.sagemath.org/question/26397/