[Date Index]
[Thread Index]
[Author Index]
Re: Simplify with assumptions
*To*: mathgroup at smc.vnet.net
*Subject*: [mg32490] Re: Simplify with assumptions
*From*: "Dave Snead" <dsnead6 at charter.net>
*Date*: Wed, 23 Jan 2002 01:00:12 -0500 (EST)
*References*: <a2ghom$k7$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
<BobHanlon at aol.com> wrote in message news:a2ghom$k7$1 at smc.vnet.net...
>
> In a message dated 1/19/02 2:18:10 AM, dsnead6 at charter.net writes:
>
> >Using Mathematic 4.1, Why won't the 2nd expression simplify?
> >
> >Simplify[1 - c^2, s^2 + c^2 == 1]
> >gives
> >s^2
> >
> >But
> >Simplify[1 - s^2, s^2 + c^2 == 1]
> >gives
> >1 - s^2
> >
> >Why doesn't this 2nd expression yield c^2?
> >
> >The leaf count of both s^2 and c^2 are 3.
> >While the leaf count for both 1 - s^2 and 1 - c^2 are 7.
>
> I don't know why but, as in your example, Mathematica's behavior
> is sometimes dependent on the canonical order of the variable names.
> For this simplification, it appears to stop its search when it has a form
> which has eliminated the first (in canonical order) variable. One
> work-around is to replace some or all of the variable names with
> dummy names to alter the variables' order, solve the problem, and
> restore the original names. For example,
>
> Simplify[{1-c^2,1-s^2}, s^2+c^2==1]
>
> {s^2, 1 - s^2}
>
> Simplify[{1-c^2,1-s^2} /. c -> t,
>
> s^2+c^2==1 /. c -> t] /. t -> c
>
> {1 - c^2, c^2}
>
> the desired simplifications being
>
> First[Sort[#,
>
> LeafCount[#1]<LeafCount[#2]&
> ]]& /@ Transpose[{%, %%}]
>
> {s^2, c^2}
>
>
> Bob Hanlon
> Chantilly, VA USA
>
Thanks for the workaround Bob,
although it'd be much better if these Mathematica functions worked as
spec'ed
since my real life problem from which the above was paired down has lots of
these
assumptions.
-- Dave
Prev by Date:
**Re: Reciprocal Sums**
Next by Date:
**Re: Reciprocal Sums**
Previous by thread:
**Re: Simplify with assumptions**
Next by thread:
**Pink Parentheses**
| |