MathGroup Archive 2008

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

Search the Archive

Re: smart change of variables?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87744] Re: [mg87695] smart change of variables?
  • From: "W_Craig Carter" <ccarter at mit.edu>
  • Date: Wed, 16 Apr 2008 05:06:57 -0400 (EDT)
  • References: <200804151051.GAA27960@smc.vnet.net>

Hello, This works, but generates 8 expressions (branches) and long output:
expr = (p1 + 2*p2)*(k1 + 2*k2)
sol = Solve[ {
    p1 + p2 == k1 + k2,
    s == (p1 + p2)^2,
    t == (p1 - k1)^2,
    u == (p1 - k2)^2},
   {k1, k2, p1, p2}
   ];
newform = expr/.sol;
Length[newform]


On Tue, Apr 15, 2008 at 6:51 AM, Barrow <GRseminar at gmail.com> wrote:
> Dear all,
>
>  I have a arithmetic problem.
>  I have an expression expr = (p1 + 2*p2)*(k1 + 2*k2)
>  where p1 + p2 = k1 + k2
>  I wanna make the following change of variables,
>  s = (p1 + p2)^2
>  t = (p1 - k1)^2
>  u = (p1 - k2)^2
>
>  Is it possible to tell Mathematica to express expr
>  in terms of s, t, and u automatically?
>
>  Thanks so much.
>  any ideas would be appreciated.
>  Sincerely Barrow
>
>



-- 
W. Craig Carter


  • Prev by Date: Re: Package to 'graft' Lists onto Matrices
  • Next by Date: Re: smart change of variables?
  • Previous by thread: smart change of variables?
  • Next by thread: Re: smart change of variables?