Combinations of Functions

Read this section for an introduction to combinations of functions, then work through practice problems 1-9.

Multiline Definitions of Functions – Putting Pieces Together

Sometimes a physical or economic situation behaves differently depending on circumstances, and a more complicated function may be needed to describe the situation.

Sales Tax:
Some states have different rates of sale tax depending on the type of item purchased. A "luxury item" may be taxed at 12%, food may have no tax, and all other items may have a 6% tax. We could describe this situation by using a multiline function, a function whose defining rule consists of several pieces. Which piece of the rule we need to use will depend on what we buy. In this example we could define the tax T on an item which costs x to be

T(x) = \left\{ \begin{array}{lll}0 & \mbox { if  
    x  is the cost of a food}\\ 0.12x & \mbox { if  
    x is the cost of a luxury item}\\ 0.06x & \mbox { if 
    x  is the cost of any other item} \end{array} \right.

To find the tax on a $2 can of stew, we would use the first piece of the rule and find that the tax is 0. To find the tax on a $30 pair of earrings, we would use the second piece of the rule and find that the tax is $3.60 . The tax on a $20 book requires using the third rule, and the tax is $1.20 .

Wind Chill Index:
The rate at which a person's body loses heat depends on the temperature of the surrounding air and on the speed of the air. You lose heat more quickly on a windy day than you do on a day with little or no wind. Scientists have experimentally determined this rate of heat loss as a function of temperature and wind speed, and the resulting function is called the Wind Chill Index, WCI . The WCI is the temperature on a still day (no wind) at which your body would lose heat at the same rate as on the windy day. For example, the WCI value for 30o F air moving at 15 miles per hour is 9o F: your body loses heat as quickly on a 30o F day with a 15 mph wind as it does on a 9o F day with no wind.

If T is the Fahrenheit temperature of the air and v is the speed of the wind in miles per hour, then the WCI is a multiline function of the wind speed v (and of the temperature T):

 WCI  = \left\{ \begin{array}{lll}T & \mbox { if  0 ≤ v ≤ 4 }\\ 91.4 – \dfrac{10.45
    + 6.69 \sqrt v – 0.447v}{22}  (91.5 – T) &  \mbox { if 4 ≤ v ≤ 45}\\ 1.60T – 55 & \mbox { if  v > 45} \end{array} \right.

The WCI value for a still day  (0 ≤ v ≤ 4 \; mph) is just the air temperature. The WCI values for wind speeds above 45 mph are the same as the WCI value for a wind speed of 45 mph. The WCI values for wind speeds between 4 mph and 45 mph decrease as the wind speeds increase.

This WCI function depends on two variables, the temperature and the wind speed. However, if the temperature is constant, then the resulting formula for the WCI will only depend on the speed of the wind. If the air temperature is 30o F (T = 30), then the formula for the Wind Chill Index is

 WCI30 = \left\{ \begin{array}{lll}30^o                                    
    & \mbox { if  0  ≤ v  ≤ 4   mph}\\62.19  - 18.70 \sqrt v + 1.25v     & \mbox { if  4 ≤ v ≤ 45   mph}\\-7^o & \mbox {
    if 45 ≤ v   mph} \end{array} \right\}


The graphs of the the Wind Chill Indices are shown on Fig. 1 for temperatures of 40o F, 30o F and 20o F . (From UMAP Module 658, Windchill by William Bosch and L.G. Cobb, 1984).

Practice 1: A motel charges $50 per night for a room during the tourist season from June 1 through September 15, and $40 per night otherwise. Define a multiline function which describes these rates.

Example 1: Define f(x) = \left\{ \begin{array}{lll}   2 & \text { if } x < 0\\ 2x & \text  { if } 0 ≤ x < 2\\ 1 & \text { if } 2 < x    \end{array} \right.

Evaluate  f(–3), f(0), f(1), f(4) and f(2). Graph y = f(x) for –1 ≤ x ≤ 4.

Solution: To evaluate the function for different values of x, we must first decide which line of the rule applies. If x = –3 < 0, then we need to use the first line of the rule, and f(–3) = 2. When x = 0 or x = 1, we need the second line of the function definition, and then f(0) = 2(0) = 0 and f(1)
    = 2(1) = 2. At x = 4 the third line is needed, and f(4) = 1. Finally, at x = 2, none of the lines apply: the second line requires x < 2 and the third line requires 2 < x, so f(2) is undefined. The graph of f(x) is given in Fig. 2. Note the "hole" above x = 2 since f(2) is not defined by this rule for f.

Practice 2: Define g(x) = \left\{ \begin{array}{llll} x & \text { if } x < –1 \\2 & \text { if } –1 ≤ x < 1 \\ –x & \text { if } 1 < x ≤ 3 \\ 1 & \text { if } 4 < x \end {array} \right.

Graph y = g(x) for –3 ≤ x ≤ 6 and evaluate g(–3), g(–1), g(0), g(1/2), g(1), g(π/3), g(2), g(3), g(4) and g(5).


Practice 3: Write a multiline function definition for the function
whose graph is given in Fig. 3 .



We can think of a multiline function definition as a machine which first examines the input value to decide which line of the function rule to apply (Fig. 4).



Source: Dale Hoffman, https://s3.amazonaws.com/saylordotorg-resources/wwwresources/site/wp-content/uploads/2012/12/MA005-1.4-Combinations-of-Functions.pdf
Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 License.