Spring 2016 COMP 2300 Discrete Structures for Computation Chapter 11.1 Real-Valued Functions of a Real Variable and Their Graphs Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Cartesian Plane • A Cartesian plane or two-dimensional Cartesian coordinate system is a pictorial representation of R R obtained by setting up a one-to-one correspondence between ordered pairs of real numbers and points in a Euclidean plane. Horizontal axis (0 ,3 ) (2 ,1) ( 2 ,2 .5 ) Vertical axis Origin: the intersection of the two axes Spring 2016 COMP 2300 Donghyun (David) Kim 2 Department of Mathematics and Physics North Carolina Central University A Graph of A Function • A real-valued function of a real variable is a function from one set of real numbers to another. • If f is such a function, then for each real number x in the domain of f, there is a unique corresponding real number f(x). • The graph of f is the set of all points (x, y) in the Cartesian coordinate plane with the property that x is in the domain of f and y=f(x). Spring 2016 COMP 2300 Donghyun (David) Kim 3 Department of Mathematics and Physics North Carolina Central University A Graph of A Function – cont’ y=f(x) the point (x, y) lies on the graph of f. f (x) ( x, f ( x)) Graph of f x 4 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University Power Functions • Let a be any nonnegative real number. Define pa , the power function with exponent a, as follows: pa ( x) x a for each nonnegative real number x. 5 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University Floor Functions • The floor of a number is the integer immediately to its left on the number line. More formally, the floor function F is defined by the rule F ( x) x = the greatest integer that is less than or equal to x = the unique integer n such that n x n 1 . 6 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University Graphing Functions Defined on Sets of Integers • Many real-valued functions used in computer science are defined on sets of integers and not on intervals of real numbers. 7 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University Graph of Multiple of a Function • Let f be a real-valued function of a real variable and let M be any real number. The function Mf, called the multiple of f by M or M times f, is the real-valued function with the same domain as f that is defined by the rule ( Mf )( x) M ( f ( x)) for all x in domain of f. yx y 2x 8 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University Increasing and Decreasing Functions • Consider the absolute value function, A, which is defined as follows: x ifx 0 A( x) | x | x ifx 0 for all real numbers x. y | x | 9 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University Increasing and Decreasing Functions – cont’ • Let f be a real-valued function defined on a set of real numbers, and suppose the domain of f contains a set S. We say that f is increasing on the set S if, and only if, for all real numbers x1 and x2 in S, if x1 x2 then f ( x1 ) f ( x2 ). • We say that if is decreasing on the set S if, and only if, for all real numbers x1 and x2 in S, if x1 x2 then f ( x1 ) f ( x2 ). • We say that f is an increasing (or decreasing) function if, and only if, f is increasing (or decreasing) on its entire domain. 10 Spring 2016 COMP 2300 Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University