Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16640
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Strange result of solve |
| Date | 2014-03-11 07:17 +0000 |
| Message-ID | <lfmda9$n7i$1@smc.vnet.net> (permalink) |
| References | <20140310084113.E8ECC6A3B@smc.vnet.net> |
| Organization | Time-Warner Telecom |
Reduce is generally more powerful than Solve and indicates that the
expression is True, i.e., valid for all integers, x.
Reduce[5 x==0,x,Modulus->5]
True
In your second example, the result of {{}} does not mean that every x is OK
but rather that there is no solution for x.
Attributes[Solve]
{Protected}
Since Solve does NOT have either the attribute HoldFirst or HoldAll, your
second example is equivalent to
Solve[True,x,Modulus->5]
{{}}
That is, there is no solution for x since x does not appear in the
expression. You can verify this with
Solve[0 x==0,x,Modulus->5]//Trace
{{{0 x,0},0==0,True},{Modulus->5,Modulus->5},Solve[True,x,Modulus->5],{{}}}
Bob Hanlon
On Mon, Mar 10, 2014 at 4:41 AM, Wiel Aerts <wiel.aerts@xs4all.nl> wrote:
>
>
> I cannot really understand the different results of the following:
>
> Solve[ 5 x == 0, x, Modulus-> 5 ]
> result: {{x-> 0}}
>
> and:
>
> Solve[ 0 x == 0, x, Modulus-> 5 ]
> result: {{}}
>
> The last means that every x is OK. Which I think is true. But I would
> expect the same result for the first case.
>
> What am I missing?
>
> Wiel
>
> I'm using MTM v9.
>
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: Strange result of solve Bob Hanlon <hanlonr357@gmail.com> - 2014-03-11 07:17 +0000
csiph-web