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

Functions of One Variable

[SHS] Chapter 4

1
Intervals
 A set is a collection of objects. Each object in the set is called
an element of the set.

 An interval is a set of (real) numbers between, and possibly including,


two numbers.
 The interval from a to b is denoted as follows:

 [a, b] if a and b are included (i.e. [a, b] = {x: a ≤ x ≤ b})

 (a, b) if neither a nor b is included (i.e. (a, b) = {x: a < x < b})

 [a, b) if a is included but b is not

 (a, b] if b is included but a is not.

 (a, b), which does not contain its endpoints, is an open interval,
whereas [a, b], which does contain its endpoints, is a closed interval.
 The intervals (a, b] and [a, b) are neither open nor closed.

2
Open and Closed Interval -- interior point &
boundary point
 x is an interior point of an interval I if there is a number ε > 0 such that
all points within the distance ε of x are members of I.
 ε-neighbourhood of x -- open interval centered at x with radius ε

 the open interval of all points whose distance from x is less than ε:
N(x, ε) = (x-ε,x+ε)
 x is an interior point of an interval I if there exists an

ε-neighbourhood of x which is contained in I.


 An interval is open if it contains only of interior points.

 x is a boundary point of an interval I if for every number ε > 0


(however small), at least one point within the distance ε of x is in I, and
at least one point within the distance ε of x is outside I.
 x is a boundary point of I if and only if every ε-neighbourhood

of x contains at least one point in I and at least one point not in I.


 An interval is closed if it contains all its boundary points.
3
Open and Closed Interval (cont.)
 We use the special symbol "∞" ("infinity") in the notation for intervals
that extend indefinitely in one or both directions, as illustrated in the
following examples.
 (a, ∞) is the interval {x: a < x}.

 (−∞, a] is the interval {x: x ≤ a}.

 (−∞, ∞) is the set of all numbers.

 (a, ∞) is considered to be open.


 (−∞, a] is considered to be closed (even though it does not contain
its left endpoint).
 (−∞, ∞) is considered to be both open and closed.

4
Closed and Bounded – Compact
 An interval is said to be left-bounded if there is some real number
smaller than all its elements.
 An interval is said to be right-bounded if there is some real number
larger than all its elements.

 An interval is said to be bounded if it is both left- and right-bounded.


 An interval is said to be unbounded otherwise.

 Bounded intervals are also commonly known as finite intervals.

 NOT extend "infinitely" in any direction.

 If an interval is closed and bounded, then the interval is called


compact.

5
Functions
 A function is a rule that associates with every point in some set A, a
single point in another set B. A is called the domain of the function.
 A function with domain A is said to be defined on A.

 We write “ f : A → B ”.

 To specify a function we need to specify the domain and the rule.

 e.g. Domain: (−∞, ∞). Rule: f (x) = x2.

 Rule of one-to-many: NOT a function

 e.g. rule that assigns the perimeter of a rectangle to its area

 The domain consists of all values of independent variable for which


the formula gives a unique value, unless otherwise specified.
 Natural domain (or the largest possible domain)

 Example: f(x) = 1/x

 Domain: R \ {0}

 Example: cost function -- C(Q) = 100+Q2

 Natural domain: R

 Domain: Q ≥ 0
6
Functions
 The number that a function associates with a given member x of its
domain is called the value of the function at x.

 As x varies over all points in the domain of a function, the value of


the function may (and generally does) vary. The set of all such
values of the function is called the range of the function.
 e.g. Domain: (−∞, ∞). Rule: f (x) = x2. Range: [0, ∞).

 Graphs: the set of all points (x, f(x))


 Cartesian coordinate system

 Exercise: Find the domain and range of h( x) = ( x − 3)(5 − x) .


 Hint: completing the square!

− 4ac
2
 
2
b b
ax 2 + bx + c= a  x +  −
 2 a  4a
7
Some Important Functions -- Polynomials
 Linear functions: f ( x=
) ax + b
 e.g. budget constraint – P X + P Y =
M
X Y

Quadratic functions: f ( x) = ax + bx + c (a ≠ 0)
2

 Completing the square

Cubic functions: f ( x) = ax + bx + cx + d (a ≠ 0)
3 2

 cubic cost function

C (Q) =
Q 3 − 30Q 2 + 400Q + 100
 …

 General polynomial of degree n


f ( x) = an x n + an −1 x n −1 +  + a2 x 2 + a1 x + a0 (an ≠ 0)
 an expression of finite length constructed from variables and
constants, using only the operations of addition, subtraction,
multiplication, and non-negative integer exponents
8
Some Important Functions (cont.)
 Power functions:
= f ( x) Ax r ( x > 0, r and A are any constants)
 e.g. f ( x) = x

 Exponential functions:
f ( x) = Aa x (a and A are positive constants)
 Compound interest arises when interest is added to the
principal, so that from that moment on, the interest that has been
added also itself earns interest.
 Reinvestment:= At A0 (1 + r )t (r is the insterest rate per period)

 Example: Suppose $1000 is deposited at time t=0, and per annum


interest rate is 8%. If interest is drawn and added the principle
annually, then in eighteen years, we have
y (18) =1000 (1 + 0.08 )
18
= $3996.02
 compounded yearly
9
Compound interest -- example
 Example (cont.): Suppose $1000 is deposited at time t=0, and per
annum interest rate is 8%. If interest is drawn and added the principle
monthly, then in eighteen years, we have
12×18
1000 (1 + 0.08 / 12 )
y (18) = =
$4200.57
 Exercise: compounded daily?
 Compounded hourly, minutely, …, compounded continuously?

 Natural growth – growing all the time!

 Natural exponential function: f ( x=) e=x


exp( x)
 e=2.71828182845905…

 With continuous compounding of interest, the principal increase each


period by a fixed factor e r , where r is the per period interest rate.

 Example (cont.): Suppose $1000 is deposited at time t=0, and per


annum interest rate is 8%. If interest is drawn and added the principle
continuously, then in eighteen years, we have
( )
18
= =
y (18) 1000 e 0.08
$4220.70
10
Some Important Functions (cont.)
 Reinvestment: =At A0 (1 + r )t (r is the insterest rate per period)
 Doubling time: 2= (1 + r )t

 Logarithmic functions: e ln x =x
 ln x is the power of e we need to get x.
 Inverse of the natural exponential function

 Natural logarithm

 Bases other than e: a


log a x
=x

 Doubling time: ln 2 =ln(1 + r )t ⇒


= t* ln 2 / ln(1 + r )
ln 2 0.7 70
=t* ≈ = Here, ln(1 + r ) ≈ r (if r small)
ln(1 + r ) r 100r
 r=1%, t*≈ 70; r=2%, t*≈ 35; …; r=8%, t*≈ 9; …

11
Limits of a Function,
Continuity

[SHS] 6.5 & 7.8 – 7.9

12
Limits
 A "limit" is used to describe the value that a function "approaches" as
the input approaches some value.

lim x→ x0 f ( x) = ?
 the behavior of a function f(x) around a certain point, say x0, rather
than its value at (x0, f(x0)).

 Example f ( x) =
x + 1, at x0 =
2

lim x→2 x + 1 =3
 f(x) can be made to be as close to the limit as desired by making x
sufficiently close to x0, but not equal to x0.

13
Limits of a function – Example
 Example
 x + 1 when x ≠ 2
f ( x) = , at x0 2
 4 when x = 2
 The limit of a function and the value of the function are different
concepts!
 We don’t care about the value of the function at x0 =2, we only care
about the value that f(x) approaches as x approaches x0 =2.

 x + 1 when x < 2
 Example 
= f ( x) = 4 when x 2
 x + 3 when x > 2

 Left limit vs. Right limit
lim x→2− f ( x) = 3 lim x→2+ f ( x) = 5
If lim x → x + f ( x) ≠ lim x → x − f ( x), lim x → x0 f ( x) does not exist.
0 0

14
Rules for finding limits
Theorem
=
If lim x → x0 f ( x) a=
and lim x → x0 g ( x) b, then
(i ) lim x → x0 [ f ( x) ± g ( x)] =
a±b
(ii ) lim x → x0 [ f ( x) g ( x)] = ab
=
(iii ) lim x → x0 [ f ( x ) / g ( x )] a / b, provided b ≠ 0
(iv) lim x → x0 [ f ( x)] p / q = a p / q

3 + 3x 3 + 3x lim (3 + 3 x) 0
 Example lim lim = x →−1
= = 0
x →−1 x →−1 x − 1 lim ( x − 1) −2
x −1

x →−1

valid because lim ( x −1) ≠ 0
x →−1
1
 =
Example f ( x) = , at x0 a
( x − a)
2

 We write lim x → a f ( x ) = ∞ ,

 but the limit does not exist!


15
Continuity -- definition

A function f is continuous at the point x = x0 if
lim x → x0 f ( x) = f ( x0 )
1. the function f must be defined at x0
2. the limit of f (x) at the point x0 must exist
3. the value of f at x0 must be equal to the limit of f at x0

 Example: f ( x) = | x |

 … small changes in the independent variable result in small


changes in the function value …

Example: x + 1 when x < 2




=f ( x) = 4 when x 2
 x + 3 when x > 2

16
Continuity (cont.)
 The procedure to find the limit of a function at x0 by simply substituting
this into the function works only for continuous functions.

 Theorem
Let f and g be functions continuous at point x0 .
(i ) f ( x) ± g ( x) continuous at x0
(ii ) f ( x) g ( x) continuous at x0
(iii ) f ( x) / g ( x) continuous at x0
(iv) [ f ( x)] p / q continuous at x0 if [ f ( x)] p / q is defined at x0
In addition, if g is continuous at f ( x0 ), then
(v) g(f ( x)) continuous at x0

17
Continuous Function
 The function f is continuous if it is continuous at every point in its
domain.
 Example: f(x) = 1/x

 domain R \ {0}

 continuous in its domain

 not continuous on R

 A function is continuous on some interval I, if its graph has no


"jumps", so that it can be drawn without lifting pen from paper.
 … we think of a continuous function as one whose graph has no

break in it. (It consist of just one piece.) …


 Multiple intervals?

 Proposition: If two functions f and g are continuous, then f + g, fg,


and f /g are continuous (g ≠ 0). The composition f o g of two continuous
functions is continuous.
18
Continuity -- Polynomial
 Polynomial: f ( x=) α n x + α n −1 x
n n −1
+ ... + α1 x + α 0
 consider an arbitrary point a

lim =
x→a f ( x ) lim x→a α n x n
+ lim x→a α n −1 x n −1
+ ... + lim x → a α1 x + lim x → a α 0
= α n lim x → a x n + α n −1 lim x → a x n −1 + ... + α1 lim x → a x + α 0
= α n a n + α n −1a n −1 + ... + α1a + α=
0 f (a)
 Polynomials are continuous everywhere.

 Proposition: The exponential functions, logarithms, square root


function, trigonometric functions, and absolute value function are
continuous (in their domain).

 Example: For function h( x) = ( x − 3)(5 − x) , determine if there are


points of discontinuity. If it is continuous everywhere, prove that it so
(you may use any result given in the notes).

19
Derivatives

[SHS] Chapter 6 & 7.9

20
Derivatives -- Newton quotient
 The behavior of a function f(x) around a certain point, say a, rather
than its value at (a, f(a)).
 rates of change of one variable with respect to some other variable

 ∆x ==> ∆y: ∆y / ∆x

 Example: demand -- ∆P ==> ∆Q: ∆Q / ∆P

 Consider any two points:


(a, f (a )) and (a + h, f (a + h))
 Slope of the secant line
∆y f (a + h) − f (a )
=
∆x a+h−a
f ( a + h) − f ( a )
=
h
 Newton quotient
f ( a + h) − f ( a )
lim h →0 =?
h
21
Differentiable & Derivatives -- definition
 Slope of the tangent line tells us how quickly the function value is
changing with respect to x at that point.

Definition: Function f defined on an open interval is differentiable at x = a if


f ( a + h) − f ( a )
lim h→0
h
exists. This limit is the derivative of the function f at x = a, denoted f '( a ) .

f ( a + h) − f ( a )
 Left derivative at x=a: f '(a − ) = lim−
h →0 h
+ f ( a + h) − f ( a )
 Right derivative at x=a: f '( a ) = lim
h → 0+ h

 A function f is differentiable at x = a if and only if both the right


derivative and the left derivative at x = a exist and are equal.

22
Differentiable & Derivatives -- example
 Example: f ( x) = | x |
 x, x≥0
This can be written as f ( x) = 
− x x<0
At x=0
f ( x + h) − f ( x ) −(0 + h) − (0)
lim− = lim− = −1
h →0 h h →0 h
f ( x + h) − f ( x ) (0 + h) − (0)
lim = =lim 1
h →0+ h h →0+ h
Derivative f ‘(x) does not exist at x=0.

 The derivative of a function at x=a need not exist even if the


function is continuous at x=a. It also needs to be smooth enough.
 … we think of a differentiable function as one whose graph has

no kink in it …
 For the derivative of a function to exist at point a, the function
must be continuous at point a.
23
Differentiation
 Obtain the slope of the function f(x) at all values of x. This way, we
obtain another function, which we will denote by f’(x), that tells us the
slope of the function at any given value of x. The function f’(x) is called
the derivative of f(x).

 The process of computing the derivative of a function is called


differentiation.
 Derivative of a function itself is a function -- f ′( x ) .

 Example: f (x) = x2
f ( x + h) − f ( x ) ( x + h) 2 − x 2
f ′(=
x) lim = lim = lim(2 x + =
h) 2x
h →0 h h →0 h h →0

 Example: f(x) = a + bx
f ( x + h) − f ( x ) a + b( x + h) − (a + bx) bh
f ′( x) =
lim lim = lim = b
h →0 h h →0 h h →0 h

24
Differentiation (cont.)
 Note: There are many ways of denoting the derivative:
d df ( x) dy
(i) f ′( x) (ii) f ( x) (iii) (iv) (v) y ′ (vi) y
dx dx dx

 Thus, all of the following say exactly the same thing:

dy
y=x2 ⇒ =2 x , y ′ =2 x
dx
df ( x) d
f ( x) =
x2 ⇒ f ′( x) =
2x , =
2x , f ( x) =
2x
dx dx
d ( x2 )
= 2=
x ( x 2 )′ 2 x
dx

25
Rules for Differentiation – General rules
 Compute the derivative from definition
x 2 ⇒ f ′( x) =
f ( x) = 2x

 more complicated functions?


 x −1 
f=
( x) (2 x − x ) 
7 2

 x +1
 Summation Rule
k(x) = g(x) + f(x) ⇒ k′(x) = g′(x) + f ′(x)
 Product Rule
k(x) = g(x)f(x) ⇒ k′(x) = g′(x) f (x) + g(x) f ′(x)
 Quotient Rule
f ′( x) g ( x) − f ( x) g ′( x)
k(x) = f(x) / g(x) ⇒ k ′( x) =
[ g ( x)]2

26
Rules for Differentiation – specific functions
 Constant Rule
f(x) = A ⇒ f ′(x) = 0
 Constant Multiple Rule
g(x) = A f(x) ⇒ g′(x) = Af ′(x)
 Power Rule
f(x) = xr ⇒ f ′(x) = r xr − 1 for any real number r
 Logarithm Rule
1
f (x) = loga x ⇒ f ' ( )
x =
x ln a
f (x) = ln x ⇒ f ′(x) = 1/x
 Exponential Rule
f(x) = ax ⇒ f ′(x) = ax lna
f(x) = ex ⇒ f ′(x) = ex

27
Rules for Differentiation – Chain Rule
 Chain Rule – composite function -- "function of a function”
k(x) = f (g(x)) ⇒ k ′( x) = f ′( g ( x)) g ′( x)
1
 Example: f ( x) =
(6 x 2 − 7 x)
f (=
x) g (h( x)), where g (=
x) 1 / x and h(=
x) 6 x 2 − 7 x
which gives g ′( x) =
−1 / x 2 and h′( x) =
12 x − 7
1
f ′( x) =
− (12 x − 7)
(6 x − 7 x)
2 2

1
 Exercise: Find the derivative of g ( x) = .
1
1+
1+ x

28
Rules for Differentiation – Logarithmic Differentiation
 Logarithmic Differentiation
d f ′( x) d 
ln f ( x) = ′
⇒ f ( x) =
 ln f ( x )  f ( x)
dx f ( x)  dx 
 Example: f=
( x) x x , x > 0
d
ln f ( x) =x ln x ⇒ ln f ( x) =x (1 / x ) + ln x = (1 + ln x )
dx
d 
⇒ f ′( x) =  dx ln f ( x ) (1 + ln x ) f ( x)
 f ( x) =
 
⇒ f ′( x) =
(1 + ln x) x x
( x 2 − 8)1/3 x 2 + 1
 Exercise: Find the derivative of y = .
x − 7x + 5
6

29
Increasing and Decreasing Functions -- definition
A function is increasing if for all x1 , x2
x1 < x2 ⇒ f ( x1 ) ≤ f ( x2 )
A function is decreasing if for all x1 , x2
x1 < x2 ⇒ f ( x1 ) ≥ f ( x2 )

A function is strictly increasing if for all x1 , x2


x1 < x2 ⇒ f ( x1 ) < f ( x2 )
A function is strictly decreasing if for all x1 , x2
x1 < x2 ⇒ f ( x1 ) > f ( x2 )

 Example: Demand, Supply, Utility, Profit, Cost, Grade (GPA) …

30
Increasing and Decreasing Functions
 Assume that functions are differentiable.
 Use the derivative to describe whether a function is increasing or

decreasing over a certain interval I .


f '( x) ≥ 0 ⇔ f increasing
f '( x) ≤ 0 ⇔ f decreasing

f '( x) > 0 ⇒ f strictly increasing


f '( x) < 0 ⇒ f strictly decreasing
 Note: a function can be strictly increasing over an interval I
without f '( x) > 0 for all x ∈ I .

 Example:
increasing, but f ′( x) 3=
x3 is strictly= x 2 , in particular f ′(0) 0.

31
Increasing and Decreasing Functions -- example
 Example: multiple intervals
=f ( x) 1 / x defined over (−∞,0) ∪ (0, ∞)

 Example:
1 3
f ( x) =
− x + 2 x 2 − 3x + 1 increasing/decreasing?
3
f '( x) =− x2 + 4 x − 3
 sign diagram

 Exercise: Find the intervals over which the function=


f ( x) x 3 / ( x 2 − 1)
is increasing / decreasing.

32
Application: Elasticity

[SHS] 7.7

33
Elasticity
 Example: Demand -- ∆P ==> ∆Q: ∆Q / ∆P
 How responsive is demand to price changes?

 Elasticity – the percentage change in one variable that results from a


certain percentage change in another variable.
∆Q / Q ∆Q P
=ε =
∆P / P ∆P Q

 Independent of units of measurement

 Point elasticity: demand differentiable


 Infinitesimal change in P and Q: (∆P, ∆Q) ==> (dP, dQ)

dQ / Q dQ P
=ε =
dP / P dP Q
 Point-slope method
dQ P 1 P 1 P
ε= = =
dP Q (dP / dQ) Q slope Q
34
Price elasticity of demand
 Example: Suppose the demand function is QD = 8 – Pbuyer /3 and
supply function is QS = Pseller /5. What is the price elasticity of demand
at the market equilibrium?

 Typically price elasticity of demand is a negative number.


 For the sake of convenience, ignore the negative sign of ε and

refer simply to its absolute value.

 Elastic demand: | ε | >1;


 Inelastic demand: | ε | <1;
 Unit elastic demand: | ε | =1

 Linear Demand Curve: constant slope


dQ P 1 P 1 P
ε= = =
dP Q (dP / dQ) Q slope Q

35
Non-linear demand
 Demand Q = f ( P)
dQ P
 Point elasticity: ε=
dP Q
dQ P df ( P) P P f ′( P) d ln f ( P) d ln Q
ε
= = f= ′( P) = P = P P
dP Q dP f ( P) f ( P) f ( P) dP dP

 Logarithmic Differentiation
d ln f ( P ) f ′( P )
=
dP f ( P)

 P +1
1/3

 Exercise:=Q f=
( P)  
 P −1 

36
Higher-Order Derivatives

[SHS] 6.9

37
Higher-Order Derivatives
 The second-order derivative (or simply ‘second derivative’) is the
derivative of the derivative
f ′(a + h) − f ′(a )
f ′′(a ) = lim h →0
h
 ‘third-order derivatives’, ‘fourth-order derivatives’, etc.

 Example: f ( x) =⇒
x3 f ′( x) =
3 x 2 , f ′′( x) =
6 x, f ′′′( x) =
6

 Notation: If y = f (x) , then


Second Derivative f ′′( x), f (2) ( x), y '', d2 d2y
2
f ( x),
dx dx 2
(n) (n) dn dny
n-th order derivative f ( x), y , n
f ( x),
dx dx n

38
Higher-Order Derivatives – shape of a function
 The second order derivative is the rate of change of the rate of
change of f(x) as x increases.
 Geometrically, the second order derivative can help to describe the

shape of a function – curvature.

 A function is both concave and convex if and only if it is linear.

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

39
Concave and convex function – Twice-differentiable
functions
 For differentiable functions, it is often easier to make use of the
second derivations to show concavity/convexity.
f ''( x) ≥ 0 ⇔ f convex
f ''( x) ≤ 0 ⇔ f concave

f ''( x) > 0 ⇒ f strictly convex


f ''( x) < 0 ⇒ f strictly concave
 Note: a function can be strictly concave over an interval I
without f ''( x) < 0 for all x ∈ I .

Example f ( x) = − x is strictly concave, but it is not true that f ''( x) < 0


4

for all x. In particular, f ′′( x) =
−12 x 2 =
0 at x=0.

40
Concave and convex function – inflection point
 A function may be concave in some portions of its domain, and convex
in other parts of it. The point where a function switches from concavity
to convexity, or the other way around, is called an inflection point.
 If x0 is an inflection point, it must be that f ''( x0 ) = 0 .

 But note that f ''( x0 ) = 0 does not imply that x0 is an inflection point.

 example: f ( x) = − x 4

 However, if f ''( x0 ) = 0 and f ''( x0 ) changes sign at x0, then x0 is


an inflection point.

 Example cubic cost function


C (Q) =
Q 3 − 30Q 2 + 400Q + 100

Proposition: The summation of two concave functions is concave.


 In particular, the summation of a concave function and a linear
function is concave.
41
Implicit Differentiation

[SHS] 7.1

42
Implicit function
 An implicit function is a function in which the dependent variable
has not been given "explicitly" in terms of the independent variable.
 Explicit function

y = f ( x)
 Implicit function
R ( x, y ) = 0
 one variable or the other may determine the other, but one is not
given an explicit formula for one in terms of the other

 Example: y 3 + 3 x 2 y =
13
y = g ( x)

 Q: How do we find g′(x)?

43
Implicit differentiation
 Implicit differentiation: differentiate both sides of the equation with
respect to x and solve for g′(x).
 Keeping in mind that y is a function of x,

13 ⇒ 3 y 2 y ′ + 6 xy + 3 x 2 y ′ =⇒
y 3 + 3x 2 y = 0 y ′[3 y 2 + 3 x 2 ] =
−6 xy
−2 xy
⇒ y′ =
y 2 + x2
 The power of the technique lies in situations where we are not able
to solve for y in terms of x. In these cases, of course, one may have
to leave the derivative y’ as an expression involving both x and y.

y
 Example y − xy =
5
24 y′ = 4
5y − x
 Exercise: Suppose that the following equation implicitly defines y as
a function of x. Further, h(•) is some other differentiable function of
one variable. Find an expression for y′.
h(2 x + y ) =x + y 2
44

You might also like