## 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

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 30

^{o}F air moving at 15 miles per hour is 9

^{o}F: your body loses heat as quickly on a 30

^{o}F day with a 15 mph wind as it does on a 9

^{o }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 is a multiline function of the wind speed (and of the temperature ):

The value for a still day is just the air temperature. The values for wind speeds above 45 mph are the same as the value for a wind speed of 45 mph. The values for wind speeds between 4 mph and 45 mph decrease as the wind speeds increase.

This function depends on two variables, the temperature and the wind speed. However, if the temperature is constant, then the resulting formula for the will only depend on the speed of the wind. If the air temperature is 30

^{o}F (T = 30), then the formula for the Wind Chill Index is

The graphs of the the Wind Chill Indices are shown on Fig. 1 for temperatures of 40^{o} F, 30^{o} F and 20^{o} 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

Evaluate , , , and . Graph for .

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

Practice 2: Define

Graph for and evaluate , , , , , , , , and .

**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

This work is licensed under a Creative Commons Attribution 3.0 License.