I'm solving equations with many Cosines and Sines. And I want to convert all the Sines to Cosines using trigonometric formulas such as cos(x)=sin(x+pi/2). How can I do this?
The main problem here is that Mathematica immediately converts terms such as
Sin[x+π/2] to the more simpler
Cos[x]. You have to prevent this from occurring. You could do that with
Defer or in V10 with
Inactivate[ Cos[p x + 2] Sin[z a + q] + Cos[x]^2/(Sin[a + b] - Cos[2 n]) /. Cos[x_] :> Sin[x + π/2], Sin ]
or, perhaps better (per comment of Bob Hanlon):
Cos[p*x + 2]*Sin[z*a + q] + Cos[x]^2/(Sin[a + b] - Cos[2*n]) /. Cos[x_] :> Inactive[Sin][x + Pi/2]
(note that the inactive sines are printed in a gray style).