Transformation Problem
- To: mathgroup at smc.vnet.net
- Subject: [mg43454] Transformation Problem
- From: "Geir Ove" <geirAoves at online.no>
- Date: Wed, 17 Sep 2003 07:59:21 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello, I am trying to transform an expression that involves Sin[x] and Cos[x] into an expression that only contains Cos[x] terms. However, I do not succeed. The very problem seems to be that the built in rules that Mathematica knows, will always rewrite e.g. terms like -Cos[x + Pi/2] to Sin[x]. E.g. assume: f = Sin[x] + Cos[x] Now, for the sake of the example, I want mathematica to start represening f as Cos[x] - Cos[x + Pi/2]. So I try: In : f /. Sin[x] -> -Cos[x + Pi/2] Out: Sin[x] + Cos[x] It seems that mathematica does nothing, but it does: It does the replacement, then uses its internal definitions to simplify back -Cos[x + Pi/2] to Sin[x]. You can convince yourself about this by doing: In : f /. Sin[x] -> Cos[x + Pi/2] Out: Sin[x] - Cos[x] Mathematica changed the sign since you gave the wring rule. QUESTION: How can I achieve what I want, namely the form: Cos[x] - Cos[x + Pi/2]. ??? The expression I wan to simplify is of course more complex, but the same principle applies. In advance, thanks for any help. Geir Ove Norway