Re: Solve...or not
- To: mathgroup at smc.vnet.net
- Subject: [mg128552] Re: Solve...or not
- From: "djmpark" <djmpark at comcast.net>
- Date: Fri, 2 Nov 2012 00:47:06 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <2879485.82468.1351754544475.JavaMail.root@m06>
Tony,
You could use:
Solve[{(y - 2)/(x - 1) == 1, y == 0}, {x, y}]
{{x -> -1, y -> 0}}
Or with a warning and probably deprecated:
Solve[{(y - 2)/(x - 1) == 1, y == 0}, x, y]
{{x -> -1}}
Or without a warning, probably because Mathematica now knows for certain
that y is not a domain but perhaps still deprecated:
Solve[{(y - 2)/(x - 1) == 1, y == 0}, x, y, Reals]
{{x -> -1}}
Or:
Solve[(y - 2)/(x - 1) == 1 /. y -> 0, x]
{{x -> -1}}
Or more formally:
Solve[Exists[y, y == 0, (y - 2)/(x - 1) == 1], x]
{{x -> -1}}
Or:
Solve[Exists[y, And @@ {(y - 2)/(x - 1) == 1, y == 0}], x]
{{x -> -1}}
Or quixotically:
Solve[ForAll[y, y == 0, (y - 2)/(x - 1) == 1], x]
{{x -> -1}}
Or maybe:
Eliminate[{(y - 2)/(x - 1) == 1, y == 0}, y]
x == -1
The new behavior of Solve in Version 8 at first seems like a pain in the
neck (also when it returns ConditionalExpressions with a Reals domain say)
but actually I think it is quite useful and much better than the old
behavior. One of the changes is that you can't simply (without a warning)
include a second list specifying variables to eliminate. Either use
Eliminate first or use Exists or ForAll to eliminate the variables, or
explicitly specify the domain.
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/index.html
From: Harker, Anthony [mailto:a.harker at ucl.ac.uk]
I've seen some discussion of Version 8's Solve[] in this group, but have I
missed something explaining this?
I have the following behaviour (both under Windows 7)
Mathematica 8.0.1.0
Solve[{(y-2)/(x-1)==1,y==0},x]
{}
Mathematica 7.0.1.0
Solve[{(y-2)/(x-1)==1,y==0},x]
{{x->-1}}
Tony
Tony Harker
Department of Physics and Astronomy
University College London
Gower Street
London
WC1E 6BT
Tel: (within UK) 020 7679 3404
(overseas ) +44 20 7679 3404
E: a.harker at ucl.ac.uk
[...] clay possesses one considerable advantage: it is resistant to fire,
water, and magnetic disturbances. In [...] a few thousand years, our
photographs, books and hard disks will no doubt have disappeared, but our
collections of cuneiform tablets will still be there.
Dominique Charpin, Reading and Writing in Babylon (2010) translated by
Jane Marie Todd.