# Mathematica doesn't simplify a simple expression

The question is simple as that. I have:

$Assumptions[v \[Element] Reals] x[u_, v_] := {f[u], g[u] Cos[v], g[u] Sin[v]} pil[{x_, y_, z_}, {a_, b_, c_}] := x*a + y*b - z*c pil[D[x[u, v], u], D[x[u, v], v]] -2 Cos[v] g[u] Sin[v] Derivative[1][g][u]  and for some reason, Simplify won't turn the last expression into -Sin[2v] Derivative[1][g][u]. I looked a bit around before asking, so I also tried FullSimplify and $Assumptions[v \[Element] Reals], to no avail. Why is all of this going wrong? Can someone explain to me, please? (I find a bit hard to trust a program that can't use the simple fact that $\sin(2v) = 2 \sin v \cos v$.)

• Try using TrigReduce – RunnyKine Oct 12 '14 at 22:19
• It worked. Thank you very much! Anyway, I'll leave the question here, in case someone shows up to give a more technical explanation for the problem. – Ivo Terek Oct 12 '14 at 22:21
• The reason is Mathematica is such a large system with a lot of rewrite rules and special cases of those rules. So sometimes you'll have to use available special functions to force it to do certain simplifications as in this case. – RunnyKine Oct 12 '14 at 22:26
• That makes it clearer! – Ivo Terek Oct 12 '14 at 22:28

You can use TrigReduce to do what you want:
TrigReduce[-2 Cos[v] g[u] Sin[v] Derivative[1][g][u]]

-g[u] Sin[2 v] Derivative[1][g][u]