       Re: Solving equations and inequalities with Reduce - how?

• To: mathgroup at smc.vnet.net
• Subject: [mg87692] Re: Solving equations and inequalities with Reduce - how?
• From: dh <dh at metrohm.ch>
• Date: Tue, 15 Apr 2008 06:50:32 -0400 (EDT)
• References: <fu1tuf\$ogc\$1@smc.vnet.net>

```
Hi Marc,

your syntax is correct. But you met a common pit fall. On of your

variables already had a value (of 1) and therefore got replaced by this

value before Reduce got it. You may clear a value by e.g. a=. or Clear[a].

hope this helps, Daniel

Marc Heusser wrote:

> I tried to solve equations with Reduce and somehow did not quite

> formulate it right, so Reduce complains with

> "Reduce::ivar: 1 is not a valid variable".

>

> This is what I tried:

>

> Wanted: A six digit number satisfying the following conditions:

> The first digit is not zero.

> If you take the first two digits and move them to the end of the number,

> the resulting number must be twice the original number.

>

> In:=Reduce[200000a +20000 b +2000 c+200 d+20 e  +       2 f

> \[Equal]100000c +10000 d +1000 e+100 f+10 a  + b ,  {a,b,c,d,e,f},

> Modulus\[Rule]9]

>

> I did solve the problem through exhaustive search:

>

> In:=Timing[Select[Range[10^6],    FractionalPart[#/10000] 1000000 +

> IntegerPart[#/10000]\[Equal] 2  #&]]

> Out={34.2848 Second,{142857,285714,428571}}

>

> but would like to understand how to use Reduce (or another function) to

> solve such a set of equations.

>

> TIA

>

> Marc

>

```

• Prev by Date: Generalised ImagePadding->All
• Next by Date: Re: Package to 'graft' Lists onto Matrices
• Previous by thread: Re: Solving equations and inequalities with Reduce - how?
• Next by thread: Re: Solving equations and inequalities with Reduce - how?