MathGroup Archive 2009

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

Search the Archive

Re: Replacing expressions with smaller atoms

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100473] Re: [mg100447] Replacing expressions with smaller atoms
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 5 Jun 2009 03:01:31 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

M = x + (x (x^2 + x + 1))^(1/2);

Simplify[M, L == x^2 + x + 1]

Sqrt[L*x] + x

M /. x^2 + x + 1 -> L

Sqrt[L*x] + x


Bob Hanlon

---- Ben Forbes <bdforbes at gmail.com> wrote: 

=============
If I define an atom eg L=x^2+x+1, is there a way to rewrite an
expression with these atoms? For example:

L=x^2+x+1
M=x+(x(x^2+x+1))^(1/2)

I would like some way to express this as x+(xL)^(1/2). Is this possible?




  • Prev by Date: Re: Re: Re: RandomReal gets stuck
  • Next by Date: Polygon Union
  • Previous by thread: Re: Replacing expressions with smaller atoms
  • Next by thread: Debugger, um, tutorial on it??