Message Boards Message Boards

1
|
9842 Views
|
10 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Why the Reduce command does not completely solve the inequality?

Hi evryone, So, the input is

Reduce[(-4 x^2 + 8 x + 12)/(-x - 1) < 0, x]

and the output is

x<3.

This is not correct!, in wolframalpha:

http://www.wolframalpha.com/input/?i=%28-4x%5E2%2B8x%2B12%29%2F%28-x-1%29%3C0

show that the correct solution is

x<3 (for x != -1 )

well, this is very frustrating because I've been planning a demonstration but this false solution damages everything I'm doing. Can someone help me to correct it?

Thanks!!

POSTED BY: Camilo Ramirez
10 Replies

I just joined the community forum. I'm anxious to learn and observe here. Thanks everyone.

POSTED BY: Jake Jenson

I now see what was the intended subject header (it's perfectly informative) and that the edit only managed to add the word "the". So I'll take this as an indication that the editing tool might be falling short and will mention it at our end.

As for handling of removable singularities, there are arguments to be made either way. I only claim that the current Reduce behavior is most likely as intended rather than a blatant bug.

POSTED BY: Daniel Lichtblau

fyi;

Maple 18.01 agrees with Wolfram/Alpha on this one:

enter image description here

POSTED BY: Nasser M. Abbasi

Sorry again, using quotation marks (") in the title makes this cut: Why the "Reduce" command does not completely solve the inequality

POSTED BY: Camilo Ramirez

Hi, this solve my problem! thanks.

POSTED BY: Camilo Ramirez

(1) I think you have in mind -1, not 1.

(2) The subject header is less than useful (to the point where I very nearly skipped over the note).

(3) This is not a bug.

As for why this behavior is as designed, the denominator and numerator have a common factor of x+1, and Mathematica treats that as a removable singularity (because it is). Wolfram|Alpha takes that more pedantic approach of restricting the domain of definition to exclude singularities, whether or not removable. Both make sense, I think.

POSTED BY: Daniel Lichtblau

Hi, thanks, i didnt know what happend in the subject header. fixed

I think even that as a removable singularity, this should not be part of the solution, because it can not be replaced by x = -1 in the inequality.

POSTED BY: Camilo Ramirez

By the way, if you do not have internet you can use this brute force method:

   advReduce3[eqn_] := 
  Reduce[eqn, x] && 
   Simplify[Not[Reduce[Denominator[eqn[[1]]] == 0, x]]];

For example

advReduce3[(-4 x^2 + 8 x + 12)/(-x - 1) < 0]

gives

x < 3 && x != -1

Cheers, M.

POSTED BY: Marco Thiel

This might work for you:

And[Reduce[(-4 x^2 + 8 x + 12)/(-x - 1) < 0, x] , 
  ReleaseHold[
   WolframAlpha[
    "Domain (-4 x^2+8 x+12)/(-x-1)", {{"Result", 1}, 
     "Output"}]]] // Simplify

On the Raspberry Pi with the post Mathematica 9 release this command is more elegant and does not need to invoke WA:

And[Reduce[(-4 x^2 + 8 x + 12)/(-x - 1) < 0, x] , 
  FunctionDomain[(-4 x^2 + 8 x + 12)/(-x - 1), x]] // Simplify

because on the Raspberry we have the command FunctionDomain, which is new. I believe that Reduce does not consider the domain of the underlying function: that's not a bug, that's a feature.

This one might even be a bit nicer:

Reduce[{(-4 x^2 + 8 x + 12)/(-x - 1) < 0 && 
FunctionDomain[(-4 x^2 + 8 x + 12)/(-x - 1), x]}, x] // Simplify

If you have the Raspberry, you can of course put this together into one function:

  advReduce[eqn_] := 
 Reduce[{eqn && FunctionDomain[eqn[[1, 1]], x]}, x] // Simplify

You can call that function with the equation/inequality as an argument:

    advReduce[(-4 x^2 + 8 x + 12)/(-x - 1) < 0]
(*   x < -1 || -1 < x < 3   *)

You can also write a similar function in Mathematica 9 which then uses Wolfram Alpha:

 advReduce2[eqn_] := 
 Reduce[
    eqn && ReleaseHold[
      WolframAlpha[
       "Domain" <> (eqn[[1]] // InputForm // ToString), {{"Result", 
         1}, "Output"}]]] // Simplify

With the function call

advReduce2[(-4 x^2 + 8 x + 12)/(-x - 1) < 0]

which gives:

x < -1 || -1 < x < 3

Cheers, M.

POSTED BY: Marco Thiel

Well, if you like to debug, there is always

Trace[Reduce[(-4 x^2 + 8 x + 12)/(-x - 1) < 0, x], TraceInternal -> True]

Please send an email to support@wolfram.com, it is clearly a bug, as -1 should be excluded since 0/0 is Indeterminate

POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract