Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3528 > unrolled thread

Re: Symbolic replacement of scalar products

Started byDrMajorBob <btreat1@austin.rr.com>
First post2011-07-07 11:32 +0000
Last post2011-07-07 11:32 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Symbolic replacement of scalar products DrMajorBob <btreat1@austin.rr.com> - 2011-07-07 11:32 +0000

#3528 — Re: Symbolic replacement of scalar products

FromDrMajorBob <btreat1@austin.rr.com>
Date2011-07-07 11:32 +0000
SubjectRe: Symbolic replacement of scalar products
Message-ID<iv45g2$evm$1@smc.vnet.net>
This might do it:

Simplify[#, {a1*b1 + a2*b2 + a3*b3 == pAB}] & /@ {a1*b1 + a2*b2 +
    a3*b3, -a1*b1 - a2*b2 - a3*b3, 2 a1*b1 + 2 a2*b2 + 2 a3*b3}

{pAB, -pAB, 2 pAB}

Bobby

On Wed, 06 Jul 2011 04:40:38 -0500, Giuseppe <juseppe78@gmail.com> wrote:

> Hello,
>
> I have very complicated expressions containing scalar products like
>
> a1*b1 + a2*b2 + a3*b3
>
> In order to reduce the complexity, I would like to establish a set of  
> rules like
>
> rule={a1*b1 + a2*b2 + a3*b3 -> pAB, ...}
>
> in order to replace each time the scalar product by an appropriate new  
> symbol (pAB in the example).
> The problem is that, apparently, Mathematica does not perform the  
> substitution if in the expression the scalar products appear together  
> with some multiplying factor; for example Mathematica fails to apply the  
> previous rule if the expression is
>
> -a1*b1 - a2*b2 - a3*b3
>
> or
>
> 2a1*b1 + 2a2*b2 + 2a3*b3
>
> How could solve this problem?
>


-- 
DrMajorBob@yahoo.com

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web