Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1748
| From | Andrzej Kozlowski <akoz@mimuw.edu.pl> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Trignometric rules |
| Date | 2011-04-17 11:54 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ioeke4$n39$1@smc.vnet.net> (permalink) |
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@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.
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Trignometric rules Andrzej Kozlowski <akoz@mimuw.edu.pl> - 2011-04-17 11:54 +0000
csiph-web