Dylan S Primeri Handouts-7

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Functions

Dylan Yu
primeri.org

Contents

1 Introduction 2
1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Existence of a Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Combinations of Functions 3
2.1 Domain and Range of a Composite Function . . . . . . . . . . . . . . . . . 3

3 Types of Functions 4
3.1 Piecewise-Defined Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

4 Properties of Functions 5
4.1 Odd and Even Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.2 Periodic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

5 Inverse Functions 7
5.1 Existence of an Inverse Function . . . . . . . . . . . . . . . . . . . . . . . . . 7

6 Common Problem Types 8


6.1 Recursive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
6.2 Functional Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

7 An Instructive Example 9

8 Exercises 11

1
Dylan Yu (primeri.org) Functions

§1 Introduction
Functions are a staple of mathematics, both in normal school mathematics and contest
mathematics. Knowing how to deal with functions is a key part of dealing with math
competition algebra problems in general.

§1.1 Definitions
Function
A function f from a set X to a set Y is a relation that assigns to each element in set X
exactly one element in set Y.

Domain
The domain is the set of X (a.k.a. the input).

Range
The range is the set of Y (a.k.a. the output).

§1.2 Existence of a Function


Theorem 1.4 (Vertical Line Test)
If you can draw a vertical line that passes through more than one point of a relation
on a graph, it is not a function. If you cannot, it is a function.

Of course, assume that you aren’t bound to physical constraints, like getting tired from
drawing a long line.

Example 1.5 √
What are the domain and range of the function f ( x ) = 16 − x2 ?

Solution. Note that if a < 0, then a is undefined for reals. Thus, 16 − x2 ≥ 0 =⇒
−4 ≤ x ≤ 4 . Since x2 ≥ 0, we have that 0 ≤ 16 − x2 ≤ 16, so the range is 0 ≤ y ≤ 4 .

Example 1.6 √
x −10
What is the domain of the function f ( x ) = x −15 ?

Solution. The numerator tells us that x ≥ 10 and the denominator tells us x 6= 15. Thus,
in interval notation we have [10, 15) ∪ (15, ∞) .

Example 1.7
What is the range of the function f ( x ) = 3| x − 5| − 4?

Solution. We know that | x − 5| ≥ 0, so 3| x − 5| − 4 ≥ 3 · 0 − 4 = −4. Thus, [−4, ∞) is


our range.

2
Dylan Yu (primeri.org) Functions

§2 Combinations of Functions
Theorem 2.1 (Common Function Combinations)
The following are some common combinations of functions:

1. Sum: ( f + g)( x ) = f ( x ) + g( x )

2. Difference: ( f − g)( x ) = f ( x ) − g( x )

3. Product: ( f g)( x ) = f ( x ) · g( x )
 
f f (x)
4. Quotient: g ( x ) = g(x) , where g( x ) 6= 0

5. Composition: ( f ◦ g)( x ) = f ( g( x ))

Example 2.2
If f ( x ) = 2x + 3 and g( x ) = 2x − 3, then what is ( f g)(4)?

Solution. Note that ( f g)( x ) = (2x + 3)(2x − 3). Thus, ( f g)(4) = (11)(5) = 55 .

§2.1 Domain and Range of a Composite Function


Composite Function
A composite function is a function within another function, e.g. f ( g( x )).

Domain of Composite Function


The domain of a composite function is the intersection of domains of the starting
and final function.

Range of Composite Function


The range of a composite function is the range of the final function restricted by the
starting function.

Theorem 2.6 (Horizontal Asymptote of Rational Functions)


Let f ( x ), g( x ) be polynomials, deg f ( x ) = a, deg g( x ) = b, and the leading term of
f ( x ), g( x ) has coefficient c, d, respectively.

1. a > b. Then there is no horizontal asymptote – instead, there is a slant asymp-


f (x)
tote, which is the quotient of g(x) (i.e. q( x ), where f ( x ) = g( x )q( x ) + r ( x ),
deg r ( x ) < deg q( x )).

2. a = b. The horizontal asymptote is y = dc .

3. a < b. The horizontal asymptote is y = 0.

3
Dylan Yu (primeri.org) Functions

Example 2.7
Let f ( x ) = x+1 2 and g( x ) = x−x 3 . Then g( x ) is the starting function and f ( g( x )) is the
final function. Find the domain of f ( g( x )).

Solution. Note that


1 x−3
f ( g( x )) = x = ,
x −3+2 3( x − 2)
x
so x 6= 2, but g( x ) = x −3 , so x 6= 3, implying the domain is x 6= 2, 3 .

Example 2.8
Using the same functions as the example above, find the asymptotes and range of
f ( g( x )).

x −3
Solution. Since f ( g( x )) = 3( x −2)
, the vertical asymptote is x = 2 . The horizontal
1
asymptote is y = as per the rules above. Since 3(xx−−32) passes through (3, 0), but x
3
cannot be 3 since it is undefined for g( x ), and nothing else passes through the x-axis, y =
0 is not in the range. The horizontal asymptote tells us that it does not pass through y = 31 ,
   
1 1
and all other values work, so the range of f ( g( x )) is (−∞, 0) ∪ 0, ∪ ,∞ .
3 3

Example 2.9 √
If f ( x ) = x and g( x ) = x − 1, what is the domain and range of ( g ◦ f )( x )?

Solution. Note that ( g ◦ f )( x ) = x − 1. It is obvious that x ≥ 0, and all other values

work, so the domain is [0, ∞) . Since x ≥ 0, we have ( g ◦ f )( x ) ≥ −1, with no other
restrictions, so the range is [−1, ∞) .

Example 2.10
If f ( x ) = 1x and g( x ) = 1
x −1 , what is the domain and range of ( g ◦ f )( x )?

1 x
Solution. Note that ( g ◦ f )( x ) = 1 = 1− x . Note that x cannot be 0, since f (0)
x −1
is undefined, and x cannot be 1, since g( f (1)) is undefined. Thus, the domain is
(−∞, 0) ∪ (0, 1) ∪ (1, ∞) . The vertical asymptote is x = 1 and the horizontal asymptote
is y = −1, and x 6= 0 so y 6= 0, implying the range is (−∞, −1) ∪ (−1, 0) ∪ (0, ∞).

§3 Types of Functions
§3.1 Piecewise-Defined Function
Piecewise Function
A piecewise function is a function that is defined by two or more equations over a
specified domain.

4
Dylan Yu (primeri.org) Functions

Example 3.2 (Absolute Value is Piecewise)


Let f ( x ) = | x |. Then (
x x≥0
f (x) = .
−x x < 0

Let’s try a few examples.

Example 3.3
What are the domain and range of the piecewise function as follows?
(
x2 + 1 x < 0
f (x) = .
x−1 x ≥ 0

Solution. The domain includes x < 0 and x ≥ 0, which is all values, so the domain is
(−∞, ∞) . For x ≥ 0, we have f ( x ) = x − 1, so the range there is y ≥ −1. For x < 0,
we have f ( x ) = x2 + 1, so x2 > 0, implying the range there is y > 1. Thus, the range
together is [−1, ∞) .

§4 Properties of Functions
§4.1 Odd and Even Functions
Even
A function f is even if f ( x ) = f (− x ).
6
y

x
−6 −4 −2 2 4 6

Figure 1: Graph of an even function.

Odd
A function f is odd if f ( x ) = − f (− x ).
6
y
4

2
x
−6 −4 −2 2 4 6
−2

−4

−6

Figure 2: Graph of an odd function.

5
Dylan Yu (primeri.org) Functions

Note that:
• reflecting an even function across the y-axis yields the same function, and

• rotating an odd function across the x-axis also yields the same function.

Theorem 4.3 (Parity of Functions Comes From Its Components)


If h( x ) = f ( x ) + g( x ), then h( x ) is even if f ( x ) and g( x ) are both even, and h( x ) is
odd if f ( x ) and g( x ) are both odd.

Example 4.4
Is f ( x ) = x3 − 2x odd, even, or neither?

Solution. Note that f (− x ) = − x3 + 2x = − f ( x ), implying it is odd .

§4.2 Periodic Functions


Periodic
A function f is periodic if there exists a number p such that

f ( x + p) = f ( x )

for all numbers x.

Fundamental Period
The smallest period is called the fundamental period of the function.

Theorem 4.7 (Periodic Function Transformations)


If a periodic function f has period p, then y = c f ( x ) still has period p, and y = f (cx )
p
has period c .

Note that the smallest period is simply called the period.

Theorem 4.8 (Period of Trigonometric Functions)


The period of f ( x ) = a sin(bx + c) + d, f ( x ) = a cos(bx + c) + d, a csc(bx + c) + d,
and a sec(bx + c) + d are all 2πb . Furthermore, the period of a tan( bx + c ) + d and
a cot(bx + c) + d are both πb .

Corollary 4.9
The periods of sin( x ), cos( x ), csc( x ), sec( x ) are all 2π. The periods of tan( x ), cot( x )
are both π.

Example 4.10
If a function f ( x ) = sin x has period 2π, then what is the period of the function
f ( x ) = −3 sin 3x?


Solution. The period is .
3
6
Dylan Yu (primeri.org) Functions

§5 Inverse Functions
Inverse Function
An inverse function is a function that reverses function f .

If f is a function mapping x to y, then the inverse function of f maps y back to x. The


inverse function of f is usually denoted by f −1 . Do not confuse it with 1f .

Fact 5.2. If f −1 exists, then f −1 ( f ( x )) = f ( f −1 ( x )) = x.

Fact 5.3. The graph of the inverse is the graph of the function reflected across y = x.

Example 5.4
If f ( x ) = x + 5 : {(1, 6), (2, 7), (3, 8), (4, 9)}, then f −1 ( x ) = {(6, 1), (7, 2), (8, 3), (9, 4)}.

Taking the inverse is not particularly hard, but there are some things to pay attention
to.

Example 5.5
3x −5
What is the inverse function of f ( x ) = 2 ?

3y−5 2x + 5
Solution. If we switch x and y we get x = 2 =⇒ f −1 ( x ) = .
3

Example 5.6
If f (4) = 35, then what is f −1 (35)?

Solution. The x- and y-values have been switched, so the answer is 4 .

§5.1 Existence of an Inverse Function


One-to-One
If a function satisfies the property that each x-value corresponds to one y-value, and
each y-value corresponds to one x-value, then the function is one-to-one.

Theorem 5.8 (Inverse Function Criterion)


If a function f is one-to-one, then its inverse is a function. More specifically, f is
one-to-one if f is increasing/decreasing on its entire domain.

Theorem 5.9 (Horizontal Line Test)


If you can draw a horizontal line passing through more than one point of a function
on a graph, its inverse is not a function. If you cannot, it is a function.

This makes a lot of sense, since the graph of the inverse is just the function flipped
across the y = x line. This also makes it a lot easier to draw graphs.

7
Dylan Yu (primeri.org) Functions

Example 5.10 √
Does the function f ( x ) = x − 2 + 3 have an inverse function?

Solution. It passes the Horizontal Line Test, as seen below:

6
y

x
−1 1 2 3 4 5 6


Figure 3: f ( x ) = x − 2 + 3 passes the Horizontal Line Test.

Example 5.11
Does the function g( x ) = | x + 3| have an inverse function?

Solution. It does not pass the Horizontal Line Test, as seen below:

6
y

x
−6 −4 −2 2 4 6

Figure 4: g( x ) = | x + 3| does not pass the Horizontal Line Test.

§6 Common Problem Types


§6.1 Recursive Functions
Recursive Function
A recursive function is a function that relies on previous values of the function.

Usually, these have a domain of N. There are a few types of these problems:

1. Engineer’s Induction: there is usually a pattern to find. Specifically, there could


be an obvious period of the function (this is indicated when the goal is to compute
some arbitrary f ( a) where a is large), or it could just be a well-known function
8
Dylan Yu (primeri.org) Functions

(i.e. 2x , x2 , ax + b, etc.). Warning: engineer’s induction is known to sometimes fail.


You can usually trust after 5-6 steps, and it has to make sense with the context of
the problem (e.g. if the graph of weight of tomatoes vs. cost of tomatoes is quintic
by engineer’s, there’s probably something weird going on).

2. Symmetric Functions: there are rigid properties given about the function and
the task is again to find some arbitrary value. The idea is to take advantage
of symmetry, and furthermore, see if stuff telescopes. It is important to note
∑bk=a ( f (k + 1) − f (k )) = f (b + 1) − f ( a).
The trick for both of these to try small cases.

§6.2 Functional Equations


These overlap heavily with recursive functions. The main difference is that they care less
about the values and more about the overall function itself. Again, there a few types:

1. Baby FEs: similar to symmetric functions. For example,


  
k
a( f ( x )) + b f = g ( x ),
x

where a, b, k are constants, and f ( x ), g( x ) are functions. Note that g( x ) is usually


given. The idea is to plug in values that give us as little (distinct) variables as
possible. In this specific case, the solution is

a( g( x )) − b( g( xk ))
f (x) = .
a2 − b2

2. Teen FEs1 : this is best explained using an example.

Find all function in the domain or reals, such that for all real x and y we have

y f (2x ) − x f (2y) = 8xy( x2 − y2 ).

The idea here is to rewrite this in a form where

g( a) = g(b)
f (x)
for some g. In this case, g( x ) = x − x2 . By getting that g is constant, we can then
derive f .

§7 An Instructive Example
Now that we’ve gone over two major problem types, let’s do an example before we
move on to the problem set. This is a really cool example because it allows us to try both
types of problems (recursive functions and functional equations).

1 Also known as easier olympiad FEs.


9
Dylan Yu (primeri.org) Functions

Example 7.1 (AMC 10B 2018/20)


A function f is defined recursively by f (1) = f (2) = 1 and

f ( n ) = f ( n − 1) − f ( n − 2) + n

for all integers n ≥ 3. What is f (2018)?

Let’s start by trying to solve the problem using the methods we’ve highlighted for
"recursive functions" as we are explicitly told that the function f is defined recursively.

Solution. Let’s try to think of this using Engineer’s Induction. Let’s start by listing out
the first few values of the function. Starting at n = 1 and going upward, we have:

1, 1, 3, 6, 8, 8, 7, 7, 9, 12, 14, 14, 13, 13, 15

A pattern that seems to appear is that for odd multiple of 3 n, f (n) = n, and after this n,
f (n + 1) = n + 3, f (n + 2) = n + 2, f (n + 3) = n, f (n + 4) = n − 1, and f (n + 5) = n.
Applying this logic for 2018 yields:

f (2018) = 2017

The second way to solve this problem invokes the second time of common functions
problem, which is functional equations.

Solution. Using a technique highlighted in the past section, let’s start by getting some
related equations and then adding them to cancel out terms:

f ( n ) = f ( n − 1) − f ( n − 2) + n

f ( n − 1) = f ( n − 2) − f ( n − 3) + n − 1
These add to:
f (n) = 2n − 1 − f (n − 3)
Using this to create more related equations to add yields:

f (n) + f (n − 3) = 2n − 1

f (n + 3) + f (n) = 2n + 5
Subtracting the first equation from the second equation gives:

f ( n + 3) − f ( n − 3) = 6

We can repeat this strategy yet again (by now the strategy here seems to be clear: get
equations, cancel things out) to get:

f (2018) − f (2012) = 6

f (2012) − f (2006) = 6
...
f (8) − f (2) = 6
10
Dylan Yu (primeri.org) Functions

Adding all of this yields:


f (2018) − f (2) = 2016
We know that f (2) = 1, so:
f (2018) = 2017

It’s fairly clear why this is an illustrative example, because it shows both of our main
problem solving techniques for functions related problems. This is a fairly good example
of applying the techniques from both types of problems in different ways to solve the
problem.

§8 Exercises
Exercise 8.1 (Harold Reiter). Let

| x | − 2 if x ≤ 0

g( x ) = x − 3 if 0 < x < 4

3−x if 4 ≤ x

Find a number x such that g( x ) = −4.

Exercise 8.2 (Harold Reiter). Consider the function F : N → N defined by


(
n
if n is a multiple of 3
F (n) = 3
2n + 1 if otherwise

For how many positive integers k is it true that F ( F (k )) = k?

Exercise 8.3 (Harold Reiter). Suppose f (0) = 3 and f (n) = f (n − 1) + 2. Let T = f ( f ( f ( f (5)))).
What is the sum of the digits of T?

Exercise 8.4. Suppose f is a real function satisfying f ( x + f ( x )) = 4 f ( x ) and f (1) = 4. What is


f (21)?

x
Exercise 8.5 (AMC12 2000). Let f be a function for which f = x2 + x + 1. Find the sum
3
of all values of z for which f (3z) = 7.

11
Dylan Yu (primeri.org) Functions

Exercise 8.6 (AMC12A 2002). The graph of the function f is shown below. How many solutions
does the equation f ( f ( x )) = 6 have?
y
(-2, 6) 6 (1, 6)

−7 −6 −5 −4 −3 −2 −1 1 2 3 4 5 6
−1
x
−2

−3

(-7, -4) −4

−5

−6 (5, -6)

Exercise 8.7 (AMC12A 2006). The function f has the property that for each real number x in
its domain, 1/x is also in its domain and
 
1
f (x) + f = x.
x

What is the largest set of real numbers that can be in the domain of f ?

Exercise 8.8 (AMC12B 2010). Monic quadratic polynomials P( x ) and Q( x ) have the prop-
erty that P( Q( x )) has zeros at x = −23, −21, −17, and −15, and Q( P( x )) has zeros at x =
−59, −57, −51 and −49. What is the sum of the minimum values of P( x ) and Q( x )?

Exercise
( 8.9 (AIME 1984). The function f is defined on the set of integers and satisfies f (n) =
n−3 if n ≥ 1000
f ( f (n + 5)) if n < 1000

Exercise 8.10 (AIME 1988). The function f , defined on the set of ordered pairs of positive
integers, satisfies the following properties:

f ( x, x ) = x,
f ( x, y) = f (y, x ), and
( x + y) f ( x, y) = y f ( x, x + y).

Calculate f (14, 52).

Exercise 8.11 (AIME 1994). The function f has the property that, for each real number x,

f ( x ) + f ( x − 1) = x 2 .

If f (19) = 94, what is the remainder when f (94) is divided by 1000?

12
Dylan Yu (primeri.org) Functions

ax +b
Exercise 8.12 (AIME 1997). The function f defined by f ( x ) = cx +d , where a,b,c and d are
nonzero real numbers, has the properties f (19) = 19, f (97) = 97 and f ( f ( x )) = x for all values
except −cd . Find the unique number that is not in the range of f .

13

You might also like