Re: TrigReduce: controlling the scope

*To*: mathgroup at smc.vnet.net*Subject*: [mg129066] Re: TrigReduce: controlling the scope*From*: Christoph Lhotka <christoph.lhotka at fundp.ac.be>*Date*: Tue, 11 Dec 2012 19:53:57 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net*References*: <20121211072505.3729568A2@smc.vnet.net>

Hello, a workaround could be: expr = Sin[alpha] Cos[omega tau1] Cos[omega tau2] Cos[beta] step1 = expr /. f_[arg_] :> Subscript[f, arg] /; MemberQ[{arg}, alpha | beta] step2 = TrigReduce[step1] step2 /. Subscript[f_, arg_] :> f[arg] Best, Christoph On 12/11/2012 08:25 AM, alan wrote: > I have an expression that is a sum of products of trignometric functions. Each term is something like this: > Sin[alpha] Cos[omega tau1] Cos[omega tau2] Cos[beta]. (1) > I want to apply trig identities to the terms that contain omega to transform them into trig functions of sums and differences, but I don't want the same transformation applied to the terms involving alpha and beta. For example, I want to express (1) as > (1/2) Sin[alpha] Cos[beta](Cos[omega(tau1 - tau2)]+Cos[omega(tau1 + tau2)]) > > If I apply TrigReduce to (1), I get terms like > Cos[omega tau1 - omega tau2 + alpha - beta]. > How do I restrict the action of TrigReduce to terms containing omega? > (I can do a hybrid calculation by cutting and pasting the terms I want, but I'd rather not have to cut and paste by hand). > > Thanks. >

**References**:**TrigReduce: controlling the scope***From:*alan <alansbarnett@verizon.net>