Chapter 4: Funtions 4.1 What is a function 4.2 Functions and Expressions 4.3 Functions and Equations 4.4 Functions and Change 4.5 Functions and Modeling 4.1 What is a function In chapter 2 we dealt with manipulating EXPRESSIONS such as x^2 + 5x + 6 (Algebric symbols with no equals sign) In chapter 3 we dealt with EQUATIONS and INEQUALITIES (Two expressions linked by and equals sign or an inequality) Now we are talking about FUNCTIONS A function is a rule that, for and given input, gives you exactly one output. You can think of it as a machine that you feed something in one end and something else comes out the other. For example: I could write my height is a function of by age. Then if I gave you an age, you could use that function to tell me my height. There is a common way to write functions, and this is using an "f" Ouput = f(Input) Dependent = f(Independent) For our example: height = f(age) or just h = f(a) of even simply "h(a)" Note that this is NOT multiplication. This can be confusing. It is read "h equals f of a" or just "h is a function of a". Tables Age | Height ---------------- 1 2 ft 3 in (27 in) 3 2 ft 9 in (33 in) 5 3 ft 4 in (40 in) 8 3 ft 9 in (45 in) 10 4 ft 3 in (51 in) 15 5 ft 2 in (62 in) 18 5 ft 4 in (64 in) 20 5 ft 5 in (65 in) 25 5 ft 5 in (65 in) Another way to present a function is through a graph Graphs have two axis, the axis for the input or independent variable (often called the x-axis) and the axis for the output or dependent variable (often called the y-axis) If you are given a function in a table we can draw the function on the graph by drawing each points. Count over to the location on the input varaiable axis, and then count up to the location on the dependent variable axis, and place a point. (Do this for each of the point in the above table). What does this graph tell you? You can read information off of this graph. Pretend I hadn't given you the table, how would you use the graph to determine how tall this person was when they were 15? You can also use graphs to look at the dependent variable About how old were they when the were 4 feet tall (48 in)? What sorts of problem might you run into when looking at the dependent variable (hint: what if I asked you at what age the person was 5'5" ? how about 5'10"?) 4.2 Functions and Expressions A function can often be written as an algebraic expression For instance, if I throw a ball straight up into the air, the maximum height that it can go is a function of how fast I initially threw it. On earth, if I throw a ball up then h(v) = v^2 / 64 where h is in feet and v is in ft/s so I if I threw the ball at 20 ft/s (~14 mph) then I could right it as h(20) = 20^2/40 it would reach 20^2/64=400/64=25/4=6.25 ft However, often times the expressing involves letters that aren't just the dependentand indeptendent variables. These are called "constants", or sometimes "parameters" So the general expression for how high balls will go when you throw them up is The h(v) = v^2 / (2g) Here you need to be careful, the fact that I wrote h(v) means that I am treating v as the variable and g a parameter. where for earth g=32 ft/s^2, but on the moon g=5 ft/s^2, and on the sun (if you could stand on the sun and throw a ball) g=896. have the students answer what is h(30)=? in general ( h(30)=900/2g ) what is h(30) on earth? ( h = 900/64 ~ 14 ft) what is h(30) on the moon? ( h = 90 ft) 4.3 Functions and Equations Sometimes we know what we want our dependent variable to be (for instance we know how high we want to throw the ball to) and need to figure out the indenpendent variable. We can solve for the independent variable the same way we solved for variables earlier. h(v) = v^2 / (2g) * 2g *2g 2 h(v) g = v^2 sqrt(2 * h(v) g ) = v Example: f(x) = (5x - 2)/4 and f(x) = 2 then what is x? Often you want to know when two functions equal eachother. For instance if my costs to run a lemonade stand are $15 for my signs, pitcher, etc and then $0.10 per cup, I could write my costs as a function of the number of cups I sell C(n) = 15 + 0.10 n And my profits are $0.25 per cup, so my profit is a function of thenumber of cups I sell P(n) = 0.25 n then I might be interested in how many cups I need to sell to make up my costs. P(n) = C(n) Set them equal to each other and solve for n. (have the students do it) You can also graph the solutions (0,15) (100,25) are solutions to the first equation. (0,0) and (100,25) are solutions to the second. We can see where the two lines intersect, that is as 100 cups. What you really probably care about with your lemonade stand is that you make MORE money than you put in. P(n) >= C(n) Have the students solve this inequality. How could you read this by looking at the graph? (Look at where the P(n) line is above the C(n) line) 4.4 Functions and Change Introducing the symbol Delta (triangle) Average rate of change = Change in output/change in input = Delta y / Delta x = (f(b) - f(a))/b-a What does average rate of change mean? It's easiest to understand using an example. Suppose that a car travels from Santa Cruz to San Francisco, a distance of about 70 miles, and that it takes two hours to do so. We can describe this as a function in which the input is the time since the car left, and the output is how far it has gone: F(t). Here F(0) = 0, since after zero time the car has gone zero miles, and F(2) = 70, since it has gone 70 miles after 2 hours. Thus Average rate of change = Delta F / Delta t = (70 - 0) / (2 - 0) = 35 miles per hour. That's all an average rate of change is: it's an average speed. Notice that this doesn't mean that the car was going 35 miles per hour the entire way. Perhaps is went 60 miles per hour most of they way, then got stuck in traffic outside San Francisco and went 10 miles per hour for the last bit. All that matters is the total time the trip took, and the total distance it covered. An interesting to thing to notice here is the units of our quantities. In the example we just discussed, the distance was in miles, and the time was in hours, so the speed was given in miles per hour. This is the general rule: rates of change are always in "something per something", where the something's match whatever units of measure you use. As an example, suppose that a fastball thrown by a picther covers the 46 feet between the mound and home plate in 0.5 seconds. Thus we have F(0) = 0 and F(0.5) = 46 feet. Thus the average rate of change is (F(0.5) - F(0)) / (0.5 - 0) = 46 / 0.5 = 92 feet per second. 4.5 Functions and Modeling Functions are most useful when they are used to represent the way something happens in the real world -- a function that does this is sometimes called a model. Direct Proportionality The simplest type of model is one called a direct proportionality. An example of this is the tax on an item. Suppose the sales tax is 8%. To compute the sales tax, you just take the price and multiply by 0.08. So an item that costs $1000 has a sales tax of $80. As a function, we could write this s(p) = 0.08 p, where s is the sales tax and p is the price. This rule of "just multiply" is called direct proportionality. Formally, we write this down as Q = k t, where k is any number. The rule is that to get the quantity Q, we multiply the input t by the number k. There are many possible examples of direct proportionality. Here's another one: the cost of one brand of coffee beans might be $8 per pound. This is a direct proportionality of the form C = 8 w where w is the weight, C is the cost, and 8 is the constant of proportionality. Solving for constants of proportionality In the example of the coffee, we could turn this around. Suppose we knew that two pounds of coffee cost $16. We could divide and figure out that the price must be $8 per pound, and we could use that to figure out the price of any other quantity. In terms of functions, given the input and output quantities, we can solve for the constant of proportionality. Here's another example. Suppose a car travels 300 miles in 5 hours. We could write the distance traveled in a certain time as a direct proportionality: d = v t, where v is the velocity, or speed. Clearly we can solve for the speed by plugging in d = 300 miles for the distance, and t = 5 hours for the time: v = d/t = 300 mi / 5 hours = 60 mph That's all there is to it.