# A problem in FunctionDomain?

Posted 11 days ago
320 Views
|
14 Replies
|
3 Total Likes
|
 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. Answer
14 Replies
Sort By:
Posted 11 days ago
 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 *) Answer
Posted 10 days ago
 Daqing Li, consider FullSimplify[(x - 5)/Sqrt[x - 5]] (*Sqrt[-5 + x]*) Answer
Posted 10 days ago
 The problem is that Mathematica automatically simplifies the fraction In:= (x - 5)/Sqrt[x - 5] Out= 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] Answer
Posted 10 days ago
 Even simpler: FunctionDomain[(2 x - 10)/Sqrt[x - 5], x] Answer
Posted 10 days ago
 I am convinced that it is a bug as demonstrated from above replies and I tried again:  Answer
Posted 9 days ago
 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. Answer
Posted 9 days ago
 How about the example I posted later? Two equivalent functions just in different input form but the FunctionDomain[] shows two different answers? Answer
Posted 10 days ago
 Or it is more clear as shown here:  Answer
Posted 10 days ago
 The two functions should be mathematical equivalent, but the FunctionDomain gives two different domain answer. Answer
Posted 9 days ago
 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. Answer
Posted 9 days ago
 From the point of view of analysis, x^2/x has a removable singularity. Answer
Posted 8 days ago
 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. Answer
Posted 8 days ago
 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. Answer
Posted 8 days 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]] (* Errors division by zero, complex infinity *) (* Indeterminate *) If not a "bug" it is at least a contradiction. Answer