[Date Index]
[Thread Index]
[Author Index]
Re: trig expansion
*To*: mathgroup at smc.vnet.net
*Subject*: [mg8956] Re: trig expansion
*From*: tburton at cts.com (Tom Burton)
*Date*: Mon, 6 Oct 1997 01:59:24 -0400
*Organization*: Brahea Consulting
*Sender*: owner-wri-mathgroup at wolfram.com
On 30 Sep 1997 19:05:29 -0400, in comp.soft-sys.math.mathematica you
wrote:
>How can I cause Mathematica to expand Sin[2 Pi omega t + 2 Pi delta],
>where delta and omega are symbols, into the form
>
> Cos[2 Pi delta] Sin[2 Pi omega t] + Sin[2 Pi delta] Cos[2 Pi omega t]
>
>without using a replacment rule=20
>
> Sin[a_ + b_] -> Sin[a]Cos[b] + Cos[a]Sin[b]
>
>explicitly? (No TrigExpand does NOT do the trick -- it expands all
>the way down to trig functions of Pi delta and Pi t omega!)
Here's a solution that appears to be a bit more general than those I've
seen posted so far. The notion is to temporarily denature Times to foil
TrigExpand:
In[40]:=3D TrigExpand[Sin[a x + b y + c d z]
/.HoldPattern[Times[p__]]:>TimesHold[p]]
/.TimesHold[p__]:>Times[p]
Out[40]=3D
Cos[b y] Cos[c d z] Sin[a x]+Cos[a x] Cos[c d z] Sin[b y]+
Cos[a x] Cos[b y] Sin[c d z]-Sin[a x] Sin[b y] Sin[c d z]
Tom Burton
Prev by Date:
**Re: prograMing: split a list**
Next by Date:
**Integrate got slower in Version 3.0/Example**
Previous by thread:
**Re: trig expansion**
Next by thread:
**Re: trig expansion**
| |