-Sin[[Pi]/4 - 2 x]
How can I convert the trig function above into the equivalent form below?
Sin[-(\[Pi]/4) + 2 x]
The simplification approach below doesn’t yield the desired result.
-Sin[\[Pi]/4 - 2 x] // FullSimplify
-Sin[[Pi]/4 - 2 x]
How can I convert the trig function above into the equivalent form below?
Sin[-(\[Pi]/4) + 2 x]
The simplification approach below doesn’t yield the desired result.
-Sin[\[Pi]/4 - 2 x] // FullSimplify
The problem is that Mathematica has a built-in (and easily disabled) automatic simplification mechanism.
expr = -Sin[Pi/4 - 2 x];
expr /. -Sin[a_] :> Inactive[Sin][-a]
(*Inactive[Sin][-(\[Pi]/4) + 2 x]*)
% // Activate
(*-Sin[\[Pi]/4 - 2 x]*)
expr = -Sin[Pi/4 - 2 x];
expr /. -Sin[a_] :> With[{abc = Expand[-a]}, HoldForm[Sin[abc]]]
(*HoldForm[Sin[-(Pi/4) + 2*x]]*)
% // ReleaseHold
(*-Sin[\[Pi]/4 - 2 x]*)
Regards M.I.
Interesting, the behaviour of Sin depends on the alphabetical order of the variables:
Sin[-a + b]
Sin[-b + a]
Sin[-(\[Pi]/4) + 2 a]