Mathematica Asked on January 11, 2021
I have this code of Mathematica
(1/(2 (fj - fk) π))
Cos[(fj - fk) π T + (fj - fk) π (T + δt)] Sin[(fj -
fk) π T - (fj - fk) π (T + δt)]
There are a few terms inside these Sin functions that if multiplied can be canceled out, Can someone tell me how to simplify this expression in Mathematica? TrigReduce, simply, Fullsimply didn’t work here.
Does this do what you want?
expr=(1/(2 (fj - fk) π)) Cos[(fj - fk) π T + (fj -
fk) π (T + δt)] Sin[(fj - fk) π T - (fj -
fk) π (T + δt)];
expr /. (f : Cos | Sin)[a_] :> f[Simplify[a]]
This applies Simplify
only to the arguments of Sin
and Cos
Alternatively,
Simplify[expr,Trig->False]
(This prevents Mathematica from applying Trig manipulations during Simplify
Correct answer by mmeent on January 11, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP