5
$\begingroup$

The post What is the difference between Reduce and Solve? discusses the difference between Reduce and Solve. Now, with the system of equations

$$\begin{cases} a^2 + 6b - 7=0,\\ a - \dfrac{1}{b}=0. \end{cases}$$

where $a$, $b$ are real numbers. I tried

Solve[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, Reals]
{{a -> -3, b -> -(1/3)}, {a -> 1, b -> 1}, {a -> 2, b -> 1/2}}

But when I tried

Reduce[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, Reals]

I could not get all the solutions. I only got

(a == -3 || a == 1 || a == 2) && b == 1/6 (7 - a^2)

How can I get all the solutions with Reduce?

$\endgroup$
3
$\begingroup$

If the output is as shown you can use ToRules:

Reduce[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, Reals];

{ToRules[%]}
{{a -> -3, b -> 1/6 (7 - a^2)},
 {a -> 1, b -> 1/6 (7 - a^2)},
 {a -> 2, b -> 1/6 (7 - a^2)}}

If you are attempting to find many solutions you may need to increase the System Option "DiscreteSolutionBound":

SetSystemOptions[{"ReduceOptions" -> "DiscreteSolutionBound" -> 100}]

Mathematica enumerates the solutions explicitly only if the number of integer solutions of the system does not exceed the maximum of the p^th power of the value of the system option DiscreteSolutionBound, where p is the dimension of the solution lattice of the equations, and the second element of the value of the system option ExhaustiveSearchMaxPoints.

| improve this answer | |
$\endgroup$
4
$\begingroup$

I'm on 10.0 for Mac OS X x86 (64-bit) (December 4, 2014), just use Backsubstitution -> True while using Reduce,

Solve[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, Reals]

$\left\{\left\{a\to -3,b\to -\frac{1}{3}\right\},\{a\to 1,b\to 1\},\left\{a\to 2,b\to \frac{1}{2}\right\}\right\}$

Reduce[{a^2 + 6 b - 7 == 0 && a - 1/b == 0}, {a, b}, 
Backsubstitution -> True]

$\left(a=-3\land b=-\frac{1}{3}\right)\lor (a=1\land b=1)\lor \left(a=2\land b=\frac{1}{2}\right)$

You can finde the Options Reduce and Solve with:

Options /@ {Reduce, Solve} // Column

{Backsubstitution -> False, Cubics -> False, GeneratedParameters -> C, Method -> Automatic, Modulus -> 0, Quartics -> False, WorkingPrecision -> ∞}

{Cubics -> True, GeneratedParameters -> C, InverseFunctions -> Automatic, MaxExtraConditions -> 0, Method -> Automatic, Modulus -> 0, Quartics -> True, VerifySolutions -> Automatic, WorkingPrecision -> ∞}

| improve this answer | |
$\endgroup$
  • $\begingroup$ you mean Options /@ {Reduce, Resolve} // Column?? $\endgroup$ – yode Feb 1 '16 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.