1

I wish to write a piecewise function with several cases, where it has a certain definition for one set of specified $x$ values, another definition for another set of $x$ values, etc, then one final definition for all remaining values of $x$. It loosely looks like this:

$y = \begin{cases} f(x) & \quad \text{if}\ x = n_1, n_2, n_3, ... \\ g(x) & \quad \text{if}\ x = m_1, m_2, m_3, ... \\ h(x) & \quad \text{for all other values of}\ x \end{cases}$

My question is: is there a better way to write "for all other values of $x$" in this context?

Ulysses
  • 133
  • 6

1 Answers1

4

Use the word otherwise,$$y = \begin{cases} f(x) & \quad \text{if}\ x = n_1, n_2, n_3, ... \\ g(x) & \quad \text{if}\ x = m_1, m_2, m_3, ... \\ h(x) & \quad \text{otherwise} \end{cases}$$

  • 1
    Note that doing it this way, it looks strange (at least to me) if "otherwise" doesn't cover "most" of the cases (or at least a amount comparable to the other cases, like "if $x>0$" and "otherwise"). For instance, $$f(x) = \cases{x^2 \sin(1/x)&if $x\neq 0$\0&otherwise}$$feels wrong, somehow. I would use "if $x = 0$" instead, or swap the two cases, having the "if $x = 0$" case on top and "otehrwise" on the bottom (which also looks strange, for some reason). – Arthur Aug 08 '18 at 08:42
  • It is OK, relax, sometimes correctness has its own beauty. – Mohammad Riazi-Kermani Aug 08 '18 at 08:56
  • @Arthur This is only true if there is a general formula or short list of values for $x$ in the 'other' case. If $x$ can be expressed in such a manner I would consider that preferable notation regardless of set sizes. However I'm interested in the specific case where such notation isn't possible, and I have to instead resort to something synonymous with 'other'. – Ulysses Aug 08 '18 at 10:08