Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16640

Re: Strange result of solve

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newspeer1.nac.net!newspump.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Strange result of solve
Date Tue, 11 Mar 2014 07:17:29 +0000 (UTC)
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <lfmda9$n7i$1@smc.vnet.net> (permalink)
References <20140310084113.E8ECC6A3B@smc.vnet.net>
Lines 61
Organization Time-Warner Telecom
NNTP-Posting-Date 11 Mar 2014 07:23:10 GMT
NNTP-Posting-Host 3aa84a63.news.twtelecom.net
X-Trace DXC=\T30EG<Q=GXG[n\L2_@9VQC_A=>8kQj6];[h;PUXBgbT27hNd_eWRHTEFiONJ7[GoVOn?WJ5<VISR
X-Complaints-To abuse@twtelecom.net
Xref csiph.com comp.soft-sys.math.mathematica:16640

Show key headers only | View raw


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


Thread

Re: Strange result of solve Bob Hanlon <hanlonr357@gmail.com> - 2014-03-11 07:17 +0000

csiph-web