Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Strange result of solve
Replies: 2   Last Post: Mar 11, 2014 3:35 AM

 Messages: [ Previous | Next ]
 Bob Hanlon Posts: 906 Registered: 10/29/11
Re: Strange result of solve
Posted: Mar 11, 2014 3:17 AM

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.
>
>
>

Date Subject Author
3/11/14 Bob Hanlon
3/11/14 Matthias Bode