Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Reduce in Ver 6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85491] Re: Reduce in Ver 6
  • From: "Steve Luttrell" <steve at _removemefirst_luttrell.org.uk>
  • Date: Mon, 11 Feb 2008 07:14:03 -0500 (EST)
  • References: <fopb8t$bkk$1@smc.vnet.net>

If you use the rules repeatedly then the correct value of c is replaced.

So checking the solutions by back substitution using equ/.r leaves gives an 
expression that still depends on a and b (from the rules expressing c in 
terms of a and b), but equ//.r (note //. NOT /.) gives the required result:

{{True,True,True,True},{True,True,True,True},{True,True,True,True},{True,True,True,True},{True,True,True,True},{True,True,True,True}}

Stephen Luttrell
West Malvern, UK

"Dana DeLouis" <dana.del at gmail.com> wrote in message 
news:fopb8t$bkk$1 at smc.vnet.net...
> Hi.  I was wondering if anyone knows of a more efficient way to do this.
> This issue came up in ver 6.0 with these equations:
>
> equ = {
> a + b + c == 3,
> a^2 + b^2 + c^2 < 10,
> a^3 + b^3 + c^3 == 15,
> a^4 + b^4 + c^4 == 35
> }
>
> I use Reduce, but 'c is returned as a function of a & b.
> What I would like is for c to replace a & b with the appropriate values.
>
> r = {ToRules[Reduce[equ, {a, b, c}]]}
>
> {{a -> 1, b -> 1 - Sqrt[2], c -> 3 - a - b},
> {a -> 1, b -> 1 + Sqrt[2], c -> 3 - a - b},
> {a -> 1 - Sqrt[2], b -> 1, c -> 3 - a - b},
> {a -> 1 - Sqrt[2], b -> 1 + Sqrt[2], c -> 3 - a - b},
> {a -> 1 + Sqrt[2], b -> 1, c -> 3 - a - b},
> {a -> 1 + Sqrt[2], b -> 1 - Sqrt[2], c -> 3 - a - b}}
>
> My workaround is rather tough, especially if this was much larger.
>
> convert = {a -> aa_, b -> bb_, c -> cc_} ->
>          {a -> aa, b -> bb, c -> 3 - aa - bb};
>
> new = r /. convert
>
> {{a -> 1, b -> 1 - Sqrt[2], c -> 1 + Sqrt[2]},
> {a -> 1, b -> 1 + Sqrt[2], c -> 1 - Sqrt[2]},
> {a -> 1 - Sqrt[2], b -> 1, c -> 1 + Sqrt[2]},
>
> Etc..
>
> Any help is much appreciated.  I hope I'm not overlooking something 
> obvious.
>
> Dana
> ddelouis at gmail.com
>
>
>
> 



  • Prev by Date: Re: Reduce in Ver 6
  • Next by Date: Re: How should I start with mathematica?
  • Previous by thread: Re: Reduce in Ver 6
  • Next by thread: Re: Reduce in Ver 6