Precalculus Study Guide
Copyright Maplesoft, a division of Waterloo Maple Inc., 2024
Chapter 10: Piecewise-Defined Functions
|
Introduction
|
|
A piecewise-defined function is an amalgam of two or more rules, each operative on its own domain. In general, these domains are contiguous, but that is not an essential element of the definition.
Some piecewise functions have special names that are used the way the name of the sine or exponential functions might be used. Two, in particular, are and , the first being the absolute-value function, and the second, the greatest-integer function. These are met in the next two sections below. The general manipulation of piecewise-defined functions is thus the object of this chapter.
|
Chapter Glossary
|
|
The following terms in Chapter 10 are linked to the Maple Math Dictionary.
absolute value
additive inverse
denominator
domain
exponential
extension
|
greatest integer function
inequality
interval
negative
nonnegative
numerator
|
positive
real line
real number
sine
singularity
subset
|
|
|
|
|
|
The Piecewise-Defined Function
|
|
As was seen in Chapter 1, the absolute value function, written as
is always a nonnegative quantity. For example, the absolute value of is the positive number 3.
Viewing the change from to 3 as "dropping the minus sign" obscures the abstract definition of this function.
It's much better to see the transition of to 3 as attained by multiplying the negative number by to form +3, the additive inverse of . Hence, the action of the absolute value function should be seen as
= 3
that is, don't drop a minus sign, but make the negative number positive by introducing a second minus sign. This is worth repeating.
Make a negative number positive by negating the negative number
If this is completely understood, then the abstract definition of the absolute value function, namely,
is easier to understand. If is already know to be a negative number, it is made positive by putting a minus sign in front of it. If is zero, its absolute value remains zero. If is positive, then its absolute value is itself, so remains unchanged.
The abstract definition of the absolute value function just given is an example of a piecewise-defined function. In general, a piecewise-defined function has more than one rule, and each rule is applied for a specific set of values in the domain of the function.
A Maple implementation of the absolute-value function as a piecewise-defined function is given in Table 10.0.1.
|
Table 10.0.1 Maple's implementation of as a piecewise function
|
|
|
Notice how the value at is included in the case of positive .
Table 10.0.2 shows the Maple piecewise command used to reproduce the absolute-value function.
|
Table 10.0.2 The absolute-value function via Maple's piecewise command
|
|
|
Note the use of "otherwise" to represent the complement of the case . Hence, it represents the case .
|
|
The Greatest-Integer Function
|
|
If is a real number, the symbol typically denotes the greatest integer that is less than or equal to . This defines the greatest-integer function
= the greatest integer that satisfies the condition
In effect, this is a piecewise-defined function with an infinite number of rules. A piecewise representation of the greatest-integer function would look something like the following.
Those who think visually and geometrically would see as itself whenever is an integer, and as the integer on the number line that is just to the left of whenever is not an integer.
Maple's floor
function is an implementation of the greatest-integer function. Some specific values are listed in Table 10.0.3.
|
Table 10.0.3 Some values of as given by Maple's floor command
|
|
|
A portion of the graph of is shown in Figure 10.0.1.
|
Figure 10.0.1 Portion of the graph of
|
|
|
|
|
Typical Problems
|
|
10.1. Graph the function on the interval , and obtain the value .
10.2. Compare the functions , and .
10.3. Graph on the interval .
10.4. Graph on the interval .
10.5. Represent as a piecewise-defined function, and obtain its graph on the interval .
10.6. Represent as a piecewise-defined function, and obtain its graph on the interval .
|
|
Maple Initializations
|
|
Before accessing the Maple version of the solutions to the typical problems stated above, initialize Maple by pressing the button provided on the right.
|
|
|
|
|
|
Solutions
|
|
|
Problem 10.1
|
|
|
10.1 - Mathematical Solution
|
|
The graph of the function
on the interval appears in Figure 10.1.1.
At , the value of is .
|
|
Figure 10.1.1 Graph of piecewise-defined
|
|
|
|
|
|
|
|
10.1 - Maplet Solution
|
|
A graph of the function
on the interval , and the value , can be found with the
Piecewise Function Tutor
.
Clicking this link will launch the tutor with the solution embedded as shown in the thumbnail image in Figure 10.1.2.
A piecewise function with up to four different rules can be entered rule-by-rule as a function of type Format 2.
|
|
Figure 10.1.2 Thumbnail image of the Piecewise Function Tutor
|
|
|
|
The Graph Format 2 button is used to generate the required graph. The Plot Options button should be used to limit the domain to the given interval .
The value is found by entering in the Evaluation section, and clicking the button labeled Evaluate Format 2.
To launch the Piecewise Function Tutor, click the following link:
Piecewise Function Tutor
|
|
|
|
|
10.1 - Interactive Solution
|
|
Enter the piecewise function
|
A piecewise function can be created interactively by means of , the piecewise template in the Expression palette. Move through the fields of the template using the Tab key.
Use Control + Shift + r to generate additional rows.
|
•
|
Complete the equation with the piecewise function.
|
•
|
Context Panel: Assign Function
|
|
|
Graph
|
•
|
Type and press the Enter key.
|
•
|
Context Panel: Plots≻Plot Builder
Options: Find Discontinuities
|
|
|
Obtain
|
•
|
Context Panel: Evaluate and Display Inline
|
|
|
|
|
|
|
10.1 - Programmatic Solution
|
|
If the function
is entered into Maple as the expression
then is obtained with
and the graph of is obtained as Figure 10.1.2 with
|
Figure 10.1.2 Graph of piecewise-defined
|
|
|
If the given function is entered into Maple as a Maple function, then appropriate syntax would be
Because this mode of entry does not display the "echelon" form of the piecewise function, the following alternate strategy can be used.
in which case the value is obtained with
|
|
|
Problem 10.2
|
|
|
10.2 - Mathematical Solution
|
|
Let us compare the functions , and .
It is tempting to write
= =
but this is naive and incorrect. Although more cumbersome, it would be clearer to write
= =
By convention, the domain of a function is the largest subset of the real numbers for which its rule is valid.
The function is not defined at , but the function is defined there, and has the value 2. Thus, , that is, the functions and are not the same. Their domains are not the same. The domain of contains one more point than the domain of . In that sense, is an extension of ; that is, agrees with at all points in their common domains, but is defined for at least one point where isn't.
The function agrees everywhere with . Their domains are the same, namely, the set of all real numbers, and their values agree at every real number. Hence, .
|
|
10.2 - Maplet Solution
|
|
The three functions
can be compared with the
Removable Singularity Tutor
.
Clicking this link will launch the tutor with the solution embedded as shown in the thumbnail image in Figure 10.2.1.
|
|
Figure 10.2.1 Thumbnail image of the Removable Singularity Tutor
|
|
|
|
The numerator and denominator of the function are entered separately, and the button labeled Set of singularities provides the set containing the singularities of .
The button labeled Piecewise form for expresses in the piecewise form
The button labeled Incorrect simplification of produces the function
a function that is not equivalent to . This function is an extension of because it agrees with at all points in the domain of , but its domain contains (at least) one more point than the domain of .
The button labeled Piecewise form of produces the function
which is equivalent to . Thus, the singularity of at can be removed by defining a new function that gives a value for . This new function can be written either in piecewise form as or as .
To launch the Removable Singularity Tutor, click the following link:
Removable Singularity Tutor
|
|
|
|
|
10.2 - Interactive Solution
|
|
Type , the rule for
Context Panel: Simplify≻Simplify
|
|
Maple simplifies to because Maple functions and expressions don't carry domain information.
Unfortunately, this means Maple is incorrect when making this simplification.
|
Type , the rule for
Context Panel: Simplify≻Simplify
|
|
Maple simplifies to . Although this is a correct simplification, Maple really doesn't "understand" why this is correct and the simplification of is not.
|
|
|
|
|
10.2 - Programmatic Solution
|
|
It is tempting to write
= =
but this is naive and incorrect. Although more cumbersome, it would be better to write
= =
In fact, as difficult as it is for Maple to produce, Figure 10.2.2 shows to be linear, except for the the gap or "hole" at .
By convention, the domain of a function is the largest subset of the real numbers for which its rule is valid.
The function is not defined at , but the function is defined there, and has the value 2. Thus, , that is, the functions and are not the same. Their domains are not the same. The domain of contains one more point than the domain of . In that sense, is an extension of ; that is, agrees with at all points in their common domains, but is defined for at least one point where isn't.
The function agrees everywhere with . Their domains are the same, namely, the set of all real numbers, and their values agree at every real number. Hence, .
|
|
|
Problem 10.3
|
|
|
10.3 - Mathematical Solution
|
|
The graph of
on the interval appears in Figure 10.3.1.
Recall that is the "greatest integer" function that returns the greatest integer that is less than or equal to .
|
|
Figure 10.3.1 Graph of
|
|
|
|
|
|
|
|
10.3 - Maplet Solution
|
|
Provided that , the greatest-integer function, is rendered as in Maple, a graph of the function
on the interval can be obtained with the
Piecewise Function Tutor
.
Clicking this link will launch the tutor with the solution embedded as shown in the thumbnail image in Figure 10.3.2.
Enter as a function in Format 1.
Because the domain of is the whole real line, expressing it as a piecewise-defined function would require an infinite number of rules. Hence, the Piecewise Function Tutor does not write this function in "echelon" form.
|
|
Figure 10.3.2 Thumbnail image of the Piecewise Function Tutor
|
|
|
|
The required graph is obtained by clicking on the button labeled Graph Format 1.
To launch the Piecewise Function Tutor, click the following link:
Piecewise Function Tutor
|
|
|
|
|
10.3 - Interactive Solution
|
|
•
|
Context Panel: Plots≻Plot Builder
Options: Find Discontinuities
|
|
|
Alternatively
|
•
|
Context Panel: Integer Functions≻Floor
|
•
|
Control-drag and append to it
|
•
|
Context Panel: Plots≻Plot Builder
|
|
|
|
|
|
|
10.3 - Programmatic Solution
|
|
The graph of appears in Figure 10.3.3.
|
|
|
Problem 10.4
|
|
|
10.4 - Mathematical Solution
|
|
Figure 10.4.1 contains a graph of
drawn on the interval .
|
|
Figure 10.4.1 Graph of
|
|
|
|
|
|
|
|
10.4 - Maplet Solution
|
|
Provided that , the greatest-integer function, is rendered as in Maple, a graph of the function
on the interval can be obtained with the
Piecewise Function Tutor
.
Clicking this link will launch the tutor with the solution embedded as shown in the thumbnail image in Figure 10.4.2.
Enter as a function in Format 1.
Because the domain of is the whole real line, expressing it as a piecewise-defined function would require an infinite number of rules. Hence, the Piecewise Function Tutor does not write this function in "echelon" form.
|
|
Figure 10.4.2 Thumbnail image of the Piecewise Function Tutor
|
|
|
|
The required graph is obtained by clicking on the button labeled Graph Format 1.
To launch the Piecewise Function Tutor, click the following link:
Piecewise Function Tutor
|
|
|
|
|
10.4 - Interactive Solution
|
|
•
|
Context Panel: Plots≻Plot Builder
Options: Find Discontinuities
|
|
|
Alternatively
|
•
|
Context Panel: Integer Functions≻Floor
|
•
|
Context Panel: Plots≻Plot Builder
|
|
|
|
|
|
|
10.4 - Programmatic Solution
|
|
The graph of appears in Figure 10.4.3.
|
|
|
Problem 10.5
|
|
|
10.5 - Mathematical Solution
|
|
Converting the function from the absolute value notation to piecewise notation requires knowing where changes from negative to positive. Thus, one could solve the equation
for . Alternatively, one could solve the inequalities
and
for
and
respectively.
Thus, when , the expression is negative, so becomes .
When , the expression is positive, so becomes.
When , both expressions reduce to 2, so it does not matter where the equality condition is included in the piecewise definition.
Thus, the piecewise form of would be
Figure 10.5.1 provides a graph of this function.
|
|
Figure 10.5.1 Graph of
|
|
|
|
|
|
|
|
10.5 - Maplet Solution
|
|
To represent the function
as a piecewise-defined function, and to obtain its graph on the interval , use the
Piecewise Function Tutor
.
Clicking this link will launch the tutor with the solution embedded as shown in the thumbnail image in Figure 10.5.2.
As required for Format 1 functions, enter as abs(3*x-5).
Then, click the button labeled Convert to piecewise to obtain the "echelon" representation of this function.
|
|
Figure 10.5.2 Thumbnail image of the Piecewise Function Tutor
|
|
|
|
Clicking the button labeled Graph Format 1 will give the required graph, provided the Plot Options button has been used to set the plot range to the required domain.
To launch the Piecewise Function Tutor, click the following link:
Piecewise Function Tutor
|
|
|
|
|
10.5 - Interactive Solution
|
|
•
|
Context Panel: Apply a Command
Apply the command≻convert
Append the arguments≻piecewise
|
•
|
Context Panel: Plots≻Plot Builder
Options≻
|
|
|
Solution from First Principles
|
•
|
Context Panel: Solve≻Solve
|
|
|
•
|
Context Panel: Solve≻Solve
|
|
|
•
|
Context Panel: Evaluate and Display Inline
|
|
|
•
|
Context Panel: Evaluate and Display Inline
|
|
|
•
|
Use , the piecewise function template from the Expression palette to obtain in piecewise form.
|
|
|
|
|
|
|
10.5 - Programmatic Solution
|
|
The function , given in Maple by
can be represented as the piecewise function
The graph of is found in Figure 10.5.3.
Converting from the absolute value notation to the piecewise notation requires knowing where changes from negative to positive. Thus, one could solve the equation
and obtain
On the other hand, one could solve the inequalities
obtaining
Thus, when , the expression is negative, so becomes .
When , the expression is positive, so becomes.
When , both expressions reduce to 2, so it does not matter where the equality condition is included in the piecewise definition.
|
|
|
Problem 10.6
|
|
|
10.6 - Mathematical Solution
|
|
Converting the function from absolute value notation to piecewise notation requires knowing where changes from negative to positive. Thus, one could solve the equation
by the quadratic formula, obtaining and .
Alternatively, one could solve the inequalities
and
obtaining
{ }
and
respectively.
Thus, when , or when , the expression is negative, so becomes
When the expression is positive, so becomes .
When or when , both expressions reduce to 0, so it does not matter where the equality condition is included in the piecewise definition.
This function is graphed in Figure 10.6.1.
|
|
Figure 10.6.1 Graph of
|
|
|
|
|
|
|
|
10.6 - Maplet Solution
|
|
To represent the function
as a piecewise-defined function, and to obtain its graph on the interval , use the
Piecewise Function Tutor
.
Clicking this link will launch the tutor with the solution embedded as shown in the thumbnail image in Figure 10.6.2.
As required for Format 1 functions, enter as
abs(1-2*x-3*x^2)
Then, click the button labeled Convert to piecewise to obtain the following "echelon" representation of this function.
|
|
Figure 10.6.2 Thumbnail image of the Piecewise Function Tutor
|
|
|
|
Clicking the button labeled Graph Format 1 will give the required graph, provided the Plot Options button has been used to set the plot range to the required domain.
To launch the Piecewise Function Tutor, click the following link:
Piecewise Function Tutor
|
|
|
|
|
10.6 - Interactive Solution
|
|
•
|
Context Panel: Assign to a Name≻
|
|
|
•
|
Context Panel: Apply a Command
Apply the command≻convert
Append the arguments≻piecewise
|
•
|
Context Panel: Plots≻Plot Builder
Options≻
|
|
|
Solution from First Principles
|
•
|
Context Panel: Solve≻Solve
|
|
|
•
|
Context Panel: Solve≻Solve
|
|
|
•
|
Use , the piecewise function template from the Expression palette, to obtain in piecewise form. Add additional "rows" with
Ctrl + Shift + r
|
|
|
|
|
|
|
10.6 - Programmatic Solution
|
|
The function , given in Maple by
can be represented as the piecewise function
The graph of is found in Figure 10.6.3.
Converting from the absolute value notation to the piecewise notation requires knowing where changes from negative to positive. Thus, one could solve the equation
and obtain
On the other hand, one could solve the inequalities
obtaining
Thus, when , or when , the expression is negative, so becomes
When the expression is positive, so becomes .
When or when , both expressions reduce to 0, so it does not matter where the equality condition is included in the piecewise definition.
|
|
|
|
Exercises - Chapter 10
|
|
10.1. For in the interval , graph the piecewise-defined function .
10.2. For in the interval , graph the piecewise-defined function .
10.3. For in the interval , graph the piecewise-defined function .
10.4. For in the interval , graph the piecewise-defined function .
10.5. For in the interval , graph the piecewise-defined function .
10.6. For in the interval , graph the piecewise-defined function .
10.7. For in the interval , graph the piecewise-defined function .
In Exercises 10.8 - 10.10, compare the functions , and .
10.8. ,
10.9. ,
10.10. ,
10.11. Graph on the interval .
10.12. Graph on the interval .
10.13. Represent as a piecewise-defined function, and obtain its graph on the interval .
10.14. Represent as a piecewise-defined function, and obtain its graph on the interval .
10.15. Represent as a piecewise-defined function, and obtain its graph on the interval .
10.16. Represent as a piecewise-defined function, and obtain its graph on the interval .
|
Go to Chapter 1 2 3 4 5 6 7 8 9 11
Go to Contents
|