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

Math Refresher Course July 2023

Refresher 1: Function
Department of Electrical and Computer Engineering National University of Singapore

1.1 Definitions

Given that f : D → R, y = f (x)

• Function f : A rule that assigns to each element in one set, D, a unique element in another set, R.

• Independent variables: The inputs of the function, x.

• Dependent variables: The corresponding outputs, y.

• Image: y is the image of x under f .

• Preimage or inverse image: x is the preimage of y under f .

• Domain: The domain of the function, D, is the input set of the function.

• Range: The range of the function, R, is the corresponding output set of the function.

1.1.1 Mapping Functions

• One-to-one function or injective function: f : D → R is one-one function if it maps distinct


elements in D to distinct elements in R. If f (x1 ) = f (x2 ), then it must be x1 = x2 .

• Onto function or surjective function: f : D → R is onto function if there always exists an element
in D is preimage of the element in R for any y ∈ R.

• One-to-one onto function or bijective function: f : D → R is one-to-one onto function if it is


both injective and surjective. A function f is invertible iff (if and only if ) f is an one-to-one onto
function.

• Many-to-one function: f : D → R is many-to-one function if any element in R of f is the image of


more than one element in the domain, D of f .

1-1
1-2 Refresher 1: Function

1.1.2 Exercise


f1 (x ) = 2x f2 (x ) = x 2 g(x)=± x
1• •4 2• •9 1• •1
3• •6 −2 • •2
•4
2• •2 3• 4• • −2
D R D R D R
(a) (b) (c)


h(x)= x k(x)=x2
1• •2 2• •9
−4 • −2 • • −4
•1 •4
4• 3•
D R D R
(d) (e)

Figure 1.1: What are the mapping functions?

1.2 Function Representations

1. Analytical Method

A(r) = πr2
I(V ) = IS (expV /nVT −1)
Z(x, y) = x2 + y 2

2. Venn Diagram Method

f
1• •2
3• •6
2• •4
A B

Figure 1.2: f : A → B, f (x) = 2x

3. Graphical Method
Refresher 1: Function 1-3

f (x)
4 f (x) = x2

x
1 2 3

Figure 1.3: f : R → R f (x) = x2

4. Tabulation Method

Period 1Q16 4Q15 3Q15 2Q15 1Q15 4Q14 3Q14 2Q14 1Q14 ...
Number of units 2847 3199 4159 4104 2655 2760 3061 4211 2815 ...

Table 1.1: The number of private residential unit transactions in the whole of Singapore

1.2.1 Examples in Real World


• The temperature at which water boils depends on elevation
• The amount by which your savings will grow in a year depends on the interest rate offered by the bank

1.2.2 Exercise
1. Is a circle centered at (-1,0) with radius of 2 a function?

f (x)
2

• x
−2 −1 0 1 2
−1

−2

2. Is f (x) = |x| a function? If so, what is the domain and range of f ?


3. What are the range of the following functions:
1-4 Refresher 1: Function

(a) f (x) = sin(x)


(b) f (x) = log(x)
x+1
(c) f (x) = x−1 , x ∈ R \ {1}
1
(d) f (x) = 1−exp|x|
, x ∈ R \ {0}

1+x 2+x
4. Let f ( 1−x )= 2−x , what is the value of f ( 21 )?

5. Let f : R → R be a function such that f (0) = 1 and for any x, y ∈ R, f (xy+1) = f (x)f (y)−f (y)−x+2
holds, find f (x)

1.3 Inverse Function

Let f : A → B is a one-one onto function or bijective function, every y ∈ B exist a one and only one
corresponding x ∈ A. Then there exits a function, g : B → A and g(f (x)) = x. g can be denoted as f −1 .

f
• •
• •
• •
D R
f −1

Figure 1.4: The function and its inverse function. It is noted that D is the domain of f and the range of
f −1 . Similarly, R is the range of f and the domain of f −1

1.3.1 Exercise

Find the domain, range and inverse function of the following functions:

7x+5
1. f (x) = 3x−7

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

3. f (x) = −x2 + 4x + 5 x≤2

1.4 Composite Function

Let f : A → B and g : B → C. The composite function of f and g is denoted as g ◦ f = g(f (x)). The
composite function only exists provided that the range of f (x) is a subset of the domain of g(x). Rf ⊆ Dg
Refresher 1: Function 1-5

f g
• • •
• • •

• • •
A B C

Figure 1.5: The composite function of f and g, g ◦ f = g(f (x))

1.4.1 Exercise
1. f is a function from X to X, where X is the set X = {3, 7, 9, 11}. If f (3) = 7, f (7) = 9, f (9) = 11,
f (11) = 3, what is the value of x that satisfies (f ◦ f )(x) = 9?
2. Given that f (x) = x2 and g(x) = x + 2, find f ◦ g(x) and g ◦ f (x). Are they the same?
3. Given that f (x) = x2 , g(x) = x + 2, h(x) = 2x, find ((f ◦ g) ◦ h)(x) and (f ◦ (g ◦ h))(x). Are they the
same?
4. The formula, K(C) = C +273, converts Celsius temperature to Kelvin. The formula, C(F ) = 95 (F −32)
converts Fahrenheit temperature to Celsius.
(i) Write a composite function that will convert Fahrenheit temperature to Kelvin and its inverse
function.
(ii) Convert the boiling point of water (212o F) and the freezing point of water (32o F) to Kelvin.

1.4.2 Optional: Electrical Engineering Example

MOSFET I-V characteristic is governed by the following equation,

ID = K(VGS − VT H )2 (1.1)

where K = 1mA/V 2 , VT H = 1V . Define VGS where the current function would have an inverse. You may
assume VGS > 0. Derive the corresponding inverse.

The threshold voltage, VT H is actually defined as follow


p √
VT H = VT HO + γ( VSB + ϕ − ϕ) (1.2)

where VSB is the only variable. Assume the earlier I-V characteristic is f , and the current equation is g,
obtain the corresponding composite equation f ◦ g(VSB ).

1.5 Function Limit

1.5.1 Properties of Limits

Theorem 1.1 Let


lim f (x) = L, lim g(x) = M,
x→c x→c
1-6 Refresher 1: Function

then

1. Constant Rule:
lim k = k
x→c

2. Sum and Difference Rule:


lim [f (x) ± g(x)] = L ± M
x→c

3. Constant Multiple Rule:


lim k f (x) = k L
x→c

4. Product Rule:
lim [f (x) · g(x)] = L · M
x→c

5. Quotient Rule:
f (x) L
lim = M 6= 0
x→c g(x) M

6. Power Rule:
lim [f (x)]n = Ln
x→c

7. Root Rule:
p
n

n
lim f (x) = L L > 0 for even n
x→c

1.5.2 Exercise
p
1. limx→−2 ( (4x2 − 3)

x+x2 −6x3
2. limx→∞ 2x−5x2 −3x3

√ √
2+x− 2
3. limx→0 x

1 3
4. limx→1 ( 1−x − 1−x3 )

1.5.3 The Sandwich Theorem

Theorem 1.2 aka Squeeze Theorem, Pinching Theorem etc.:


If g(x) ≤ f (x) ≤ h(x) for all x in some open interval containing c, except possibly at x = c itself and
limx→c g(x) = limx→c h(x) = L,then
lim f (x) = L
x→c
Refresher 1: Function 1-7

h(x)

L ◦
f (x)

g(x)
x
c

Figure 1.6: The graph for the sandwich theorem. f (x) is sandwiched between g(x) and h(x) at point (c, L).

sin(θ)
Example: limθ→0 θ

y
C
• y
B

O θ x
A sin θ
θ
x

(a) (b)

Figure 1.7: (a)OA = OB = 1 = r, radius of the circle. The angle, ]BOA = θ. M BOA is the inner triangle
and M COA is the outer triangle, CA = OA tan θ. (b)the graph of sinθ θ

From figure 1.7 (a), the sector area of BOA is between the areas of inner triangle and outer triangle:

Area of M BOA < Sector Area of BOA<Area of M COA


1 1 1
× OA × OB sin θ < × r2 × θ < × OA × CA
2 2 2
sin θ < θ < tan θ
θ 1
1< <
sin θ cos θ
sin θ
cos θ < <1
θ

sin(θ)
∵ limθ→0 cos θ = 1. Applying the sandwich theorem, limθ→0 θ =1
1-8 Refresher 1: Function

1.5.4 Existence of The Limit

Theorem 1.3 Two-sided Limit: A limit of a function, f (x), exists as x → c if f its left-hand and right-hand
limits exist and equal:
lim f (x) = L ⇔ lim− f (x) = lim+ f (x) = L (1.3)
x→c x→c x→c

1.5.5 A Limit Problem from Internet

You may see the problem in Figure 1.8. As we know that π 6= 4, what’s wrong with this proof?

Figure 1.8: A Well-known Internet Math Problem.


Given an isosceles right triangle and AB is 2a as showed in figure 1.9, the other two sides are 2a by
Phthagorean Theorem. Let AB divides into two √ equal length, a and form two smaller isosceles right triangle.
The other two sides of the smaller triangles are 22 a. The total length of the equal sides of two isosceles are
√ √ √
2 (triangles) ×2 (sides) × 22 a = 2 2a. The procedure is repeated n. The total length are 2n × 2 × 2n2 a. As
n → ∞, √
n 2 √
lim 2 × 2 × n a = 2 2a 6= 2a
n→∞ 2
. Not surprisingly, the length is still not equal to 2a as n → ∞. Similarly, it explains the problem in Figure
1.8.
Refresher 1: Function 1-9

√ √
√ 2a 2a √ 2a 2a

A 2a B A 2a B

Figure 1.9: A right-angled triangle.

1.5.6 Exercise
1. Apply the Sandwich Theorem, find limx→0 x2 sin( x1 )
sin(x) sin 5x
2. From the example, limx→0 x = 1. Find limx→0 sin 3x .
x
3. Show that f (x) = |x| has no limit as x → 0.

1.6 Curve Sketching and Graph Transformation

Although we can easily plot the graph of a function by many mathematic softwares like MATLAB, Mathe-
matica, Maple etc., curve sketching is still useful for us to have a deeper understanding about the function.
In the following subsections, a variety of functions and their curve sketching techniques will be investigated.

1.6.1 Even and Odd Functions

Example: f (x) = cos(x)

f (x)
1

0 x f (x) = cos(x)
−π − π2 0 π π
2

Figure 1.10: If f (x) = f (−x) , it is a even function. It is symmetrical about the y-axis.

1
Example: f (x) = x
1-10 Refresher 1: Function

f (x)

2
1
f (x) = x

x
−4 −2 2 4

−2

Figure 1.11: If f (x) = −f (−x) , it is an odd function. It is symmetrical about the origin.

1.6.2 Continuous Functions

y−y1
1. Linear Function: y = mx + c, m = x−x1 , ax + by + c = 0

y y y y

y=2
x=2
x x x x
y = 2x + 1 y = −2x + 1

(a) m > 0 (b) m < 0 (c) m = 0 (d) m → ∞

Figure 1.12: Straight Lines: Graph of linear functions

Given two lines, l1 and l2 which have equations y = m1 x + c1 and y = m2 x + c2 respectively,

(a) l1 and l2 are parallel if m1 = m2

(b) l1 and l2 are perpendicular if m1 m2 = −1

2. Polynomial Function
In this section, only polynomial functions that can be reducible to product of linear factors are covered.
The more general form is discussed in differentiation.

Let the degree of the polynomial (the highest power of x) be n and its coefficient be a.
Refresher 1: Function 1-11

y y y x y
(−1, 0) ( 32 , 0) (− 23 , 0) (−1, 0) x

+ 1) 3
x

+ 2x)(x
(2, 0) (3, 0)
x

y = (2
y = x3

y=
(0, 0)

y = −(3
− 3)
(2 −

3 (x
x)
3 (x

+ 1)
−3
)2
(a) y = x3 (b) y = (2 − x)3 (x − 3)2 (c) y = (2x − 3)3 (x + 1) (d) y = −(3 + 2x)(x + 1)3
n is odd, a > 0 n is odd, a < 0 n is even, a > 0 n is even, a < 0
x → ±∞ ⇒ y → ±∞ x → ±∞ ⇒ y → ∓∞ x → ±∞ ⇒ y → ∞ x → ±∞ ⇒ y → −∞
curve opens up curve opens down

Figure 1.13: Different types of graphs of polynonomial functions

3. Logarithms and Exponential Function

y y
x)
ln(2
y=
)
ln(x
y=
p( x )
x)
2 ex
exp(

y = 0.25 ln(x)
y=
y=

5x ) x
(0.2
exp
y=

(a) y = exp(x) (b) y = ln(x)

Figure 1.14: Logarithms and Exponential Functions

1.6.3 Periodic Functions

A periodic function is a function consists of a repeated pattern at regular period. f (x) = f (x ± a) =


f (x ± 2a) = . . .

y
2

x
− 3π −π − π2 π π 3π
2 2 2

−2

Figure 1.15: tan x is periodic function with a period π


1-12 Refresher 1: Function

1.6.4 Inverse Functions

The graph of any invertible function f is the reflection in the line f (x) = f −1 (x) of the graph of its inverse
function f −1 . √
Example: f (x) = x2 and its inverse function f −1 (x) = x for x ∈ R+

x2
)=
x

f (x
=
y
√x
−1 ( x )
=
f

Figure 1.16: The graphs of y = x2 and its inverse function.

1.6.5 Reciprocal Functions

1
If the graph of a function, f (x) is known, the reciprocal graph, f (x) has the following properties

1
1. For any x, f (x) and f (x) have the same sign.

1
2. If f (x) is increasing, then f (x) is decreasing and vice versa.

1
3. If f (x) = ±1, then f (x) = ±1

1
4. If f (x) ± ∞, then f (x) → 0 and vice versa. The sign of ∞ can be determine by the trend of the
function. Refer to Step (2).

1
5. If f (x) has a maximum point at x, then f (x) has a minimum point at x and vice versa.

1 1
Example: f (x) = x2 − 2x − 3 (refer the Figure 1.24(a). Find its reciprocal function f (x) = x2 −2x−3
Refresher 1: Function 1-13

y y

y=(
x−1
x

2
)
(1, −0.25)

−4
x

x2 −2x−3
(−1, 0) (3, 0)

= 1
f (x)
1
(1, −4)

1 1
(a) f (x) = x2 − 2x − 3 (b) f (x)
= x2 −2x−3

Figure 1.17: Graphs of f (x) = x2 − 2x − 3 and its reciprocal function

1.6.6 Modulus Functions

The modulus of a function always has a non-negative range.


Example: |f (x)| = |x|

|f y
(x
)|
=
|x
|

x
=
x)
f(

Figure 1.18: Graphs of f (x) = x and its modulus, |f (x)|

Example: |f (x)| = |x2 − 2x − 3|

|f (x)| = |x2 − 2x − 3|

f (x) = x2 − 2x − 3

Figure 1.19: Graphs of f (x) = x2 − 2x − 3 and its modulus, |f (x)|


1-14 Refresher 1: Function

1.6.7 The curve of y = kxn


1. n ∈ Z+ (Positive Integers)

y y y y
y = −x4 x
y
x = x
−x
3
y = x4 x

x3
y=
(a) y = x4 (b) y = −x4 (c) y = x3 (d) y = −x3
n is even integer, k > 0 n is even integer, k < 0 n is odd integer, k > 0 n is odd integer, k < 0

Figure 1.20: Graphs of f (x) = kxn and n > 0

2. n ∈ Z− (Negative Integers)

y y x y y

y=
1
x3
y=

x x
x4
1
x4
1

y=−

1
x3
x


y=
(a) y = x14 (b) y = − x14 (c) y = x13 (d) y = − x13
n is even integer, k > 0 n is even integer, k < 0 n is odd integer, k > 0 n is odd integer, k < 0

Figure 1.21: Graphs of f (x) = kxn and n > 0

1
3. n ∈ Z+ (Positive Integers)

y 1
y y y
y=x
4

y = −x 31
x x x x
1

y=− 1 y = x3
x 4

1 1 1 1
(a) y = x 4 (b) y = −x 4 (c) y = x 3 (d) y = −x 3
n is even integer, k > 0 n is even integer, k < 0 n is odd integer, k > 0 n is odd integer, k < 0

Figure 1.22: Graphs of f (x) = kxn and n is fraction

1.6.8 Conic Sections

The general equation for conic sections:


ax2 + by 2 + cxy + dx + ey + f = 0 (1.4)
Refresher 1: Function 1-15

Figure 1.23: Four conic sections: Parabola, Circle, Ellipse and Hyperbola

i Parabola

ax2 + dx + ey + f = 0 (1.5)

by 2 + dx + ey + f = 0 (1.6)

Equation 1.5 can be rewritten as a quadratic form:

y = a0 x2 + b0 x + c0

or

y = a0 (x − h)2 + k

where a0 6= 0

y y y
y=
y=(

y=

(x
x

(x −


− 1)

1)
2
1)
2

+3
2

(1, 3)
−4

x x x
(−1, 0) (3, 0) (1, 0)

(1, −4)

(a) y = a0 (x − α)(x − β) (b) y = a0 (x − h)2 (c) y = a0 (x − h)2 + k k > 0


y = (x + 1)(x − 3) y = (x − 1)2 y = (x − 1)2 + 3
b02 − 4a0 c0 > 0 b02 − 4a0 c0 = 0 b02 − 4a0 c0 < 0,

Figure 1.24: For a0 > 0, the parabola curve opens up


1-16 Refresher 1: Function

y y y
(1, 4)

(−1, 0) (3, 0) x (1, 0) x x


(1, −3)

y=
y=

y=

−(
−(x

−(x

x−1

−1
1)

) −
2
2

)2
+4

3
(a) y = a0 (x − α)(x − β) (b) y = a0 (x − h)2 (c) y = a0 (x − h)2 + k k < 0
y = −(x + 1)(x − 3) y = −(x − 1)2 y = −(x − 1)2 − 3
b02 − 4a0 c0 > 0 b02 − 4a0 c0 = 0 b02 − 4a0 c0 < 0

Figure 1.25: For a0 < 0, the parabola curve opens down

Similarly, equation 1.6 can be rewritten as


x = b0 (y − h)2 + k
where b 6= 0

y y y
2 −4 )2
− 1) y−1
x = (y x=( 1)
2 +3
y−
(0, 3) x =(
(−4, 1) x (0, 1) x (3, 1) x

(0, −1)

(a) x = b0 (y − α)(y − β) (b) x = b0 (y − h)2 x = (y − 1)2 (c) x = a0 (y − h)2 + k, k > 0


x = (y + 1)(y − 3) x = (y − 1)2 + 3

Figure 1.26: For b0 > 0, the parabola curve opens right

y y y
x=− x=− x=−
(y − 1 2 (y −
) +4 (y − 1) 2 −
1)2 3
(0, 3)
(4, 1) x (0, 1) x (−3, 1) x
(0, −1)

(a) x = b0 (y − α)(y − β) (b) x = b0 (y − h0 )2 x = −(y − 1)2 (c) x = a0 (y − h0 )2 + k, k > 0


x = −(y + 1)(y − 3) x = −(y − 1)2 − 3

Figure 1.27: For b0 < 0, the parabola curve opens left


Refresher 1: Function 1-17

ii Circle
The general equation of a circle is

x2 + y 2 + dx + ey + f = 0 (1.7)

Equation 1.7 can be written as


(x − h)2 + (y − k)2 = r2
where r 6= 0

y
3

r=1
1 •
(1, 1)
x
−1 0 1 2 3
−1

Figure 1.28: A circle, (x − 1)2 + (y − 1)2 = 1 with center (1, 1) and radius 1

iii Ellipse
The general equation of an ellipse is

ax2 + by 2 + dx + ey + f = 0 (1.8)

where a > 0 and b > 0 Circle can be considered as a special case of ellipse which a = b. Similarly, the
equation 1.8 can be written as
(x − h)2 (y − k)2
+ =1
a02 b02

y
3

2
b=1 a=3
1 •
(1, 1)

0 x
−2 −1 0 1 2 3 4 5
−1

−2
2
Figure 1.29: An ellipse, (x−1)
9 + (y − 1)2 = 1 with center (1, 1). The major axis is the x-axis with length 6
and minor axis is y-axis with length 2
1-18 Refresher 1: Function

iv Hyperbola
The general equation of a hyperbola is

ax2 + by 2 + dx + ey + f = 0 (1.9)

where one of a and b is less than 0. The equation 1.9 can be written as

(x − h)2 (y − k)2
02
− =1
a b02
or
(y − k)2 (x − h)2
− =1
b02 a02

y y
(y
1 −1
) 2−
2 = (x−
1) 9
1) 2 (1, 2)
− =1
(y
2
) −
−1 (1, 1)
(x 9
x
(−2, 1) (1, 1) (4, 1) x (1, 0)

(x−1)2 (x−1)2
(a) 9
− (y − 1)2 = 1 (b) (y − 1)2 − 9
=1

Figure 1.30: Hyperbolae and Their Asymptotes

(x−h)2 (y−k)2
The blue dashed lines in Figure 1.30 are asymptotes. a02 − b02 = 1 can be written as

b0 p
y = ± (x − h)2 − a02 + k
a0 r
b0 a0 2
= ± 0 (x − h) 1 − ( ) +k
a x−1
0
a
As |x| → ∞, ( x−1 )2 → 0, the asymptotes’ equation is

b0
y=± (x − h) + k (1.10)
a0
(y−k)2 (x−h)2
Similarly, the asymptotes’ equation for b02 − a02 = 1 is

a0
x=± (y − k) + h (1.11)
b0

1.6.9 Basic Graph Transformation


1. Translation

(a) Vertical Translation: y = f (x) + a


Refresher 1: Function 1-19

x
+ 2
5
x
2

x2 x

5
Figure 1.31: Vertical Translation: a > 0 shift up and a < 0 shift down

(b) Horizontal Translation: y = f (x + a)

(x + 2

(x −
5)

)2 5

x2 x

Figure 1.32: Horizontal Translation: a > 0 shift left and a < 0 shift right

2. Reflection
(a) Vertical: y = f (−x) reflects about y-axis
(b) Horizontal y = −f (x) reflects about x-axis

y
x
2
y=
y= −
2 x

x
y=
−2 x

Figure 1.33: Reflection

3. Rotation about the origin


x0 = x cos θ − y sin θ (1.12)
y 0 = x sin θ + y cos θ (1.13)
where θ is the rotation angle (anti-clockwise is +ve and clockwise is -ve).
1-20 Refresher 1: Function

45◦
y y y
4 4 4
2 2 2
x x x
−4 −3 −2 −1 1 2 3 4 −4 −3 −2 −1 1 2 3 4 −4 −3 −2 −1 1 2 3 4
−2 −2 −2
−4 −4 −4

(a) Hyperbola curve: x2 − y 2 = 1 (b) After rotate 45◦ , it becomes


2xy = 1 (c) Animation

Figure 1.34: Rotation

1.6.10 General Curve Sketching Techniques


1. Find all intersection points, eg. let x = 0 or y = 0.
2. Find the asymptotes.
3. Find the stationary points, eg. maximum points, minimum points and inflexion points. It usually can
be determined by the first and second derivative of the function.
4. (Optional) Determine the regions of the xy plane where the graph does not exist.

1.6.11 Exercise
1. Sketch the curve, x2 + y 2 + 6x − 8y = 0
3−2x
2. Sketch the curve, y = x−2
x−2
3. Sketch the curve, y = x(x+6)
x−2
4. Sketch the curve, y = | x(x+6) |
|x|−2
5. Sketch the curve, y = |x|(|x|+6)

x(x+6)
6. Sketch the curve, y = x−2
x−2
7. Sketch the curve, y 2 = x(x+6)

8. Sketch the curve, y = 3 − 2 sin 2x

1.6.12 Final Exercise/ Homework


1. What is the domain and range of f (x) = bxc, dxe and [x] (floor function, ceiling and nearest integer
function)? What type of mapping function are they?
x x
2. Is f (x) = 1−2x − 2 an even or odd function?
x3 −3x2 +12
3. Sketch the curve, y = x2 −4

You might also like