Professional Documents
Culture Documents
Week 2-Lecture 1 Slides
Week 2-Lecture 1 Slides
1 / 48 2 / 48
0∈
/E
3 / 48 4 / 48
1. Definition of a Function: What is a Function? 1. Definition of a Function: What is a Function?
A function is a rule that assigns each element in a set A exactly Example
one element in a set B. (i.e. a function takes an input value from The function g (x) = (x − 1)2 − 4 (right)
set A and produces an output value in set B) is a quadratic function. Again, you input
a value for x and output a value for y .
Example
E.g. If x = 2 (input) then y = −3
The function f (x) = 2x + 3 (right) is a (output).
linear function. You input a value for x and
output a value for y y = g (2) = (2 − 1)2 − 4 = −3
E.g. If x = 2 (input) then y = 7 (output).
If x = 4 (input) then y = 5 (output).
y = f (2) = 2(2) + 3 = 7
y = g (4) = (4 − 1)2 − 4 = 5
If x = π (input) then y = 2π + 3 (output).
Although you can input any value of x ∈ R, you cannot output
y = f (π) = 2π + 3 ≈ 9.28 values of y which are less than y = −4. We write
Note that you can input any value of x ∈ R and output any value {y ∈ R : y ≥ −4}
of y ∈ R. to mean that we can get any real value of y such that y ≥ −4.
5 / 48 6 / 48
1. Definition of a Function: What isn’t a function? 1. Definition of a Function: What isn’t a function?
The vertical line test: Any curve represents a function if and only
A function must assign a single value of y for each value of x. If if no vertical line intersects the curve more than once (i.e. if a
an equation allows the same value of x to correspond to more than vertical line intersects the curve more than once it is not a
one y value, it is not a function. function).
Example
Example
The circle on the right has equation
x 2 + y 2 = 25
y = 4 or y = −4
7 / 48 8 / 48
2. Domain and Range 2. Domain and Range
The set of all values which a function can accept (i.e. inputs) is
Example
called the domain. The function g (x) = (x − 1)2 − 4 has a
The set of all values which a function can output is called the domain
range.
dom(g ) = {x ∈ R}.
Example
The function f (x) = 2x + 3 has a domain That is, g can accept any value of x from
the real numbers.
dom(f ) = {x ∈ R}. The range of g is
2. Domain and Range: Rules for Determining Domains 2. Domain and Range: Rules for Determining Domains
To determine the domain of a function you need to identify Example
√
which values of x are not allowed. The following rules will The function f (x) = x + 1 is a square
help: root function. From the rule 2 (previous
1. You cannot divide by zero; slide) we cannot have x + 1 < 0 (i.e. need
2. You cannot take the square root of a negative number. x ≥ −1). Hence the domain of f is given
by
Example dom(f ) = {x ∈ R : x ≥ −1}.
The function f (x) = x1 is called a
The domain is indicated in red in the graph.
hyperbola. From rule 1 (above) we cannot
have x = 0. Hence the domain of f is
given by Determining the range of a function is easy if you know what the
√
graph looks like. For example the range of f (x) = x + 1 is given
dom(f ) = {x ∈ R : x = 0}.
by ran(f ) = {y ∈ R : y ≥ 0}. We will consider some techniques for
The domain is indicated in red in the finding ranges a little further along.
graph, with the open circle indicating that
See Problem Set 1.1
x = 0 is excluded.
11 / 48 12 / 48
3. Translation and Scaling: Vertical translation 3. Translation and Scaling: Horizontal translation
The graph of a function y = f (x) can be translated/shifted The graph of a function y = f (x) can be translated/shifted
vertically by an amount d as follows: horizontally by an amount c units left as follows:
y = f (x) + d y = f (x + c)
Example Example
The function y = x2 is plotted on the right The function y = x 2 is plotted on the right
(solid curve). (solid curve).
The dashed curve is an upward shift of The dashed curve is a rightward shift
y = x 2 by 2 units, and has equation of y = x 2 by 1 unit, and has equation
y = x2 + 2 y = (x − 1)2
The dotted curve is a downward shift The dotted curve is a leftward shift of
of y = x 2 by 3 units, and has equation y = x 2 by 2 units, and has equation
y = x2 − 3 y = (x + 2)2
13 / 48 14 / 48
3. Translation and Scaling: Vertical Scaling 3. Translation and Scaling: Vertical Scaling
The graph of a function y = f (x) can be scaled vertically (i.e.
stretched or squashed) by a factor of a as follows: Under the scaling y = af (x) the distance from each point on the
graph to the x-axis is multiplied by a. As a consequence, any part
y = af (x)
Example of the graph that intersects the x-axis is unaffected by the scaling.
The function y = w (x) is plotted on the
Example
right (solid curve).
y = f (x) and y = 2f (x) are
The dashed curve is a vertical scaling
plotted on the right.
of y = w (x) by a factor of 2, and has
Each point on y = 2f (x) is
equation
y = 2w (x) twice as far from the x-axis
as the corresponding point
The dotted curve is a vertical scaling on y = f (x).
of y = w (x) by a factor of 14 , and has The x-intercept is not
equation
1 affected by the vertical
y = w (x) scaling.
4
15 / 48 16 / 48
3. Translation and Scaling: Vertical Scaling 3. Translation and Scaling: Horizontal Scaling
If the scale factor in a vertical scaling is negative, it means that the The graph of a function y = f (x) can be scaled horizontally (i.e.
function is reflected about the x-axis in addition to being stretched stretched or squashed) by a factor of b1 as follows:
or squashed.
y = f (bx)
Example Example
The function y = w (x) is plotted on the The function y = v (x) is plotted on the
right (solid curve). right (solid curve).
The dashed curve is a vertical scaling The dotted curve is a horizontal
of y = w (x) by a factor of 2 with a scaling of y = v (x) by afactor
reflection about the x-axis, and has 1
of 3,
and has equation y = v 3 x
equation y = −2w (x)
The dashed curve is a horizontal
The dotted curve is a vertical scaling scaling of y = v (x) by a factor of 12 ,
of y = w (x) by a factor of 14 with a and has equation y = v (2x)
reflection about the x-axis, and has
equation y = − 14 w (x)
17 / 48 18 / 48
3. Translation and Scaling: Horizontal Scaling 3. Translation and Scaling: Horizontal Scaling
If the scale factor in a horizontal scaling is negative, it means that
Under the scaling y = f (bx) the distance from each point on the the function is reflected about the y -axis in addition to being
graph to the y -axis is multiplied by b1 . As a consequence, any part stretched or squashed.
of the graph that intersects the y -axis is unaffected by the scaling.
Example
Example The function y = v (x) is plotted on the
x
y = f (x) and y = f are right (solid curve).
2
plotted on the right. The dotted curve is a horizontal
x
Each point on y = f 2 is scaling of y = v (x) by a factor of 3
twice as far from the y -axis with a reflection about
the y -axis, and
as the corresponding point has equation y = v − 13 x
on y = f (x). The dashed curve is a horizontal
The y -intercept is not scaling of y = v (x) by a factor of 12
affected by the vertical with a reflection about the y -axis, and
scaling. has equation y = v (−2x)
19 / 48 20 / 48
3. Translation and Scaling: Another Example 3. Translation and Scaling: Another Example
Again considering the function
To provide a more direct contrast between horizontal and vertical
translations/scalings, consider the function y = x 3 + 2x 2 + 4x + 3
y = x 3 + 2x 2 + 4x + 3
To scale the function vertically by a factor of 2 units (i.e.
stretch it vertically until it doubles in height), multiply the
To shift the function 2 units upward, add 2 to the overall overall function by 2:
function:
y = 2(x 3 + 2x 2 + 4x + 3)
y = (x 3 + 2x 2 + 4x + 3) + 2
= 2x 3 + 4x 2 + 8x + 6
= x 3 + 2x 2 + 4x + 5
To scale the function horizontally by a factor of 2 units (i.e.
To shift the function 2 units right, subtract 2 from every x: stretch it horizontally until it doubles in width), divide every
x by 2:
y = (x−2)3 + 2(x−2)2 + 4(x−2) + 3 x 3 x 2 x
y= +2 +4 +3
2 2 2
21 / 48 22 / 48
Again since there was a horizontal scaling, only the points where
Notice that since there was a vertical scaling, not all points on
y = v (x) intersects the y -axis are translated by 1 unit.
y = w (x) are ultimately translated down by 8 units. Only the
points where y = w (x) intersects the x-axis are translated by 8 See Problem Set 1.2
units. 25 / 48 26 / 48
x +1
(f /g )(x) =
x +3
27 / 48 28 / 48
5. Composite Functions 5. Composite Functions: Evaluating Composite Functions
Example
√
Consider the functions f (x) = x + 2 and g (x) = x 2 + 1.
Given two functions f and g the composite function f ◦ g is Suppose we set x = 2 and want to evaluate f ◦ g (2).
defined by
f ◦ g (x) = f (g (x))
First pass x = 2 into g to get
The process is illustrated in the figure below.
g (2) = 22 + 1 = 5
29 / 48 30 / 48
Example
Consider the quadratic function
f (x) = x 2
33 / 48 34 / 48
6. Inverse Functions: Important Facts about Inverses 6. Inverse Functions: Using the Inverse to find the Range
is piecewise defined.
If −3 ≤ x < −1 then the function
is defined by y = x + 2
If −1 ≤ x < 1 then the function is
defined by y = −(x + 1)2 + 1
If 1 ≤ x ≤ 3 then the function is
defined by y = −3 The function on the right is said to be dis-continuous at x = 1.
41 / 48 42 / 48
Example
Consider the function y = f (x) (right).
It is possible to characterise continuity at a point x = a by
As x approaches 1 from the left, y
considering three features of the function:
approaches 3. That is
1. The behaviour/limit of the function as it approaches x = a
limx→1− f (x) = 3
from the left, denoted limx→a− f (x)
As x approaches 1 from the right,
2. The behaviour/limit of the function as it approaches x = a
y approaches 1. That is
from the right, denoted limx→a+ f (x)
limx→1+ f (x) = 1
3. The value of f (a).
The value of the function at x = 1
Specifically, we need (as indicated by the solid circle) is
lim f (x) = lim+ f (x) = f (a) f (1) = 3.
x→a− x→a
Since these three numbers are not equal
it follows that f is not continuous at
x = 1.
43 / 48 44 / 48
8. Continuity 8. Continuity
Example Example
Consider the function y = f (x) (right). Consider the function y = f (x) (right).
As x approaches -1 from the left, y As x approaches -1 from the left, y
approaches 4. That is approaches 4. That is
limx→−1− f (x) = 4 limx→−1− f (x) = 4
As x approaches -1 from the right, As x approaches -1 from the right,
y approaches 4. That is y approaches 4. That is
limx→−1+ f (x) = 4 limx→−1+ f (x) = 4
The value of the function at The value of the function at
x = −1 is f (−1) = 4. x = −1 (as indicated by the solid
Since these three numbers are equal it circle) is f (−1) = 2.
follows that f is continuous at x = −1. Since these three numbers are not equal
it follows that f is not continuous at
x = −1.
45 / 48 46 / 48
8. Continuity 8. Continuity
Example Example
Consider the continuity of the following function at x = −1. Consider the continuity of the following function at x = 1.
x + 2, x < −1, x + 2, x < 1,
f (x) = f (x) =
−(x + 1)2 + 1, x ≥ −1. −x + 3, x ≥ 1.
To the left of x = −1 we have f (x) = x + 2. Hence To the left of x = 1 we have f (x) = x + 2. Hence
lim f (x) = lim (x + 2) = −1 + 2 = 1 lim f (x) = lim (x + 2) = 1 + 2 = 3
x→−1− x→−1− x→1− x→1−
To the right of x = −1 we have f (x) = −(x + 1)2 + 1. Hence To the right of x = 1 we have f (x) = −x + 3. Hence
2 2
lim f (x) = lim + (−(x + 1) + 1) = −(−1 + 1) + 1 = 1 lim f (x) = lim+ (−x + 3) = −(1) + 3 = 2
x→−1+ x→−1 x→1+ x→1
At x = −1 we have f (x) = −(x + 1)2 + 1. Hence Since these numbers are not equal, f (x) is not continuous at
2 x = 1. There is no need to consider f (1).
f (−1) = −(−1 + 1) + 1 = 1
See Problem Set 1.5
Since all of these numbers are equal, f (x) is continuous at x = −1.
47 / 48 48 / 48