or
- \(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}\)
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 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\).
We can create a new function called step, by selecting some pairs from each of these functions.
Note: Nonnegative means positive or 0.
The step function uses different formulas depending on the domain number. If the domain number is negative, then the value of \(step\) is \(0\). If the value of the domain number is nonnegative, then the value of \(step\) is \(1\).
Graph of \(y = step(x)\).
\(\blacktriangleright \) desmos graph
The step function uses two formulas, but only one at a time.
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
or
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.
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)\).
\(-5\) and \(-3\) satisfy \(t \leq -3\), therefore we use \(\answer {2t-1}\) as their formula.
\(-2\) and \(0\) and \(3\) satisfy \(t > -3\), therefore we use \(\answer {t^2}\) as their formula.
We can have any number of pieces defining our function.
or
From the formula above, we can see that the domain of \(p\) is \((-7, 1] \cup (3, \infty )\).
This is because
On the interval \((-4, -1]\), the graph should be a line segment for \(T(v) = 2v-1\). On the interval \([1, 7)\), the graph should be another line segment for \(T(v) = -v+3\)
Graph of \(y = T(v)\).
\(\blacktriangleright \) desmos graph
The line graph for \(y = 2v - 1\) is only drawn over the domain interval \((-4, -1]\).
The line graph for \(y = -v+3\) is only drawn over the domain interval \([1, 7)\).
The function \(T\) has no minimum value. The maximum value of \(T\) is \(\answer {2}\), which occurs at \(\answer {1}\).
Define the function \(D(x)\) by the graph below of the equation \(y = D(x)\).
\(\blacktriangleright \) desmos graph
The graph of a piecewise defined function may not look like pieces.
Graph of \(y = f(x)\).
\(\blacktriangleright \) desmos graph
ooooo-=-=-=-ooOoo-=-=-=-ooooo
more examples can be found by following this link
More Examples of Piecewise-Defined Functions