pieces and parts

The world of functions is weird and wonderful. Functions do unexpected things and have mindboggling features.

We would like to encounter and examine these bizarre situations and figure out how to talk about them.

Unfortunately, the Elementary Functions have none of these interesting characteristics. The Elementary Functions are quite well-behaved and boring.

To see what functions can really do, we will need to build weird functions for ourselves. Our favorite way to build weird functions is by taking parts of various elementary functions and stitching them together into “Frankenstein”-type functions.

These are called Piecewise Defined functions.

Piecewise-Defined Functions

Piecewise defined functions are defined by using pieces of other functions.

Of course, we have to make sure that we do not duplicate domain numbers, otherwise we will not have a function. This new collection of pairs will automatically give us a domain by collecting all of the first coordinates.

For example, we could start with two constant functions: \(Zero\) and \(One\).

  • \(Zero(r) = 0\) with \((-\infty , \infty )\) as its domain.
  • \(One(r) = 1\) with \((-\infty , \infty )\) as its domain.

We can create a new function called step, by selecting some pairs from each of these functions.

  • From \(Zero\) we’ll take pairs with negative domain values. This is one piece.
  • From \(One\) we’ll take pairs with nonnegative domain values. This is another piece.

Note: Nonnegative means positive or 0.

The step function uses two formulas, but only one at a time.

  • \(step(x) = 0\), if \(x < 0\)
  • \(step(x) = 1\), if \(x \geq 0\)

Either you use the formula \(0\) or your use the formula \(1\). The domain number at which you are evaluating \(step\) tells you which formula to use.

The traditional way to write this formula looks like

\[ step(x) = \begin{cases} 0 & \text { if } x < 0 \\ 1 & \text { if } 0 \leq x \end{cases} \]

or

\[ step(x) = \begin{cases} 0 & (-\infty , 0) \\ 1 & [0, \infty ) \end{cases} \]

Piecewise Formulas

The formulas for piecewise defined functions are written in pieces packaged together with a big left curly brace. There is a row for each piece of the function. Each row has a formula and a set from the domain where that formula is used for the function.

\[ function(x) = \begin{cases} formula1(x) & set1 \\ formula2(x) & set2 \\ formula3(x) & set3 \\ formula4(x) & set4 \end{cases} \]

The formulas for piecewise defined functions are listed in the left column and the domain conditions are listed in the right column. When evaluating a piecewise defined function, you don’t look for the formula first. First, you decide which domain condition in the right column your domain number satisfies. Then you choose the corresponding formula and evaluate with your domain number.

To evaluate \(function(x_0)\), you first identify the domain set that contains \(x_0\). The formula on that row is the formula to use.

If we discovered that \(x_0 \in set3\), then \(function(x_0) = formula3(x_0)\).

We can have any number of pieces defining our function.

\[ p(k) = \begin{cases} k^2 + 1 & \text { if } -7 < k \leq -4 \\ -4k + 3 & \text { if } -4 < k \leq 1 \\ 1 - 3k & \text { if } k > 3 \end{cases} \]

or

\[ p(k) = \begin{cases} k^2 + 1 & (-7, -4] \\ -4k + 3 & (-4, 1] \\ 1 - 3k & (3, \infty ] \end{cases} \]
  • \(p(-6) = \answer {37}\)
  • \(p(-2) = \answer {11}\)
  • \(p(-1) = \answer {7}\)
  • \(p(0) = \answer {3}\)
  • \(p(1) = \answer {-1}\)
  • \(p(2) = \answer {DNE}\)
  • \(p(3) = \answer {DNE}\)
  • \(p(4) = \answer {-11}\)

From the formula above, we can see that the domain of \(p\) is \((-7, 1] \cup (3, \infty )\).

This is because

\[ (-7, -4] \cup (-4, 1] \cup (3, \infty ) = (-7, 1] \cup (3, \infty ) \]

ooooo-=-=-=-ooOoo-=-=-=-ooooo
more examples can be found by following this link
More Examples of Piecewise-Defined Functions

2026-06-13 18:09:41