Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want to find the integer values $k$ so that D[f[x], x] has integer solutions. I tried

f[x_] := 2 x^3 - 3 (m - 1) x^2 + k * (m + 2)*(m - 3) x + 1
g := D[f[x], x]
d = Discriminant[g, x]
Reduce[{d == 0, -10 <= k <= 10}, {k, m}, Integers]

I got

(m == -3 && k == 4) || (m == 1 && k == 0) || (m == 7 && k == 3/2)

As you can see in the last solution k=3/2 which is definitely not an integer, as I have specified in the domain used by Reduce.

Is this a bug? Can anyone comment on this?

share|improve this question
    
You appear to have two negative signs in your definition of f[x]. In any case, I tried both $(m-1)$ and $(m+1)$, copied directly from your code, and I did NOT get your results. What version are you using? I am using 9.0.1. Oh, and what was your value of the discriminant? I got $d = 6912000 (-1 + m)^3 (-6 k - k m + k m^2)^3$ for $(m-1)$. –  heropup Jan 7 at 8:48
    
I am not using 9.0.1 –  minthao_2011 Jan 7 at 10:04
    
I need more information. What is the correct form for f[x]? Which version of Mathematica are you running? What is the value of $d$ that you obtained from your code? If you want help, you need to tell us more. –  heropup Jan 7 at 10:09
1  
@rasher I think this is only formulated badly in the documentation. The line directly above in the details section states Reduce[expr,vars,dom] restricts all variables and parameters to belong to the domain dom. which clearly is what I would expect Reduce to do, when I specify the domain. –  halirutan Jan 7 at 12:51
1  
If you apply Reduce[output, {m, k}, Integers] to the OP's output, the extraneous solution goes away. –  Michael E2 Jan 7 at 14:09
show 6 more comments

2 Answers

up vote 7 down vote accepted

This has been confirmed as a bug.

The following also gives non-integer solutions which is clearly incorrect.

Reduce[d == 0 && -10 <= k <= 10 && k \[Element] Integers && m \[Element] Integers, {k, m}]
share|improve this answer
    
This is so that the question gets off the unanswered list and Community stops bumping it up. –  Szabolcs Feb 7 at 18:55
add comment

not an answer but may aid the discussion, the problem arises with the more simple form:

p = RandomInteger[100];
q = RandomInteger[{2, 100}];
Reduce[{k == p/q ( m^2 - 2 m + 1)/(m^2 - m - 6) , m > 4 }, {k, m},   Integers]   

Produces the anomolous result m==7,k==p/q for "many" values of p,q.

Anyone arguing that k is somehow not supposed to be restricted needs to explain why there is just the one odd result, where obviously there is a rational k for any integer m (except 3,-2 of course)..

share|improve this answer
1  
No need for any dispute, it's been recognized as a bug. –  Daniel Lichtblau Jan 8 at 18:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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