Message Boards Message Boards

1
|
8729 Views
|
14 Replies
|
4 Total Likes
View groups...
Share
Share this post:

A problem in FunctionDomain?

Posted 3 years ago
FunctionDomain[(x - 5)/Sqrt[x - 5], x] 

gives an answer of x >= 5, I think it should be x > 5 instead. Is it a bug?

Thanks.

POSTED BY: Daqing Li
14 Replies

I would be careful with the term "bug". I think the result is correct because the limit exists:

Limit[(x - 5)/Sqrt[x - 5], x -> 5]
(* Out:  0   *)
POSTED BY: Henrik Schachner

It is a very old issue. Try these:

Solve[x^2/x == 0]
Numerator[4/2]
Denominator[6/3]

As functions, x^2/x and x are not the same, but within the algebraic structure of rational functions they are indistinguishable. A "bug" can happen in the frontier cases where Algebra and Analysis disagree. Wolfram perhaps could do more to prevent these embarrassements.

POSTED BY: Gianluca Gorni
Posted 3 years ago

Going back to Daqings first example

FunctionDomain[(x - 5)/Sqrt[x - 5], x]
(* x >= 5 *)

So 5 is in the domain. But trying it out and actually giving 5 as argument throws errors and returns Indeterminate:

Function[(# - 5)/Sqrt[# - 5]][5]
(* Errors division by zero, complex infinity *)
(* Indeterminate *)

If not a "bug" it is at least a contradiction.

POSTED BY: Hans Milton

Daqing Li, consider

FullSimplify[(x - 5)/Sqrt[x - 5]]

(*Sqrt[-5 + x]*)
POSTED BY: Marvin Ray Burns

The problem is that Mathematica automatically simplifies the fraction

In[6]:= (x - 5)/Sqrt[x - 5]

Out[6]= Sqrt[-5 + x]

before the FunctionDomain does it job. You can bypass this pitfall by giving an equivalent expression that does not trigger the simplification:

FunctionDomain[((x - 5)^2 + Expand[x - 5 - (x - 5)^2])/Sqrt[x - 5], x]
POSTED BY: Gianluca Gorni

Even simpler:

FunctionDomain[(2 x - 10)/Sqrt[x - 5], x]
POSTED BY: Gianluca Gorni
Posted 3 years ago

I am convinced that it is a bug as demonstrated from above replies and I tried again:

Screen Copy

POSTED BY: Daqing Li
Posted 3 years ago

Or it is more clear as shown here: Screen capture

POSTED BY: Daqing Li
Posted 3 years ago

The two functions should be mathematical equivalent, but the FunctionDomain gives two different domain answer.

POSTED BY: Daqing Li

From the point of view of analysis, x^2/x has a removable singularity.

POSTED BY: Daniel Lichtblau

What it shows is that the found domain can be more restrictive than necessary. I don't know that I would call that a bug really. More of a limitation.

POSTED BY: Daniel Lichtblau
Posted 3 years ago

How about the example I posted later? Two equivalent functions just in different input form but the FunctionDomain[] shows two different answers?

POSTED BY: Daqing Li

A removable singularity should not count for the domain. I understand that the domain of f(x) is the set of x for which the calculations indicated in the formula for f(x) lead to a numerical value, say real or complex. The domain of x^2/x does not include 0.

In my view, FunctionDomain lets the system make some algebraic simplifications that do not always preserve the domain. From the point of view of algebra, p(x)/q(x)=a(x)/b(x) if p(x)b(x)=a(x)q(x), where a,b,p,q are polynomials. In this sense x^2/x=x/1=x. But q and b can have different zero sets, and p/q and a/b can have different domains. For abstract algebra, a rational function is not really a point function.

POSTED BY: Gianluca Gorni

At some point we are disputing philosophy as to what e.g. x^2/x should mean. But to your (correct) point about general p/q, neighborhoods matter. If these are multivariate, then one has to look further than just the point in question, e.g. (0,0) is not a removable singularity for x/y even though both vanish there.

POSTED BY: Daniel Lichtblau
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