Message Boards Message Boards

0
|
1110 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How do you calculate a bounding interval for a function domain?

Posted 6 months ago

POSTED BY: Werner Geiger
5 Replies

I am somewhat disappointed that Mathematica cannot do this:

Reduce[ ForAll[x, 0 < x < 1, NotElement[x, Integers]]]
Reduce[ ForAll[x, x < 0, NotElement[x, PositiveReals]]]
POSTED BY: Gianluca Gorni

The output Interval[{0},{90 \[Degree]}] is clearly a bug. Don't use "MinInterval".

It seems that the Region framework does not handle a predicate of the form NotElement[x, Integers]:

DiscretizeRegion@ImplicitRegion[ x \[NotElement] Integers, x]
BoundingRegion@%

You get a correct domain this way:

dom = FunctionDomain[{1/2 ArcSin[
      2 Tan[
        Piecewise[{{1/2, Abs[f1[x]] < 1/1000}, {x, x < 1/10}, {x, 
           x > 2/10}}, Undefined]]], 0 < x < 90 \[Degree]}, x, 
   Reals];
BoundingRegion[DiscretizeRegion@ImplicitRegion[Rest[dom], x]]

By the way, the expression f[x_] := Evaluate[something] is totally equivalent to f[x_] = something.

POSTED BY: Gianluca Gorni

Hmm:

BoundingRegion[Cuboid[{0}, {1}],
 "MinInterval"]
POSTED BY: Gianluca Gorni
Posted 6 months ago

As I said: In general the function domain is not a simple interval or one-dimensional Cuboid. But the result of some logical expression which could be arbitrarily complicated. As another example:

c = 2/10;
f1[x_] := 20 (x - 4/10)^3;
f[x_] := Evaluate[
   1/2 ArcSin[
     2 Tan[
       Piecewise[{{1/2, Abs[f1[x]] < 1/1000}, {x, x < 1/10}, {x, 
          x > 2/10}}, Undefined]]
     ]];
domF = FunctionDomain[{f[x], 0 < x < 90 °}, x, Reals]

See the following updated notebook:

POSTED BY: Werner Geiger

This gives a correct answer:

BoundingRegion[ImplicitRegion[0 < x < 90 °, {x}]]

I wonder if there is a mixup between Cuboid and Interval.

POSTED BY: Gianluca Gorni
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