You are on page 1of 6

Functions

Part 1 - Denition and Examples

Amber Habib Department of Mathematics Shiv Nadar University

Abstract Notes for the Precalculus course taught to 1st year students of the B.S. Mathematics program.

Functions

In school, you have come across expressions such as y = 2x + 1 and y = x. These are just two examples of what are termed functions rules for converting an input x into the output y. Example 1.1 1. The function y = 2x + 1 doubles the input x and then adds 1 to it. 2. The function y = x gives the non-negative square root of the number x. 2 The second of these examples brings up three important points. 1. We must specify what is a valid input for a function. For example, the function x cannot be applied to negative numbers (at least, if we wish to also have real numbers as output), since negative numbers do not have real roots. 2. We must specify the allowed output for a function. For example, the func tion x can be applied to negative numbers if we allow complex numbers as output values. 3. Every input must lead to only one output. This is why we impose the convention that x means only the non-negative square root of x. For example, while 4 has two square roots 2, 4 means only 2. 1

Thus, to dene a function properly, we need to specify three things the set of valid input, the set to which the output will belong, and the rule itself. The rule must be unambiguous in that each input should have only one associated output. This discusson leads to the following formal denition of functions: Denition 1.2 Let X and Y be two sets. A function f from X to Y is a rule that associates a unique member of Y to each member of X. The set X is called the domain of f while the set Y is called the codomain of f . The notation f : X Y is used to denote the statement f is a function from X to Y . Denition 1.3 Suppose f : X Y . Let f associate the member b Y to a given member a A. Then we say that b is the image of a and we write b = f (a). Conversely, we call a a pre-image of b. The statement f : X Y indicates only that f is a rule for associating members of Y to members of X. It has no information about how the rule operates. Suppose the rule is that x is sent to x2 . Then we express this by saying that f (x) = x2 or that f : x x2 (Note the special arrow used here). Example 1.4 Consider the function with domain R and codomain R that sends every real number to its cube. Our short notation for this is: f : R R, x x3 or f : R R, f (x) = x3 2 You may have noted that we have set up a very general denition of a function, allowing any kind of set as domain or codomain. The rule may also take any form and need not necessarily be a numerical expression. Example 1.5 Let X be the set containing the 4 major cities of India, and Y consist of all the states and union territories in India. We can dene a function f : X Y by associating to each city the state or union territory that it belongs to. Then we have f (Delhi) = Delhi f (Kolkata) = West Bengal f (Chennai) = Tamil Nadu f (Mumbai) = Maharashtra 2 Remark 1.6 This example has a purpose other than illustrating that the domain and codomain could be any sets. We see here that there may be elements of the codomain Y which are not assigned to any member of the domain X. Thus the codomain may have members which have no pre-image in the domain. On the other hand, for the rule to qualify as a function, every member of the domain must have an image in the codomain. 2

Basic notions about functions can be exhibited pictorially, as in the diagram below. It depicts the function f from Example 1.5. The domain X is represented by the left ellipse, the codomain Y by the right ellipse, and the arrows show the action of the function.

f Delhi Kolkata Mumbai Chennai X

Delhi West Bengal Maharashtra Tamil Nadu Uttar Pradesh . . . Y

Consider the rules depicted by the following pictures. Which ones represent functions?

(A)

(B)

(C)

(D)

(A) does not represent a function because there is a point in the domain which has no image. (B) also does not represent a function, since there is a point in the domain which has two images. (C) and (D) do represent functions, since it is permitted for points in the codomain of a function to have no pre-image as well as to have multiple pre-images. We have been using the name f for a function. This is simply the most commonly used notation for a function (as x is for a variable), but we are free to use any other letter, symbol, or word. Other popular choices are g, h, u, v,

F , G, H, , and so on. Functions that are particularly important have their own names such as sin, cos, exp and ln. We will now list a variety of functions that are commonly used in mathematics. All of these have codomain R and the domain is a subset of R. Example 1.7 (Power Functions) These have the form x xn with n = 0, 1, 2, . . . . The domain is R. 2 Example 1.8 (Polynomials) These are linear combinations of power functions, such as 2x + 1 and 2x3 + x2 + x + 3. A general polynomial has the form p(x) = a0 + a1 x + a2 x2 + + an xn , a0 , a1 , a2 , . . . , an R Polynomials again have domain equal to R. The degree of a polynomial is the highest power whose coecient is nonzero. For example the degree of 2x3 + x2 + x + 3 is 3. The degree of the polynomial p(x) is denoted by deg(p) or deg(p(x)). The zero polynomial is the function that takes every x to zero. It is denoted by 0. Its degree is undened. Let p and q be two polynomials. Then their sum p + q and product pq are also polynomials and are dened by: (p + q)(x) = p(x) + q(x) (pq)(x) = p(x)q(x) 2

A number a is called a zero of a polynomial p if p(a) = 0. Exercise 1.9

1. Identify the degrees of the following polynomials: 1, 5, 1+x, x1000 +200x+1, (x + 2)(x 2), x3 x(x2 1). 2. If p and q are two non-zero polynomials, show that deg(p + q) deg(p) + deg(q) and deg(pq) = deg(p) deg(q). 3. Let p be a non-zero polynomial. Show that the number of zeroes of p is less than or equal to deg(p). Example 1.10 (Rational Functions) A rational function is the quotient of two polynomials: p(x) r(x) = , p, q are polynomials q(x) The ratio p(x)/q(x) is undened at the zeroes of q(x). Therefore the domain of this rational function is R \ {x : q(x) = 0} 2 4

Exercise 1.11 Identify the domains of these rational functions: f (x) = 1 , 2+1 x g(x) = x+1 , x1 h(x) = x1 , x2 1 r(x) = x2 1 x1

Exercise 1.12 Identify the domains of the functions f (x) = x 4, g(x) = x2 4, h(x) = 1 x2 4

Example 1.13 (Trigonometric Functions) The sine and cosine functions are denoted by sin and cos respectively. Their domain is R. We will assume that angles are being measured in radians, not degrees. The tangent function is denoted by tan. Now tan(x) = sin(x)/ cos(x) is undened if cos(x) = 0. We know that the cosine function takes zero value for x = (2n + 1)/2 (n Z). Therefore the domain of tan(x) is R \ (2n + 1) :nZ 2 2 Exercise 1.14 Identify the domains of the remaining trigonometric functions: csc(x), sec(x) and cot(x). Example 1.15 (Exponential Function) The exponential function exp : R R is dened by exp(x) = ex . Here e is Eulers number. It is an irrational number with decimal expansion e = 2.718 . . . . Some key properties of the exponential function are: exp(x) > 0 x R, exp(0) = 1, exp(a + b) = exp(a) exp(b) a, b R 2 Example 1.16 (Natural Logarithm) The natural logarithm ln(x) of a positive real number x is its logarithm with base e. That is, y = ln(x) i ey = x. The domain of ln(x) is R+ = (0, ). The key properties of this function are: ln(1) = 0, ln(ab) = ln(a) + ln(b), ln(ab ) = b ln(a) 2 Example 1.17 (Hyperbolic Functions) The hyperbolic functions sinh, cosh, tanh : R R are dened by: cosh(x) = sinh(x) = tanh(x) = ex + ex 2 ex ex 2 sinh(x) cosh(x) 2 5

Example 1.18 (Absolute Value or Modulus Function) The absolute value |x| of a real number x is dened by |x| = x x0 x x < 0 2 Example 1.19 (Greatest Integer Function) The greatest integer function, denoted [x], is dened to be the greatest integer n such that n x. For example, [1] = [1.1] = [1.9] = 1 and [1.1] = [1.9] = [2] = 2. 2 Example 1.20 (Signum Function) The dened by: 1 0 sgn(x) = 1 signum function, sgn : R R, is x>0 x=0 x<0 2

Exercise 1.21 Show that for any x R we have x = sgn(x)|x|. We will revisit these functions and explore their properties in greater detail through the remainder of these notes. Remark 1.22 We had declared R as the common codomain of all the functions in Examples 1.7 to 1.20. In some of these functions we could have chosen a smaller codomain. For example, exp can have its codomain as R+ , sin(x) can have [1, 1], and [x] can have Z. Exercise 1.23 Is it possible to shrink the codomains of the following functions: x2 , x3 , cos(x), tan(x), cosh(x), sinh(x), ln(x), sgn(x)? Sometimes we wish to exclude points from the domain even though the rule could be applied to them. For example, suppose we are working with a quantity x of a commodity with price P per unit. Then the total price is given by the function T (x) = P x. In principle, we could take the domain of T to be all of R. But in reality, our x may only take values from N. Then we will choose the smaller set N to be the domain of T . Denition 1.24 Let f : X Y . Let A X. The restriction of f to A is the function f |A : A Y dened by f |A (a) = f (a) for every a A. Exercise 1.25 Consider exp : R R. To what A R should we restrict it so that the output lies in [1, )? Exercise 1.26 Consider exp : R R. To what A R should we restrict it so that the output lies in Z?

You might also like