Re: Why does Solve give me no solutions for this in Version 8.0.1?
- To: mathgroup at smc.vnet.net
- Subject: [mg119965] Re: Why does Solve give me no solutions for this in Version 8.0.1?
- From: Phil J Taylor <xptaylor at gmail.com>
- Date: Sat, 2 Jul 2011 05:01:16 -0400 (EDT)
Thanks for explaining exactly why this had worked in an earlier version.
Also, thanks to all for your tips and suggestions.
On Fri, Jul 1, 2011 at 6:22 AM, Adam Strzebonski <adams at wolfram.com> wrote:
> Solve gives only generic solutions, that is solutions that do not
> require parameters to satisfy equations. In version 7 and earlier
> Solve had an undocumented feature that equations which did not
> syntactically contain variables were treated as "assumptions".
> Hence, in version 7, the equation a == 0 in
>
> In[1]:= Solve[x == 0 && a == 0, x]
> Out[1]= {{x -> 0}}
>
> was treated as an assumption and the solution x -> 0 was returned,
> but the equivalent equation a + x == x in
>
> In[2]:= Solve[x == 0 && a + x == x, x]
> Out[2]= {}
>
> was not treated as an assumption and no solution was returned.
>
> In version 8 this feature was removed, so that equivalent systems
> of equations give the same solutions.
>
> In[1]:= Solve[x == 0 && a == 0, x]
> Out[1]= {}
>
> In[2]:= Solve[x == 0 && a + x == x, x]
> Out[2]= {}
>
> To obtain solutions that require equations on parameters, one can
> use the option MaxExtraConditions. With MaxExtraConditions -> n,
> Solve includes solutions that require up to n equational conditions
> on parameters.
>
> In[3]:= Solve[x == 0 && a == 0, x, MaxExtraConditions -> 1]
> Out[3]= {{x -> ConditionalExpression[0, a == 0]}}
>
> In[4]:= Solve[x == 0 && a + x == x, x, MaxExtraConditions -> 1]
> Out[4]= {{x -> ConditionalExpression[0, a == 0]}}
>
> You can remove the ConditionalExpression wrapper using Normal.
>
> In[5]:= Normal[%]
> Out[5]= {{x -> 0}}
>
> With MaxExtraConditions -> Automatic, Solve gives the solutions that
> require the minimal number of equations on parameters (top-dimensional
> part of the solution set).
>
> In[7]:= eqns = {
>
> a + b + c + d + e + f + g + h + i + j + k +
> l + m + n + o + p + q + r + s - 190 == 0,
> a + b + c - 38 == 0,
> a + d + h - 38 == 0,
> a + e + j + o + s - 38 == 0,
> b + e + i + m - 38 == 0,
> b + f + k + p - 38 == 0,
> c + f + j + n + q - 38 == 0,
> c + g + l - 38 == 0,
> d + e + f + g - 38 == 0,
> d + i + n + r - 38 == 0,
> g + k + o + r - 38 == 0,
> h + i + j + k + l - 38 == 0,
> h + m + q - 38 == 0,
> l + p + s - 38 == 0,
> m + n + o + p - 38 == 0,
> q + r + s - 38 == 0
> };
>
> In[8]:= Solve[eqns, b, MaxExtraConditions -> Automatic]//InputForm
>
> Out[8]//InputForm=
> {{b -> ConditionalExpression[j + n + o, q + r + s == 38 &&
> m + n + o + p == 38 && l + p + s == 38 && i + j + k + n + o + r == 38
> &&
> h - n - o - p - r - s == -38 && g + k + o + r == 38 &&
> f + j + k + n + o + p == 38 && e - k - n - o - p - r == -38 &&
> d - j - k - o == 0 && c - k - o - p - r - s == -38 &&
> a + j + k + n + 2*o + p + r + s == 76]}}
>
> In[9]:= Normal[Solve[eqns, #, MaxExtraConditions -> Automatic]]&/@
> {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s}//InputForm
>
> Out[9]//InputForm=
> {{{a -> 76 - j - k - n - 2*o - p - r - s}}, {{b -> j + n + o}},
> {{c -> -38 + k + o + p + r + s}}, {{d -> j + k + o}},
> {{e -> -38 + k + n + o + p + r}}, {{f -> 38 - j - k - n - o - p}},
> {{g -> 38 - k - o - r}}, {{h -> -38 + n + o + p + r + s}},
> {{i -> 38 - j - k - n - o - r}}, {{j -> 38 - i - k - n - o - r}},
> {{k -> 38 - i - j - n - o - r}}, {{l -> 38 - p - s}},
> {{m -> 38 - n - o - p}}, {{n -> 38 - m - o - p}}, {{o -> 38 - m - n - p}},
> {{p -> 38 - m - n - o}}, {{q -> 38 - r - s}}, {{r -> 38 - q - s}},
> {{s -> 38 - q - r}}}
>
>
> Best regards,
>
> Adam Strzebonski
> Wolfram Research
>
>
> -------- Original Message --------
> Subject: Why does Solve give me no solutions for this in
> Version 8.0.1?
> Date: Thu, 30 Jun 2011 20:40:24 -0400 (EDT)
> From: Phil J Taylor <xptaylor at gmail.com>
> To: mathgroup at smc.vnet.net
>
>
>
> This system of equations for the Magic Hexagon is indeterminate.
> Solve still provides useful information in Version 6.0
>
> ClearAll[a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s];
> eqns = {
> a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s
> - 190 == 0,
> a + b + c - 38 == 0,
> a + d + h - 38 == 0,
> a + e + j + o + s - 38 == 0,
> b + e + i + m - 38 == 0,
> b + f + k + p - 38 == 0,
> c + f + j + n + q - 38 == 0,
> c + g + l - 38 == 0,
> d + e + f + g - 38 == 0,
> d + i + n + r - 38 == 0,
> g + k + o + r - 38 == 0,
> h + i + j + k + l - 38 == 0,
> h + m + q - 38 == 0,
> l + p + s - 38 == 0,
> m + n + o + p - 38 == 0,
> q + r + s - 38 == 0
> };
>
> Join[
> Solve[eqns, b], Solve[eqns, d], Solve[eqns, g],
> Solve[eqns, m], Solve[eqns, p], Solve[eqns, j],
> Solve[eqns, r], Solve[eqns, e], Solve[eqns, f],
> Solve[eqns, i], Solve[eqns, k], Solve[eqns, n],
> Solve[eqns, o], Solve[eqns, a], Solve[eqns, c],
> Solve[eqns, h], Solve[eqns, l], Solve[eqns, q],
> Solve[eqns, s]]
>
> Out[1]: {{b -> j + n + o}, {d -> j + k + o}, {g -> i + j + n},
> {m -> f + j + k}, {p -> e + i + j}, {j -> -38 + d + g + r},
> {r -> -38 + h + l + m + p}, {e -> -38 + h + k + q + r},
> {f -> -38 + i + l + r + s}, {i -> -38 + f + p + q + s},
> {k -> -38 + e + m + q + s}, {n -> -38 + g + h + k + l},
> {o -> -38 + d + h + i + l}, {a -> -38 + i + m + n + q + r},
> {c -> -38 + k + o + p + r + s}, {h -> -38 + n + o + p + r + s},
> {l -> -38 + m + n + o + q + r}, {q -> -38 + g + k + l + o + p},
> {s -> -38 + d + h + i + m + n}}
>
> Version 8.0.1 returns {}.
>
>