What I would like to do is manipulate and simplify trig functions as they appear often in my calculations.
What I would like to do is to use the double angle identities.
Here is what I have implemented.
doublesin[Sin[function_]] := 2 Sin[#/2] Cos[#/2] &@ function doublecos[Cos[function_]] := 1 - 2 Sin[#/2]^2 &@ function
And to some extent, it works fine, but it is limited.
Here it is,
In:= doublesin[Sin[2 a]] Out= 2 Cos[a] Sin[a] In:= Sin[2 b] // doublesin Out= 2 Cos[b] Sin[b] In:= doublecos[Cos[4 c]] Out= 1 - 2 Sin[2 c]^2
And here is where and how it fails,
In:= Cos[4 c] Sin[4 a] // doublesin // doublecos Out= doublecos[doublesin[Cos[4 c] Sin[4 a]]] In:= Cos[4 c] Sin[4 a] // doublecos Out= doublecos[Cos[4 c] Sin[4 a]]
In my expressions, I have things that look like $\cos(4x) \sin(6x) + \cos(8x) \sin(10x) + \cdots$
Ideally, I would like something that works like the Factor,Simplify, etc commands. Apply the commands at the end of a long expression and act on all trig functions, whether they sit alone or as a product with other trig functions.
Thanks in advance.