MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Symbolic replacement of scalar products

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120046] Re: Symbolic replacement of scalar products
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Thu, 7 Jul 2011 07:28:56 -0400 (EDT)
  • References: <201107060940.FAA29437@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

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 at 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 at yahoo.com


  • Prev by Date: Re: Bug 1+4/10
  • Next by Date: Re: How to write a "proper" math document
  • Previous by thread: Symbolic replacement of scalar products
  • Next by thread: Re: Symbolic replacement of scalar products