Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
32 views

Introduction To Functions

1. A function assigns a unique output value to each input value. It can be defined as a set of ordered pairs mapping inputs to outputs. 2. The graph of a function consists of the points (x, f(x)) where x is in the domain of the function. The vertical line test states that the vertical line x=a can only intersect the graph at one point. 3. Operations can be performed on functions, such as addition, subtraction, multiplication, division, composition, shifting, scaling, and reflection. Composition f∘g evaluates f(g(x)) with the domain restricted to values where g(x) is in the domain of f.

Uploaded by

Liu jingyan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Introduction To Functions

1. A function assigns a unique output value to each input value. It can be defined as a set of ordered pairs mapping inputs to outputs. 2. The graph of a function consists of the points (x, f(x)) where x is in the domain of the function. The vertical line test states that the vertical line x=a can only intersect the graph at one point. 3. Operations can be performed on functions, such as addition, subtraction, multiplication, division, composition, shifting, scaling, and reflection. Composition f∘g evaluates f(g(x)) with the domain restricted to values where g(x) is in the domain of f.

Uploaded by

Liu jingyan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

MA2002: Calculus

Introduction to Functions
Definition
Definition
Definition
A function f from a set D to a set Y is a rule that assigns a unique value f (x) in Y to each
x ∈ D.

f
a w
b x
c y
d z
D .. .. Y
. .
Nomenclature
Definition
A function f from a set D to a set Y is a rule that assigns a unique value f (x) in Y to each
x ∈ D.

Remark
(i) A function may be defined as a set of pairs {(a, x), (b, z), (c, x), (d, y ), ...}.
(ii) D is called the domain, Y is called the codomain of the function.
(iii) For every a ∈ D, there must be a unique y ∈ Y such that f (a) = y . f (a) = y is called the
image of a.
(iv) The range R = {f (x) | x ∈ D} of f is a subset of the codomain R ⊆ Y that contains all
the images of f .
(v) In this course, D is always a subset of R and Y = R.
(vi) If the domain of f is not stated explicitly or restricted by context, the domain is assumed
to be the largest set of real x-values for which the formula gives real y -values. This is
called the natural domain of f .
Example
1. f (x) = x 2 , −2 ≤ x ≤ 2.
▶ The domain is [−2, 2].
▶ The range is [0, 4].
2. f (x) = x1 .
▶ The natural domain is R \ {0}.
▶ The range is R \ {0}.

3. f (x) = x.
▶ The natural domain is [0, ∞).
▶ The range is [0, ∞).

4. f (x) = 1 − x 2 .
▶ The natural domain is [−1, 1].
▶ The range is [0, 1].
Example 
0, x < 0
5. Piecewise functions: f (x) = .
1, x ≥ 0
▶ The domain is divided into 2 sets, with a different rule for each sets.
▶ When x < 0, f (x) = 0.
▶ When x ≥ 0, f (x) = 1.

x, x ≥ 0
6. Modulus, or absolute value: f (x) = |x| = .
−x, x < 0
▶ This is a piecewise function.
▶ Examples: |2| = 2 since 2 ≥ 0, |−3| = −(−3) = 3 since −3 < 0.
7. Floor function: f (x) = ⌊x⌋.
▶ ⌊x⌋ = n whenever n ≤ x < n + 1.
▶ Examples: ⌊2.4⌋ = 2, ⌊1.9⌋ = 1, ⌊3⌋ = 3, ⌊−0.3⌋ = −1.
8. Ceiling function: f (x) = ⌈x⌉.
▶ ⌈x⌉ = n whenever n − 1 < x ≤ n.
▶ Examples: ⌈2.4⌉ = 3, ⌈1.9⌉ = 2, ⌈3⌉ = 3, ⌈−0.3⌉ = 0.
Graph of a Function
Graph of a Function

Definition
Let f be a function with domain D. The graph of f consists of the points in the Cartesian
plane (xy -plane, denoted as R2 = R × R),

{(x, f (x)) | x ∈ D)}.

▶ We will (loosely) denote the graph of f as y = f (x).


▶ If (x, y ) is a point on the graph, y = f (x) is the height of the graph above (below,
respectively) the point x if y ≥ 0 (y < 0, respectively).
Example
https://www.geogebra.org/calculator

1. f (x) = x 2
f (x) = x 2 4

−4 −3 −2 −1 1 2 3 4
Example
https://www.geogebra.org/calculator

2. f (x) = |x|.

f (x) = |x| 8

−8 −6 −4 −2 2 4 6 8
−2
Example
https://www.geogebra.org/calculator

3. f (x) = ⌊x⌋.

−3 −2 −1 1 2 3
−1

−2
Verticle Line Test for a Function
▶ For a function f with domain D, and any x ∈ D, there must be a unique y such that
f (x) = y .
▶ For a curve to be the graph of a function, the vertical line x = a must intersect the curve
at a single point (a, f (a)).

Example
The curve is not a graph since the vertical line x = a cuts the curve twice for all a > 0.

3 y2 = x

−1 2 4 6

−3
Operations on Functions
Addition, Subtraction, Multiplication, Division
Binary Operations

Let f be a function with domain Df , and g a function with domain Dg . Define new functions
as follows.
Addition: (f + g )(x)= f (x) + g (x).
Domain of f + g is Df ∩ Dg .

Subtraction: (f − g )(x)= f (x) − g (x).


Domain of f − g is Df ∩ Dg .

Multiplication: (fg )(x)= f (x)g (x).


Domain of fg is Df ∩ Dg .
 
f f (x)
Division: g (x)= g (x) .
f
Domain of g is Df ∩ {x ∈ Dg | g (x) ̸= 0}.
Composition
Definition
Suppose f and g are functions with domains Df and Dg , respectively. The composite function
f ◦ g (“f composed with g ”) is defined by

(f ◦ g )(x) = f (g (x)).

The domain of f ◦ g is the set of x in Dg for which g (x) lies in Df ,

Df ◦g = {x ∈ Dg | g (x) ∈ Df }.

Dg Df
f ◦g
Df ◦g
g f
x g (x) f (g (x))
Example
https://www.geogebra.org/m/jqzvk84g
1. Shifting: Let g (x) = x + k for some constant k ∈ R. Then for any function f (x),
x 3 +x 2 −6x
5
+3
Vertical shift: (g ◦ f )(x) = f (x) + k. 6 x 3 +x 2 −6x
5
+1
Shifts the graph of f up by k units if 3 x 3 +x 2 −6x
5
k > 0. x 3 +x 2 −6x
5
−2
Shifts the graph of f down by |k| units if −4 4 8
k < 0. −3
−6
(x + 3)2(x + 1)2 x 2 6 (x − 2)2
Horizontal shift: (f ◦ g )(x) = f (x + k).
Shifts the graph of f left by k units if
k > 0. 3
Shifts the graph of f right by |k| units if
k < 0.
−6 −4 −2 2 4
Example
https://www.geogebra.org/m/jqzvk84g

2. Scaling: Let g (x) = cx for some positive real number c > 0. Then for any function f (x)

Vertical scaling: (g ◦ f )(x) = cf (x). 6 2 x
Stretches the graph of f vertically by a 4 √
factor of c if c > 1. x
2
1√
Compresses the graph of f vertically by a 3 x
1
factor of c units if 0 < c < 1. 2 4 6 8
−2
1
2 x 2 (2x)2
Horizontal scaling: (f ◦ g )(x) = f (cx). 2x 9
Compresses the graph of f horizontally by
6
a factor of c if c > 1.
3
Stretches the graph of f horizontally by a
factor of c1 units if 0 < c < 1.
−6 −4 −2 2 4
Example
https://www.geogebra.org/m/jqzvk84g

3. Reflection: Let g (x) = −x. Then for any function f (x),


Reflection along the x-axis: (g ◦ f )(x) = −f (x).
Reflection along the y -axis: (f ◦ g )(x) = f (−x).

3 f (x) = x 3 − 4x 2 + 3x

−2 2
f (−x) −f (x)

−3
Example
f (x) = x 3 − 4x 2 + 3x
3
4. Modulus: Let g (x) = |x|. Then for any
function f (x),
Reflecting the negative y :
(g ◦ f )(x) = |f (x)|. −4 −2 2
Symmetric along the y -axis:
(f ◦ g )(x) = f (|x|).
−3

f (|x|) 3
|f (x)| 3

−4 −2 2
−4 −2 2
Question
Let f (x) = x + 1 and g (x) = x 2 . Then (f ◦ g )(x) is
(i) (x + 1)2
(ii) x 2 + 1

This shows that in general, g ◦ f ̸= f ◦ g .


Common Functions
Linear function

Definition
A function of the form f (x) = mx + c, for some m, c ∈ R, is called a linear function.

Remark
(i) m is called the gradient and c is called the y -intercept.
(ii) If m = 0, f (x) = c is called a constant function.
(iii) if m = 1 and c = 0, f (x) = x is called the identity function.
Polynomial
Definition
A function p is a polynomial if it has the expression

p(x) = an x n + an−1 x n−1 + · · · + a1 x + a0 ,

where n is a nonnegative integer and an , an−1 , ..., a1 , a0 ∈ R are real constants.

Remark
(i) All polynomials have natural domain R = (−∞, ∞).
(ii) The integer n is called the degree of p, denoted as deg(p)=n.
(iii) The constant an , an−1 , ..., a1 , a0 ∈ R are called coefficients of the polynomial.
(iv) Linear functions are degree 1 polynomial, with a1 = m and a0 = c.
(v) Degree 2 polynomials are called quadratic functions, degree 3 polynomials are called cubic
functions, degree 4 polynomials are called quartic functions,... .
Example
Rational Functions

Definition
A rational function is a quotient of polynomials,

p(x)
f (x) = ,
q(x)

where p(x) and q(x) are polynomials.

Remark
(i) The natural domain of a rational function is the set of all reals x for which q(x) ̸= 0,
{x | q(x) ̸= 0}.
(ii) Polynomials are rational function with q(x) = 1.
Example

The straight red lines approached by the graphs are called asymptotes and are not part of the
graphs.
Algebraic Functions

Definition
Any function constructed from polynomials using the following algebraic operations
(i) addition,
(ii) subtraction,
(iii) multiplication,
(iv) division,
(v) taking roots,
lies within the class of algebraic functions.

Remark
Rational functions are algebraic functions.
Transcendental Functions
Functions that are not algebraic are known as transcendental functions.
Example
1. Trigonometric functions
sin(x), cos(x), tan(x), ...

2. Inverse trigonometric functions

sin−1 (x), cos−1 (x), tan−1 (x), ...

3. Exponential functions
ax , e 2x , 10−x , ...

4. Logarithmic functions
loga (x), ln(x), lg(x), ...

5. Hyperbolic functions
sinh(x), cosh(x), tanh(x), ...
Injective and Inverse
Injective
Definition
A function f is injective (or one-to-one) on a domain D if f (x1 ) ̸= f (x2 ) whenever x1 ̸= x2 in
D.

Equivalently, whenever f (x1 ) = f (x2 ), it must be that x1 = x2 in D.

f
x1 y1
x2 y2
x3 y3
x4 y4
D .. ..
. .
Example
x2
2
1. f (x) = x is not injective in its natural domain
R.
2. f (x) = x 2 is injective in the domain [0, ∞).

3. f (x) = 2x is injective on its natural domain R.


2x

Remark
Horizontal line test for injectivity.
A function y = f (x) is injective if and only if its graph intersects each horizontal line y = b at
most once.
Inverse
Definition
Suppose that f is an injective function on a domain D with range R. The inverse function f −1
is defined by
f −1 (b) = a if f (a) = b.
The domain of f −1 is R and the range of f −1 is D.

Theorem
(i) (Inverse is unique) If g1 and g2 are inverses of f , then g1 = g2 .
(ii) g is the inverse of f if and only if (g ◦ f )(x) = x = (f ◦ g )(x) are the identity functions.

Proof.
Exercise.

Caution
−1 1
f −1 (x) ̸= (f (x)) = .
f (x)
Finding the Inverse of a Function
Solve for x in terms of y (make x the subject of Reflecting along the line y = x.
the formula).
x = 12 y + 1
1
1. y = 2x + 1.
1
2x +1

y =x

x2

2. y = x 2 , x ≥ 0. x

y =x
Transcendental Functions
Trigonometric Functions
Definition
For any angle θ, let lθ be the ray starting from the origin, such that the angle between lθ and
positive x-axis is θ. Let C be the circle of radius 1 centered at the origin. Let (xθ , yθ ) be the
point of intersection between lθ and C ,

lθ ∩ C = {(xθ , yθ )}.

Define the cosine of θ to be


C 1 (cos(θ), sin(θ))

cos(θ) = xθ ,

the sine of θ to be
θ
sin(θ) = yθ , xθ
−1 1
and the tangent of θ to be

sin(θ) (2k + 1)π


tan(θ) = , θ ̸= , k ∈ Z. −1
cos(θ) 2
Graph of trigonometric Functions

Cosine graph
https://www.geogebra.org/m/MjFgAfBv

Sine graph
https://www.geogebra.org/m/S2gMrkbD
Reciprocal of trigonometric Functions

Definition
Secant:
1 (2k + 1)π
sec(θ) = , θ ̸= , k ∈ Z.
cos(θ) 2

Cosecant:
1
csc(θ) = , θ ̸= kπ, k ∈ Z.
sin(θ)

Cotangent:
1 cos(θ)
cot(θ) = = , θ ̸= kπ, k ∈ Z.
tan(θ) sin(θ)
Arc trigonometric Functions

Definition
Arccosine:
cos−1 (θ) = inverse of cos .

Arcsine:
sin−1 (θ) = inverse of sin .

Arctangent:
tan−1 (θ) = inverse of tan .

Exercise: Restrict the domains so that the arc trigonometric functions are well-defined.
Trigonometric Identities
(By Pythagoras theorem)

cos2 (θ) + sin2 (θ) = 1


1 + tan2 (θ) = sec2 (θ)
cot2 (θ) + 1 = csc2 (θ)

(Additional Formula)

cos(A + B) = cos(A) cos(B) − sin(A) sin(B)


sin(A + B) = sin(A) cos(B) + cos(A) sin(B)

(Double Angle Formula)

sin(2θ) = 2 sin(θ) cos(θ)


cos(2θ) = cos2 (θ) − sin2 (θ)
= 2 cos2 (θ) − 1
= 1 − 2 sin2 (θ)

Exercise: Derive the above formulas.


Trigonometric Identities

(Product-Sum Identities)

2 sin A+B A−B


 
sin(A) + sin(B) = 2  cos 2 
cos(A) + cos(B) = 2 cos A+B
2  cos
A−B
2 
sin(A) − sin(B) = 2 cos A+B
2 sin
A−B
2
−2 sin A+B A−B

cos(A) − cos(B) = 2 sin 2

(Product Identities)
sin(A+B)+sin(A−B)
sin(A) cos(B) = 2
cos(A+B)+cos(A−B)
cos(A) cos(B) = 2
cos(A−B)−cos(A+B)
sin(A) sin(B) = 2

Exercise: Derive the above formulas.


Exponential Functions

Definition
The exponential function with base a is the function

f (x) = ax ,

where a > 0.

Remark
If a = 1, then f (x) = 1 is a constant function. So, may assume a ̸= 1.
Question
Match the exponential function to its graph.
40
(i) f (x) = 10x
20

−6 −4 −2 2 4
(a)
1 x

(ii) f (x) = 3 40
20

−6 −4 −2 2 4
(iii) f (x) = e x , where e ≈ 2.718281828459045 (b)
is the Euler’s (or natural) number. 40
20

−6 −4 −2 2 4
(c)
Rules for Exponents

For a, b > 0, and any real numbers x, y ,


1. ax · ay = ax+y ,

ax
2. ay = ax−y ,

y
3. (ax ) = axy ,

4. ax · b x = (ab)x ,

ax a x

5. bx = b
Logarithmic Functions

Definition
The logarithm function with base a, denoted as

y = loga (x),

is the inverse of the exponential function ax with base a.

Remark
(i) Similarly, we will require a > 0 and a ̸= 1.
(ii) loga (x) = y ⇔ x = ay .
(iii) lg(x) := log10 (x) is the logarithmic function with base 10.
(iv) ln(x) := loge (x), called the natural log, is the logarithmic function with base e, the Euler
(or natural) number.
(v) The natural domain of loga (x) is R+ = (0, ∞).
Properties of Logarithmic Functions

Algebraic properties
1. (Product rule) loga (x1 x2 ) = loga (x1 ) + loga (x2 )
 
2. (Quotient rule) loga xx21 = loga (x1 ) − loga (x2 )

3. (Power rule) loga (x c ) = c loga (x)

Inverse properties
1. loga (a) = 1
2. aloga (x) = x
3. loga (ax ) = x

Change of base formula


logb (x)
1. loga (x) = logb (a)
Special Types of Functions
Odd and Even Functions

Definition
A function f is an
even function of x if f (−x) = f (x),
odd function of x if f (−x) = −f (x),
for every x in the function’s domain.

Example
1. f (x) = x is an function.

2. f (x) = x 2 is an function.
 
 
3. f (x) = x n is an function if n is .
 
Question

A polynomial with odd degree is an odd function. True or False?

Exercise: Which trigonometric functions are odd functions, which are even?
Increasing and Decreasing Functions

Definition
Let f be a function defined on an interval I and let x1 and x2 be two distinct points in I .
If f (x1 ) < f (x2 ) whenever x1 < x2 , then f is said to be increasing on I .
If f (x1 ) > f (x2 ) whenever x1 < x2 , then f is said to be decreasing on I .
A function that is increasing or decreasing on I is said to be monotonic on I .

Remark
We say that a function is non-decreasing if f (x1 ) ≤ f (x2 ) whenever x1 < x2 , and a function is
non-increasing if f (x1 ) ≥ f (x2 ) whenever x1 < x2 .
Question

1. Is it possible to have an odd increasing function?

2. Is it possible to have an even increasing function?

You might also like