Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Functional decomposition wikipedia , lookup
Mathematics of radio engineering wikipedia , lookup
Big O notation wikipedia , lookup
Continuous function wikipedia , lookup
Dirac delta function wikipedia , lookup
Non-standard calculus wikipedia , lookup
Elementary mathematics wikipedia , lookup
History of the function concept wikipedia , lookup
Function (mathematics) wikipedia , lookup
Haberman MTH 111c Section I: Sets and Functions Module 3: Piecewise-Defined Functions Some functions have different rules for different elements of the domain. Since these functions have different definitions for different pieces of the domain, they are called piecewise-defined functions. EXAMPLE: The zoo uses a piecewise-defined function to calculate the entrance fee for groups. The zoo charges $3 for each adult and $30 for a group of 10 or more. So if we let n represent the number of people in a group (so n 0 and n Z ), then the entrance fee for the group is given by the function 3n if n 10 f (n) 30 if n 10 Be sure that you understand the piecewise-defined function notation above before moving on, by making sure that you understand how it communicates the same information contained in the English description of the entrance fee function. EXAMPLE: Consider the piecewise-defined function p whose algebraic rule is given below: 3 x p( x ) 2 x2 if x 0 if x 0 if x 0 Since there is a rule that applies to ALL x-values, the domain of p is the set of real numbers (denoted by R ). We can graph p by graphing each of its pieces on the same coordinate plane. So we need to graph y 3 x for all x 0 , and we need to plot a point above x 0 at the height y 2 , i.e., we need to plot the point (0, 2) , and we need to graph y x 2 for all x 0 . The graph of y p ( x ) is given in Figure 1. Figure 1: Graph of y p ( x ) . 2 EXAMPLE: Consider the piecewise-defined function g whose algebraic rule is given below: 1 2 g ( x) 3 n if 0 x 1 if 1 x 2 if 2 x 3 if n 1 x n, n Z So for all x-values between 0 and 1 (including 1), the output is 1, while for all x-values between 1 and 2 (including 2), the output is 2, etc. The graph of g is given in Figure 2. Figure 2: Graph of y g ( x ) . Notice that the domain of g is the set of positive real numbers (denoted by R ) while the range is the set of positive integers (denoted Z ). EXAMPLE: The absolute value function (with which you are hopefully already familiar) can be studied as a piecewise defined function. x if x 0 a( x) x x if x 0 The graph of the absolute value function a is given in Figure 3. Figure 3: Graph of y a( x) x . 3 EXAMPLE: Find an algebraic rule for the function h graphed in Figure 4. Figure 4: Graph of y h( x ) . SOLUTION: It should be clear that this function consists of three linear pieces. The easiest piece to find a rule for is the middle piece, since it is a horizontal line-segment. Clearly this line segment is represented by the equation y 2 , and this equation applies when 0 x 2 . The leftmost piece is a line with y-intercept (0, 4) and slope 2 (which can be determined by calculating the ratio of vertical change to horizontal change, i.e., rise over run). Thus, it is represented by the equation y 2 x 4 and it applies when x 0 . The right-most piece also has slope 2 (since it is clearly parallel to the left-most piece), so we know its rule looks like y 2 x b . To find b we can use the fact that this line passes through the point (3, 0) : y 2 x b and (3, 0) 0 2(3) b 06 b b 6 Thus, the right-most piece is represented by equation y 2 x 6 , and it applies when x 2 . Therefore, an algebraic rule for the function graphed in Figure 4 is 2 x 4 if x 0 h( x ) 4 if 0 x 2 2 x 6 if x 2