Re: Trignometric rules
- To: mathgroup at smc.vnet.net
- Subject: [mg118238] Re: Trignometric rules
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 17 Apr 2011 07:54:55 -0400 (EDT)
Because you are allowing Cos[b_ - \[Phi]b + y_] to evaluate and when it does so there is no longer a match. The simplest way to avoid this problem is to use HoldPattern: 2 k1 k2 u^2 \[Epsilon]1 Cos[d1+d2-\[Phi]b-\[Phi]r]/.HoldPattern[A_*Cos[b_-\[Phi]b+y_]]->-A*\[Phi]b*Sin[b+y] -2 k1 k2 u^2 \[Epsilon]1 \[Phi]b sin(d1+d2-\[Phi]r) Andrzej Kozlowski On 16 Apr 2011, at 13:33, Alexei Boulbitch wrote: > Indeed, why this works: > > 2 k1^3 k2 v^2 \[Epsilon]1^3 \[Epsilon]c^2 Cos[ > d1 + d3 + \[Phi]b + \[Phi]r] /. {A_*Cos[a_ + \[Phi]b + x_] -> > A*\[Phi]b*Sin[a + x]} > > 2 k1^3 k2 v^2 \[Epsilon]1^3 \[Epsilon]c^2 \[Phi]b Sin[ > d1 + d3 + \[Phi]r] > > while this: > > 2 k1 k2 u^2 \[Epsilon]1 Cos[d1 + d2 - \[Phi]b - \[Phi]r] /. > A_*Cos[b_ - \[Phi]b + y_] -> -A*\[Phi]b*Sin[b + y] > > 2 k1 k2 u^2 \[Epsilon]1 Cos[d1 + d2 - \[Phi]b - \[Phi]r] > > does not? > > Best, Alexei > > > I have an expression as hsown below > > tt = -4 k1^2 v^2 \[Epsilon]1^2 \[Epsilon]c^2 Cos[2 d1 + d2 + d3] - > 2 k1 k2 u^2 \[Epsilon]1 Cos[d1 + d2 - \[Phi]b - \[Phi]r] + > 2 k1^2 v^2 \[Epsilon]1^2 \[Epsilon]c^2 Cos[ > 2 d1 + d2 + d3 - \[Phi]b - \[Phi]r] + > 2 k1^3 k2 v^2 \[Epsilon]1^3 \[Epsilon]c^2 Cos[ > d1 + d3 + \[Phi]b + \[Phi]r] + > 2 k1^2 u^2 \[Epsilon]1^2 Cos[2 d1 + d2 + d3 + \[Phi]b + \[Phi]r] - > 2 k1^2 v^2 \[Epsilon]1^2 \[Epsilon]c^2 Cos[ > 2 d1 + d2 + d3 + \[Phi]b + \[Phi]r]; > > I'd like to replace any term containing Cos[+/- phib + x_] with 2 Sin [+/-phib] Sin[x]. How do I go about doing it. > > Thanks > Chelly > > -- > Alexei Boulbitch, Dr. habil. > Senior Scientist > Material Development > > IEE S.A. > ZAE Weiergewan > 11, rue Edmond Reuter > L-5326 CONTERN > Luxembourg > > Tel: +352 2454 2566 > Fax: +352 2454 3566 > Mobile: +49 (0) 151 52 40 66 44 > > e-mail: alexei.boulbitch at iee.lu > > www.iee.lu > > -- > > This e-mail may contain trade secrets or privileged, undisclosed or > otherwise confidential information. If you are not the intended > recipient and have received this e-mail in error, you are hereby > notified that any review, copying or distribution of it is strictly > prohibited. Please inform us immediately and destroy the original > transmittal from your system. Thank you for your co-operation. > >