Chapter 6
IN THIS CHAPTER
Freeze-framing function characteristics
Concentrating on domain and range
Tackling one-to-one functions
Joining the “piece” corps
Handling composition duties
Working with inverses
Is your computer functioning well? Are you going to that company function? Are his kidneys functioning properly? What is all this business about functions? In algebra, the word function is very specific. You reserve it for certain math expressions that meet the tough standards of input and output values, as well as other mathematical rules of relationships. Therefore, when you hear that a certain relationship is a function, you know that the relationship meets some stringent requirements.
In this chapter, you find out more about these requirements. I also cover topics ranging from the domain and range of functions to the inverses of functions, and I show you how to deal with piecewise functions and do composition of functions. After grazing through these topics, you can confront a function equation with great confidence and a plan of attack.
For example, the equation is a function equation or function rule that uses the variables x and y. The x is the input variable, and the y is the output variable. (For more on how these designations are determined, flip to the section “Homing In on Domain and Range” later in this chapter.) If you input the number 3 for each of the x’s, you get . The output is 20, the only possible answer. You won’t get another number if you input the 3 again.
The single-output requirement for a function may seem like an easy requirement to meet, but you encounter plenty of strange math equations out there. You have to watch out.
Functions feature some special notation that makes working with them much easier and more understandable. The notation doesn’t change any of the properties, it just allows you to identify different functions quickly and indicate various operations and processes more efficiently.
The variables x and y are pretty standard in functions and come in handy when you’re creating their graphs. But mathematicians also use another format called function notation. For instance, say I have these three functions: , , and . Assume you want to call them by name. No, I don’t mean you should say, “Hey, you over there, Clarence!” Instead, you can write them: , , and .
The names of these functions are f, g, and h. (How boring!) You read them as follows: “f of x is x squared plus 5x minus 4,” and so on. When you see a bunch of functions written together, you can be efficient by referring to individual functions as f or g or h rather than “the middle one” or “the first one,” and so on.
When you see a written function that uses function notation, you can easily identify the input variable, the output variable, and what operations you need to evaluate the function for some input (or replace the variables with numbers and simplify). You can do so because the input value is placed in the parentheses right after the function name or output value.
If you see , for example, and you want to evaluate it for , you write down g(3). This means you substitute a 3 for every x in the function expression and perform the operations to get the output answer: . Now you can say that , or “g of 3 equals 1.” The output of the function g is 1 if the input is 3.
The input and output values of a function are of major interest to people working in algebra. These terms don’t yet strum your guitar? Well, allow me to pique your interest. The words input and output describe what’s happening in the function (namely what number you put in and what result comes out), but the official designations for the input and output are domain and range, respectively.
The domain of a function consists of all the input values of the function (think of a king’s domain of all his servants entering his kingdom). In other words, the domain is the set of all numbers that you can input without creating an unwanted or impossible situation. Such situations can occur when operations appear in the definition of the function, such as fractions, radicals, logarithms, and so on.
You need to be prepared to determine the domain of a function so that you can tell where you can use the function — in other words, for what input values it does any good. You can determine the domain of a function from its equation or function definition. You look at the domain in terms of which real numbers you can use for input and which ones you have to eliminate. You can express the domain by using the following:
The way you express domain depends on what’s required in the task you’re working on — evaluating functions, graphing, or determining a good fit as a model, to name a few. Here are some examples of functions and their respective domains:
The range of a function is all its output values — every value you get by inputting the domain values into the rule (the function equation) for the function. You may be able to determine the range of a function from its equation, but sometimes you have to graph it to get a good idea of what’s going on.
A range may consist of all real numbers, or it may be restricted because of the way a function equation is constructed. You have no easy way to describe ranges — at least, not as easy as describing domains — but you can discover clues with some functions by looking at their graphs and with others by knowing the characteristics of those kinds of curves.
The following are some examples of functions and their ranges. Like domains, you can express ranges in words, inequalities, or interval notation (see Chapter 2):
The graph of this function never touches the x-axis, but it gets very close. For the numbers in the domain bigger than five, the graph has some really high y-values and some y-values that get really close to zero. But the graph never touches the x-axis, so the function value never really reaches zero. For numbers in the domain smaller than five, the curve is below the x-axis. These function values are negative — some really small. But, again, the y-values never reach zero. So, if you guessed that the range of the function is every real number except zero, you’re right! You write the range as , or . Did you also notice that the function doesn’t have a value when ? This happens because 5 isn’t in the domain.
You can classify numbers as even or odd (and you can use this information to your advantage; for example, you know you can divide even numbers by two and come out with a whole number). You can also classify some functions as even or odd. The even and odd integers (like 2, 4, 6, and 1, 3, 5) play a role in this classification, but they aren’t the be-all and end-all. You have to put a bit more calculation work into classifying the functions. If you didn’t have to put in the extra effort, you would’ve mastered this stuff in third grade, and I’d have nothing to write about.
To determine if a function is even or odd (or neither), you replace every x in the function equation with and simplify. If the function is even, the result in the simplified version looks exactly like the original. If the function is odd, the result in the simplified version looks like what you get after multiplying the original function equation by .
The following are examples of some even and odd functions, and I explain how you label them so you can master the practice on your own:
This is just a demonstration of how one pair of numbers works. To show that the function is even for any input value, you replace x with –x in the function rule: . This result is the original function — it must be even.
To show that this result happens for all pairs of input values, replace x with –x in the function rule.
. This is the same as multiplying the original function rule by . The function must be odd.
You can’t say that a function is even just because it has even exponents and coefficients, and you can’t say that a function is odd just because the exponents and coefficients are odd numbers. If you do make these assumptions, you classify the functions incorrectly, which messes up your graphing. You have to apply the rules to determine which label a function has.
The biggest distinction between even and odd functions is how their graphs look:
You may be wondering whether you can have symmetry with respect to the x-axis. After all, is the y-axis all that better than the x-axis? I’ll leave that up to you, but yes, x-axis symmetry does exist — just not in the world of functions. By its definition, a function can have only one y value for every x value. If you have points on either side of the x-axis, above and below an x value, you don’t have a function. Head to Chapter 11 if you want to see some pictures of curves that are symmetric all over the place.
Functions can have many classifications or names, depending on the situation (maybe you want to model a business transaction or use them to figure out payments and interest) and what you want to do with them (put the formulas or equations in spreadsheets or maybe just graph them, for example). One very important classification is deciding whether a function is one-to-one.
If , then
In simple terms, if the two output values of a function are the same, then the two input values must also be the same.
One-to-one functions are important because they’re the only functions that can have inverses, and functions with inverses aren’t all that easy to come by. If a function has an inverse, you can work backward and forward — find an answer if you have a question and find the original question if you know the answer (sort of like Jeopardy!). For more on inverse functions, see the section “Singing Along with Inverse Functions” later in this chapter.
An example of a one-to-one function is . The rule for the function involves cubing the variable. The cube of a positive number is positive, and the cube of a negative number is negative. Therefore, every input has a unique output — no other input value gives you that output.
Some functions without the one-to-one designation may look like the previous example, which is one-to-one. Take , for example. This counts as a function because only one output comes with every input. However, the function isn’t one-to-one, because you can create many outputs or function values from more than one input. For instance, , and . You have two inputs, 1 and , that result in the same output of 0.
You can determine which functions are one-to-one and which are violators by sleuthing (guessing and trying), using algebraic techniques, and graphing. Most mathematicians prefer the graphing technique because it gives you a nice, visual answer. The basic graphing technique is the horizontal line test. But, to better understand this test, you need to meet its partner, the vertical line test. (I show you how to graph various functions in Chapters 7 through 10.)
The graph of a function always passes the vertical line test. The test stipulates that any vertical line drawn through the graph of the function passes through that function no more than once. This is a visual illustration that only one y value (output) exists for every x value (input), a rule of functions. Figure 6-3a shows a function that passes the vertical line test, and Figure 6-3b contains a curve that isn’t a function and therefore flunks the vertical line test.
All functions pass the vertical line test, but only one-to-one functions pass the horizontal line test. With this test, you can see if any horizontal line drawn through the graph cuts through the function more than one time. If the line passes through the function more than once, the function fails the test and therefore isn’t a one-to-one function. Figure 6-4a shows a function that passes the horizontal line test, and Figure 6-4b shows a function that flunks it.
Both graphs in Figure 6-4 are functions, however, so they both pass the vertical line test.
A piecewise function consists of two or more function rules (function equations) pieced together (listed separately for different x-values) to form one bigger function. A change in the function equation occurs for different values in the domain. For example, you may have one rule for all the negative numbers, another rule for numbers bigger than three, and a third rule for all the numbers between those two rules.
Piecewise functions have their place in situations where you don’t want to use the same rule for everyone or everything. Should a restaurant charge a 3-year-old the same amount for a meal as it does an adult? Do you put on the same amount of clothing when the temperature is 20 degrees as you do in hotter weather? No, you place different rules on different situations. In mathematics, the piecewise function allows for different rules to apply to different numbers in the domain of a function.
Piecewise functions are often rather contrived. Oh, they seem real enough when you pay your income tax or figure out your sales commission. But in an algebra discussion, it seems easier to come up with some nice equations to illustrate how piecewise functions work and then introduce the applications later. The following is an example of a piecewise function:
With this function, you use one rule for all numbers smaller than or equal to , another rule for numbers between and 3 (including the 3), and a final rule for numbers larger than 3. You still have only one output value for every input value. For instance, say you want to find the values of this function for x equaling , and 5. Notice how you use the different rules depending on the input value:
Figure 6-5 shows you the graph of the piecewise function with these function values.
Notice the three different sections to the graph. The left curve and the middle line don’t connect because a discontinuity exists when . A discontinuity occurs when a gap or hole appears in the graph. Also, notice that the left line falling toward the x-axis ends with a solid dot, and the middle section has an open circle just above it. These features preserve the definition of a function — only one output for each input. The dot tells you to use the rule on the left when .
The middle section connects at point (3, 2) because the rule on the right gets really, really close to the same output value as the rule in the middle when . Technically, you should draw both a hollow circle and a dot, but you really can’t spot this feature just by looking at it.
Why in the world would you need to use a piecewise function? Do you have any good reason to change the rules right in the middle of things? I have two examples that aim to ease your mind — examples that you may relate to very well.
Utility companies can use piecewise functions to charge different rates for users based on consumption levels. A big factory uses a ton of electricity and rightfully gets a different rate than a homeowner. Here’s what the company Lightning Strike Utility uses to figure the charges for its customers:
where h is the number of kilowatt hours and C is the cost in dollars.
So, how much does a homeowner who uses 750 kilowatt hours pay? How much does a business that uses 10,000 kilowatt hours pay?
You use the top rule for the homeowner and the bottom rule for the business, determined by what interval the input value lies in. The homeowner has the following equation:
The person using 750 kilowatt hours pays a little more than $56 per month. And the business?
The company pays a little more than $451.
As April 15 rolls around, many people are faced with their annual struggle with income tax forms. The rate at which you pay tax is based on how much your adjusted income is — a graduated scale where (supposedly) people who make more money pay more income tax. The income values are the inputs (values in the domain), and the government determines the tax paid by putting numbers into the correct formula.
In 2014, a single taxpayer paid her income tax based on her taxable income, according to the following rules (laid out in a piecewise function):
where n is the taxable income and T is the tax paid.
If her taxable income was $45,000, how much did she pay in taxes? Insert the value and follow the third rule, because 45,000 is between 36,900 and 89,350:
This person paid a little more than $7,100 in income tax.
You can perform the basic mathematical operations of addition, subtraction, multiplication, and division on the equations used to describe functions. ( You can also perform whatever simplification is possible on the different parts of the expression and write the result as a new function.) For example, you can take the two functions and and perform the four operations on them:
Well done, but you have another operation at your disposal — an operation special to functions — called composition.
No, I’m not switching the format to a writing class. The composition of functions is an operation in which you use one function as the input into another and perform the operations on that input function.
Here’s how you perform an example composition, using the functions f and g from the preceding section, and :
The composition of functions isn’t commutative (addition and multiplication are commutative, because you can switch the order and not change the result). The order in which you perform the composition — which function comes first — matters. The composition isn’t the same as , save one exception: when the two functions are inverses of one another (see the section “Singing Along with Inverse Functions” later in this chapter).
The difference quotient shows up in most high school Algebra II classes as an exercise you do after your instructor shows you the composition of functions. You perform this exercise because the difference quotient is the basis of the definition of the derivative. The difference quotient allows you to find the derivative, which allows you to be successful in calculus (because everyone wants to be successful in calculus, of course). So, where does the composition of functions come in? With the difference quotient, you do the composition of some designated function f (x) and the function or , depending on what calculus book you use.
Now, for an example, perform the difference quotient on the same function f from the previous section, :
Notice that you find the expression for by putting in for every x in the function — is the input variable. Now, continuing on with the simplification:
Did you notice that , 3x, and 4 all appear in the numerator with their opposites? That’s why they disappear with the simplification. Now, to finish:
Now, this may not look like much to you, but you’ve created a wonderful result. You’re one step away from finding the derivative. Tune in next week at the same time … no, I lied. You need to look at Calculus For Dummies, by Mark Ryan (Wiley), if you can’t stand the wait and really want to find the derivative. For now, you’ve just done some really decent algebra.
Some functions are inverses of one another, but a function can have an inverse only if it’s one-to-one (see the section “Facing One-to-One Confrontations” earlier in this chapter if you need a refresher). If two functions are inverses of one another, each function undoes what the other creates. In other words, you use them to get back where you started.
The notation for inverse functions is the exponent written after the function name. The inverse of function f (x), for example, is . Here are two functions that are inverses of one another and how they undo what the other did:
and
If you put 5 into function f, you get 8 as a result. If you put 8 into , you get 5 as a result — you’re back where you started:
Now, what was the question? How can you tell with the blink of an eye when functions are inverses? Read on!
In an example from the intro to this section, I tell you that two functions are inverses and then demonstrate how they work. You can’t really prove that two functions are inverses by plugging in numbers, however. You may face a situation where a couple of numbers work, but, in general, the two functions aren’t really inverses.
In other words, you have to do the composition in both directions (do and then do , which is the opposite order) and show that both result in the single value x.
For some practice, show that and are inverses of one another. First, you perform the composition :
Now you perform the composition in the opposite order:
Both come out with a result of x, so the functions are inverses of one another.
Up until now in this section, I’ve given you two functions and told you that they’re inverses of one another. How did I know? Was it magic? Did I pull the functions out of a hat? No, you have a nice process to use. I can show you my secret so you can create all sorts of inverses for all sorts of functions. Lucky you! The following list gives you the step-by-step process that I use (more memorization to come).
Here’s an example of how you work it. Find the inverse of the function :
Solve for y.
Start by multiplying each side of the equation by the denominator and distributing.
Now subtract y from each side and add 5x to each side to get the terms with y in them on one side. Factor out that y.
Divide each side by .