4
$\begingroup$

I have this inequality:

Reduce[(4000-1000k)/(k-4) < 0]

and the answer is

k ∈ Reals

I would expect k != 4.

$\endgroup$
2
  • $\begingroup$ Perhaps because the lim k-> 4 of this is -1000? $\endgroup$ Oct 7 '13 at 17:41
  • $\begingroup$ This does not mean it is mathematically correct. $\endgroup$
    – enzotib
    Oct 7 '13 at 18:51
5
$\begingroup$

The following is a kind of remedy for the problem at hand:

Reduce[# < 0 && Denominator[#] != 0]&[ (4000 - 1000 k)/(k - 4)]
k < 4 || k > 4

Even though the issues in the OP could be easily resolved nonetheless they are not mathematically correct and for this reason one could consider them as bugs, this is a similar problem
( 4 ∈ Complexes as well as 4 ∈ Reals but 0/0 is Indeterminate thus
TrueQ[Indeterminate ∈ Reals] yields False):

Reduce[(4000 - 1000 k)/(k - 4) ∈ Reals, k]
True

while this one is correct:

Reduce[(4000 - 1000 k)/(k - 4) ∈ Reals, k, Reals]
k < 4 || k > 4

Similar issue one can find here: Issue with NSolve.

Therefore we can conclude

Reduce[(4000 - 1000 k)/(k - 4) < 0, k]
Reduce[(4000 - 1000 k)/(k - 4) < 0, k, Reals]
Reduce[(4000 - 1000 k)/(k - 4) < 0, k, Complexes]
k ∈ Reals
True
True

yield results which appear to be incorrect in special cases, they are only generically correct. All of these above work as with a simplification technique:

Simplify[(4000 - 1000 k)/(k - 4)]
-1000

but from strictly mathematical point of view they shouldn't. Nevermind what the documentation says (genericity et consortes) this is of course a bug:

Reduce[(4000 - 1000 k)/(k - 4) < 0 && 3 < k < 5, k, Integers]
k == 4
$\endgroup$
5
  • $\begingroup$ I would not tag this as a bug as it seems to be by design. Also, I'm not sure that from a practical point of view ConditionalExpression[-1000, k != 4] would be a better (more useful/usable) return value for that Simplify. The function FunctionDomain is coming, which is a sort of practical solution to this problem. $\endgroup$
    – Szabolcs
    Mar 22 '14 at 16:06
  • $\begingroup$ @Szabolcs See the last line of the code, that is a bug. One cannot argue that's not since the domain Integers and the condition 3 < k < 5 selects only k == 4 but for such a number (4000 - 1000 k)/(k - 4) < 0 cannot be satisfied. $\endgroup$
    – Artes
    Mar 22 '14 at 21:02
  • $\begingroup$ @Szabolcs By the way, do you know when the new version of Mathematica appears? Seems like it should be in a few days. $\endgroup$
    – Artes
    Mar 22 '14 at 21:28
  • $\begingroup$ I don't know when it will appear. The new documentation has been online for quite a while. Are there any other signs that it's coming soon? I wasn't expecting it just yet. $\endgroup$
    – Szabolcs
    Mar 22 '14 at 23:06
  • $\begingroup$ @Szabolcs I mean this question Information on Mma v10. $\endgroup$
    – Artes
    Mar 22 '14 at 23:36
2
$\begingroup$

Please see this tutorial on the results given by symbolic functions. In short, the results returned by them are generically correct:

http://reference.wolfram.com/mathematica/tutorial/GenericAndNonGenericCases.html

$\endgroup$
0
$\begingroup$

In version 10, one could use this workaround:

Reduce[FunctionDomain[(4000 - 1000 k)/(k - 4), k] && (4000 - 1000 k)/(k - 4) < 0]

FunctionDomain alone returns k < 4 || k > 4 and can be used to restrict the domain of k within Reduce ...

$\endgroup$

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.