Lecture1 Function
Lecture1 Function
Refresher 1: Function
Department of Electrical and Computer Engineering National University of Singapore
1.1 Definitions
• Function f : A rule that assigns to each element in one set, D, a unique element in another set, R.
• 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.
• 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.
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)
1. Analytical Method
A(r) = πr2
I(V ) = IS (expV /nVT −1)
Z(x, y) = x2 + y 2
f
1• •2
3• •6
2• •4
A B
3. Graphical Method
Refresher 1: Function 1-3
f (x)
4 f (x) = x2
x
1 2 3
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.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
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)
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
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
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.
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.
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 ).
then
1. Constant Rule:
lim k = k
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 )
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:
sin(θ)
∵ limθ→0 cos θ = 1. Applying the sandwich theorem, limθ→0 θ =1
1-8 Refresher 1: Function
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
You may see the problem in Figure 1.8. As we know that π 6= 4, what’s wrong with this proof?
√
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
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.
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.
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.
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
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
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=
y
2
x
− 3π −π − π2 π π 3π
2 2 2
−2
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
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
|f y
(x
)|
=
|x
|
x
=
x)
f(
|f (x)| = |x2 − 2x − 3|
f (x) = x2 − 2x − 3
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
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
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.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)
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)
y y y
(1, 4)
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
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)
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)
ii Circle
The general equation of a circle is
x2 + y 2 + dx + ey + f = 0 (1.7)
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
(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
x
+ 2
5
x
2
−
x2 x
5
Figure 1.31: Vertical Translation: a > 0 shift up and a < 0 shift down
(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
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
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)