Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: Re: Simplifying constants...bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18610] Re: [mg18559] Re: [mg18489] Simplifying constants...bug?
  • From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
  • Date: Tue, 13 Jul 1999 01:01:33 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

You can always understand such things by looking at FullForm. In the first
case you have

In[1]:=
FullForm[(a + c*d)/(b + c*d)]
Out[1]//FullForm=
Times[Plus[a, Times[c, d]], Power[Plus[b, Times[c, d]], -1]]

There are two instances of Times[c,d] and both are replaced by -z. In the
second case you have:



In[2]:=
FullForm[(a + c*d)/(c*d)]
Out[2]//FullForm=
Times[Power[c, -1], Power[d, -1], Plus[a, Times[c, d]]]

There is only one instance of TImes[c,d] and it is replaced by -z. So
everything is as it should be.
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp


----------
>From: calvitti at boes.ces.cwru.edu
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg18610] [mg18559] Re: [mg18489] Simplifying constants...bug?
>Date: Sat, Jul 10, 1999, 3:18 PM
>

>
> here's some intersting behavior in 3.0:
>
>     (a + c*d)/(b + c*d) //. c*d -> -z
>
> gives (as expected):
>
>     (a - z)/(b - z)
>
> yet
>
>     (a + c*d)/(c*d) //. c*d -> -z
>
> no longer simplifes the denominator:
>
>     (a+b-z)/(c*d)
>
> anyone know why?
>
> +------------------------------------------+
>   alan c
>   systems and control engineering
>   case western reserve university
>
>   calvitti at alpha.ces.cwru.edu
> +------------------------------------------+
>
>
>
> "Ersek, Ted R" <ErsekTR at navair.navy.mil> writes:
>
>> Morten G. Dyndgaard wrote:
>> -----------------------------
>> I am working with some annoyingly long equations that I want to simplify
>> by including one set of parameters in a constant (or function) A, and
>> another in B and so on.
>>
>> You can easily do:
>> A = b+c+d+e
>>
>> but what I want to do is the reverse:
>> b+c+d+e = A
>> -----------------------------
>>
>> This should help.
>> In[1]:=
>> expr=a+b+b1+c+c1+d+d1+e;
>>
>>
>> In[2]:=
>> expr/.a+b+c+d+e->A
>>
>> Out[2]=
>> A+b1+c1+d1
>>
>>
>> Regards,
>> Ted Ersek


  • Prev by Date: RE: Re: "At long last, Sir, have you no shame?"
  • Next by Date: Extend the HTMLSave command with CSS !!!
  • Previous by thread: Re: Re: Simplifying constants...bug?
  • Next by thread: Re: "Solve" or "FindRoot" in a module