1.1 Function Definition (Slides in 4-To-1 Format)
Total Page:16
File Type:pdf, Size:1020Kb
Definition of a function We study the most fundamental concept in mathematics, that of a Elementary Functions function. Part 1, Functions In this lecture we first define a function and then examine the domain of Lecture 1.1a, The Definition of a Function functions defined as equations involving real numbers. Definition of a function. A function f : X ! Y assigns to each element of the set X an element of Dr. Ken W. Smith Y . Sam Houston State University Picture a function as a machine, 2013 Smith (SHSU) Elementary Functions 2013 1 / 27 Smith (SHSU) Elementary Functions 2013 2 / 27 A function machine Inputs and unique outputs of a function We study the most fundamental concept in mathematics, that of a function. In this lecture we first define a function and then examine the domain of functions defined as equations involving real numbers. The set X of inputs is called the domain of the function f. The set Y of all conceivable outputs is the codomain of the function f. Definition of a function The set of all outputs is the range of f. A function f : X ! Y assigns to each element of the set X an element of (The range is a subset of Y .) Y . Picture a function as a machine, The most important criteria for a function is this: A function must assign to each input a unique output. We cannot allow several different outputs to correspond to an input. dropping x-values into one end of the machine and picking up y-values at Smith (SHSU) Elementary Functions 2013 3 / 27 Smith (SHSU) Elementary Functions 2013 4 / 27 the other end. Examples of functions Not a function We give an example (from Wikipedia) of a function from a set X to the However the map below is not a function. set Y . Some items in X are not mapped anywhere; worse, the item 2 has two The function maps 1 to D, 2 to C and 3 to C. outputs, both B and C. Note that each element of X has a unique output in Y . Functions are not allowed to change a single input into several outputs! Smith (SHSU) Elementary Functions 2013 5 / 27 Smith (SHSU) Elementary Functions 2013 6 / 27 Functions as questions SSN and Sam ID as functions Functions occur naturally in our world. Functions occur throughout our modern technological society. When we pull out an attribute of an object, we are essentially creating a The US social security number is a function SSN mapping US citizens to function. nine digit numbers. For example, the set X below has polygons with various colors. At Sam Houston State University, all students and staff are assigned a The question, \What is the color of a polygon?" could be viewed as a Sam ID. function that maps to polygons to colors. This as a function SamID, mapping students/staff to nine digit numbers. For example, SamID(Ken W Smith) = 000354765: (This function exists so that data about students/staff { classes, grades, wages, etc. { can be kept in a computer database, tracked by a single number.) Smith (SHSU) Elementary Functions 2013 7 / 27 Smith (SHSU) Elementary Functions 2013 8 / 27 In this example, the function from the set X to the set Y maps the four polygonal shapes in X to their color. We might name this function \color", so, for example, color(yellow rectangle) = yellow Functions as ordered pairs A worked exercise Although functions in science are often defined by equations, they do not Worked Exercise. Consider the function with domain have to be. (The SamID function is not defined by an equation.) D = {−2; −1; 0; 1; 2g, codomain the real numbers R, defined by the In its most general form, a function is a collection of ordered pairs formula g(x) = x2: satisfying certain requirements. 1 Display the function g in tabular form, and Consider the sets D := f1; a; b; z; orangeg and C := fr; s; t; u; v; 1000g: 2 Display the function g as a set of ordered pairs. We create a function f by assigning to each member of D a member of C. 3 Give the range of the function g. input output Solution. 1 r 1 As a table, we can write out the function g as a s x g(x) b r −2 4 z 1000 −1 1 orange 1000 0 0 This is a function: the domain is the elements of D. And each element of 1 1 D has a unique output! 2 4 We may sometimes define a function by a table or by a list of ordered pairs. 2 As a set of order pairs, g = f(−2; 4); (−1; 1); (0; 0); (1; 1); (2; 4)g 3 The range of the function g is f0; 1; 4g: Smith (SHSU)f = f(1; r); (a; s); (Elementaryb; r); (z; Functions1000); (orange; 1000)g 2013 9 / 27 Smith (SHSU) Elementary Functions 2013 10 / 27 (The ordered pairs are simply the entries in the table.) Example # 2 Definition of a function Another example. Consider the function defined earlier. In the next lecture we examine functions defined by equations. (END) Write this function in both tabular form and as a set of ordered pairs. Solution. In tabular form we have: X Y 1 D 2 C 3 C As ordered pairs, the function is the set f(1;D); (2;C); (3;C)g: Smith (SHSU) Elementary Functions 2013 11 / 27 Smith (SHSU) Elementary Functions 2013 12 / 27 Functions defined by equations Many functions we explore in mathematics and science are defined by an equation. We can define a function implicitly in an equation involving two variables. Elementary Functions For example, does the equation Part 1, Functions Lecture 1.1b, Functions defined by equations 2x + 3y − 4 = 0 define a function with inputs x and outputs y? Isolate y to get Dr. Ken W. Smith 1 3y = 4 − 2x and so y = (4 − 2x): 3 Sam Houston State University We may now explicitly define the function 2013 1 f(x) = (4 − 2x) : 3 So YES, the equation 2x + 3y − 4 = 0 does define a function. Smith (SHSU) Elementary Functions 2013 13 / 27 Smith (SHSU) Elementary Functions 2013 14 / 27 Independent and dependent variables Exercises on implicit functions A digression. When we considered the equation 2x + 3y − 4 = 0 Some worked exercises. our choice of x as input and y as output is arbitrary. We could decide (contrary to custom!) that y is the input and x is the output. Then, 1 Does the equation x2y = 4 define y as a function of x? (If it does, solving for x, we have give the domain of the implied function.) 2x = 4 − 3y Solution. We attempt to solve for y. We may multiply both sides of 1 4 and so the equation by as long as x is not zero. This gives us y = : 1 x2 x2 x = (4 − 3y) 2 2 Is there a problem with x = 0? No, x = 0 does not allow x y = 4, so and so we create the function x will never be zero in this equation. 1 4 g(y) = (4 − 3y): Answer: YES, this is a function; y = : 2 x2 But most of the time we will stick to convention and, unless stated The domain of this function is all real numbers except zero. otherwise, assume x is the input variable and y is the output variable. In interval notation the domain is (−∞; 0) [ (0; 1): The input variable x is often called the independent variable and the output variable is the dependent variable since its value depends on the input. Smith (SHSU) Elementary Functions 2013 15 / 27 Smith (SHSU) Elementary Functions 2013 16 / 27 Not a function Not a function 3 Does the equation x2y = 0 define y as a function of x? (Why/why 2 Does the equation xy2 = 4 define y as a function of x? Solution. If we attempt to solve for y, we multiply both sides of the not?) 1 4 Solution. Although it might be tempting to solve for y, first notice equation by (as long as x 6= 0) and so we have y2 = : x x that if x is zero then y could be 0 or 1 or 2:71828 or anything! But now, what is y? y could be positive or negative { there will generally be two choices here, one positive and one negative. So the input x = 0 does not give a unique output. This is not a function. The appearance of two answers violates the uniqueness requirement in our outputs for a function. Answer: NO; if x = 0 then y could be anything. Answer: (This is different than problem 1. In problem 1, x = 0 is not a NO, this is not a function. If x = 1 then we don't know if y = 2 or y = −2: possible input in the equation. But here x = 0 is a possibility for a solution to the equation! So we have to worry about the input x.) Smith (SHSU) Elementary Functions 2013 17 / 27 Smith (SHSU) Elementary Functions 2013 18 / 27 Practicing function notation Practicing function notation Let us practice the function notation, f(x). A formula for f(x) tells us how the input x leads to the output f(x): For example, suppose More examples. f(x) = x2 − 9. Compute: Let's continue with the function f(x) = x2 − 9. Compute: 1 f(0), 6 f(x + h), p 2 f(1), 7 f( x), 3 f(−1), 8 f(2a + 1), 4 f(−5), 9 −f(x) + 2 5 f(−x) Solutions.