0
$\begingroup$

I'm hoping that this isn't an obvious question, but I was curious about possible notations for what interval a piecewise function is defined on. For example, consider the following function (where $x \in \mathbb{R}$):

$$\begin{cases} x & 0 \leq x \leq 5 \\ x^2 & 5 < x < 10 \\ x^3 & 10 < x \le 20 \\ 0 & x < 0 \lor x > 20 \end{cases}$$

The output is on the intervals $[0, 5]$ (when $0 \leq x \leq 5$), $(25, 100)$ (when $5 < x < 10$), and $(1000, 8000]$ when $10 < x \le 20$. Is there a "better" way of notating just the interval of the output? For example, would writing something like $[[0, 5], (25, 100), (1000, 8000]]$ have any particular meaning? For the record, yes, I do realize that this proposed notation actually has somewhat less information than the original sentence because I'm not specifying when each interval will actually "occur," but suppose that I don't care about specifying that for what I'm communicating.

The original context for this was a Stack Overflow post asking how to extend a set of numbers in the range of [0, 1] to a set in the range [-1, 1] (where $[0, 0.5) \to [-1, 0]$ and $[0.5, 1] \to [0, 1]$. One proposed answer was

$$\begin{cases} x - 1 & 0 \leq x < 0.5 \\ x & 0.5 \le x \le 1 \end{cases}$$

Clearly, this is actually on the range of $(-0.5, 0]$ (if ($0 \le x < 0.5$) or $[0.5, 1]$ (if $0.5 \le x \le 1$).

What is the most concise notation for stating what the actual interval of this proposed function is?

$\endgroup$
1
$\begingroup$

In your example $[[0, 5], (25, 100), (1000, 8000]]$, one way of writing this is $$[0,5]\cup(25,100)\cup(1000,8000].$$

$\cup$ means union (of sets).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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