We have many famous functions, which are piecewise defined function. We have already seen the step function. It acts as a mathematical on/off switch.
Perhaps more famous are the absolute value function and greatest integer function.
The Absolute Value function is made from pieces of two linear functions: \(L_1(x) = x\) and \(L_2(x) = -x\).
- From \(L_1\) we’ll take pairs with nonnegative domain values.
- From \(L_2\) we’ll take pairs with negative domain values.
The traditional way of notating the absolute value function is with little vertical bars.
or
Graph of \(y = |x|\).
The formula for absolute value is not very complicated. However, absolute value involves different formulas used in different situations. Our algebra doesn’t like this. The first step when working algebraically with absolute value signs is getting rid of the absolute value’s vertical bars. They don’t work well with our algebra. For instance, they do not always distribute over addition of subtraction.
Sometimes this works, but not as a general rule.
When working algebraically, the first step is to convert the absolute value signs into a piecewise defined function. Then we can identify the formula we need in our algebraic expression. We can see from the formula’s domain column that the formulas switch at \(0\). Working algebraically with absolute value means first identifying zeros.
Rewrite \(G(t) = | 3t - 5 |\) as a piecewise defined function that doesn’t include absolute value bars.
\(3t-5=0\) when \(t=\frac {5}{3}\).
- \(3t - 5 < 0\) when \(t<\tfrac {5}{3}\), which means \(G(t) = -(3t - 5)\) when \(t<\tfrac {5}{3}\).
- \(3t - 5 > 0\) when \(t>\tfrac {5}{3}\), which means \(G(t) = 3t - 5\) when \(t>\tfrac {5}{3}\).
Solve \(| 3t - 5 | = 7\)
We have two scenarios here.
The first situation is when \(t < \frac {5}{3}\). The equation then looks like \(-(3t - 5) = 7\).
\begin{align*} -(3t - 5) & = 7 \\ 3t - 5 & = -7 \\ 3t & = -2 \\ t & = \frac {-2}{3} = -\frac {2}{3} \end{align*}
The second situation is when \(t > \frac {5}{3}\). The equation then looks like \(3t - 5 = 7\).
\begin{align*} 3t - 5 & = 7 \\ 3t & = 12 \\ t & = 4 \end{align*}
The solution set is \(\{ -\frac {2}{3}, 4 \}\).
Also known as the floor function, the Greatest Integer function (GIF) pairs a domain number with the greatest integer less than or equal to the domain number.
If you think of a horizontal number line, then you start at the domain number and move down (or left) until you arrive at an integer. If your domain number is already an integer, then you don’t need to go anywhere.
Like the absolute value function, the greatest integer function has its own symbol: \(GIF(x) = \lfloor x \rfloor \). The little feet on the vertical bars remind us to go down.
- \(GIF(4.5) = \answer {4}\)
- \(\lfloor 2 \rfloor = 2\)
- \(GIF(0.5) = 0\)
- \(GIF(0) = 0\)
- \(\lfloor -4.5 \rfloor = \answer {-5}\)
- \(GIF(-7) = -7\)
Let \(N\) be any integer. On the interval \([N, N+1)\), we have \(GIF(x) = N\), a constant function.
GIF is made from an infinite number of pieces of constant functions.
The graph of \(y = \lfloor x\rfloor \) is seen below, except the steps keep going up to the right and down to the left. The extra 3 dots are a graphical symbol telling us that the pattern continues.
Notice that we have many domain numbers with the same function value. That is ok. To be a function, we just need that each domain number only has one function value. The GIF passes this test.
Notice that both the absolute value function and the greatest integer function pass the so-called vertical line test.
The curve with points whose coordinates satisfy \(y=f(x)\) represents \(y\) as a function of \(x\) on a set \(S\) if and only if the vertical line \(x=a\) intersects the curve \(y=f(x)\) at exactly one point for every \(a \in S\). This is called the vertical line test.
ooooo-=-=-=-ooOoo-=-=-=-ooooo
more examples can be found by following this link
More Examples of Piecewise-Defined Functions