# How to do some trigonometric derivations

Two substitutions fail, so do I forget some earlier steps?

For

Cos[x] == Sin[(1/2)*Pi + x] /. x -> (1/2)*x = true

I don't get the final answer, but only true.

Cos[(1/2)*x] == Sin[(1/2)*Pi + (1/2)*x] (final answer)

A second derivation case :

Sin[x] == 2*Cos[x/2]*Sin[x/2] /. Cos[(1/2)*x] -> Sin[(1/2)*Pi + (1/2)*x] (*no substition possible *)

• Look at the output of Trace[Cos[x] == Sin[(1/2)*Pi + x] /. x -> (1/2)*x]. Note that the initial equation evaluates to True before the replacement ever comes into play. Apr 10 at 20:45
• Thanks, Trace shows the initial equation evaluates to True before the replacement , so no need to come up for MMA with a another evaluation then. How this list exactly works i don't know yet. Is it not possible to force MMA to evaluate only the replacement ? Apr 14 at 17:21
• I don't understand your question. If you want to know about Trace; highlight it in Mathematica and press F1 for help. Apr 14 at 17:48
• Thanks, can imagine that my question is not understandable. Evalueting the expression is not a good idea seems, so with command Inactive you can prevent that Apr 14 at 20:15

Inactive@(Cos[x] == Sin[(1/2)*Pi + x]) /. x -> (1/2)*x


Sin[x] == 2*Cos[x/2]*Sin[x/2] /.
Cos[(1/2)*x] -> Inactive@Sin[(1/2)*Pi + (1/2)*x]


• thanks . There is a reason behind it , why "inactive" command is used. What is that reason? Apr 10 at 20:42
• @janhardo in a notebook try to run Sin[(1/2)*Pi + (1/2)*x] and Inactive@Sin[(1/2)*Pi + (1/2)*x]. You will see that Mathematica makes the first Cos[x/2] automatically -no Factor, Simplify, Reduce etc. The other remains as it is; it is Inactive. You can always Activate the expression at the end and get a True statement
– bmf
Apr 10 at 20:50
• thanks, i do see the difference Apr 11 at 7:24
• @janhardo glad I was able to help
– bmf
Apr 11 at 12:36