SIT194 - Graph Sketching & Integration (Lecture Notes)
SIT194 - Graph Sketching & Integration (Lecture Notes)
1 / 52
Linear functions: The equation of a straight line is given by:
y = f (x) = mx + c
Q: For the linear function shown in the figure above, what is the (i)
slope; and (ii) y-axis intercept?
2 / 52
Power functions: The equation is given by
f (x) = xa
where a is a constant which is the power. There are three cases
to consider and the shape for one case is quite different to
another case.
3 / 52
Q: Sketch the shape of the power function when n = 1.
4 / 52
Case II: a = 1/n where n is a positive integer, i.e.
√
a = 1/2, 1/3, . . .. Then y = f (x) = n x is the nth root function.
There is a restriction to the domain when n is an even integer
√
(e.g. y = x): x ≥ 0. There is not restriction when n is odd.
Graphs of typical examples are shown below:
5 / 52
Case III: a = n where n is a negative integer, i.e.
a = −1, −2, −3, . . .. The case a = −1 is most common and
y = f (x) = 1/x is known as the reciprocal function. The graph
is shown below:
6 / 52
Trigonometric functions: The two most commonly used functions
are (i) y = f (x) = sin x and (ii) y = g(x) = cos x. The domain is
all x, i.e. x ∈ R. The graphs are shown below:
7 / 52
Piecewise functions: As the name implies, piecewise functions
are functions that are made up of several ’pieces’. An example
is the modulus function covered at the beginning of this unit.
In general, the domain is broken up into several pieces, and
each piece of domain has a different expression for the
function. For example, with the modulus function, the domain
−∞ < x < ∞ is broken into (i) −∞ < x < 0; and (ii) 0 ≤ x < ∞.
Recall that the modulus can be written as:
(
x, if x > 0
f (x) = |x| =
−x, if x < 0
The first line of the formula describes the first piece and the
second line describes the second piece. In general the number
of lines in a formula is equal to the number of pieces.
8 / 52
Q: How many pieces are there for the function:
x, if x > 1
f (x) = x2 , if 0 ≤ x ≤ 1
−x, if x < 0
9 / 52
Step function: The usual symbol of the function is u(x) and
defined as: (
1, if x ≥ 0
u(x) =
0, if x < 0
The graph of the function is shown below:
10 / 52
Sign function: The usual symbol of the function is sgn(x) and
defined as: (
1, if x ≥ 0
sgn(x) =
−1, if x < 0
The graph of the function is shown below:
This step function and the sign function are related to each but
they are not exactly the same (we shall explore this later).
11 / 52
Ramp function: The usual symbol of the function is r(x) and
defined as: (
x, if x ≥ 0
r(x) =
0, if x < 0
The graph of the function is shown below:
12 / 52
Q: With the three piecewise functions defined above, determine (a)
u(2); (b) u(−2); (c) sgn(−2); (d) r(−sgn(−2)).
13 / 52
T RANSFORMATION BY SHIFTING AND SIMPLE
MULTIPLICATION .
14 / 52
Shifting: is also known as translation and can be:
1. A horizontal shift.
2. A vertical shift.
3. A combination of both.
Suppose we have an original graph y = f (x), e.g. y = x2 , and a
positive number c.
I The new graph y = f (x) + c is obtained by shifting the
original graph upwards by c units.
I The new graph y = f (x) − c is obtained by shifting the
original graph downwards by c units.
I The new graph y = f (x − c) is obtained by shifting the
original graph to the right by c units.
I The new graph y = f (x + c) is obtained by shifting the
original graph to the left by c units.
15 / 52
The figure below shows the different types of shift.
17 / 52
Combination of shifts: if the new graph function is given by
y = f (x ± c2 ) ± c1
18 / 52
Example: Sketch the graph of the following functions
1
(i) y = x−1 + 2
(ii) y = x2 − 6x + 10
19 / 52
Simple multiplication: In general when we multiply two
functions together, it is not easy to infer the resulting graph
from the original graphs, except for special cases.
y = f (x)g(x)
where g(x) is the shifted version of the step function and f (x)
can be any arbitrary function.
20 / 52
Example: Sketch the graph of the following functions:
(i) y = sin(x) u(x)
(ii) y = cos(x) u(x − π/2)
21 / 52
T RANSFORMATION BY REFLECTION AND
STRETCHING .
22 / 52
Reflection: Given the original function y = f (x):
1. The function y = f (−x) is obtained by reflecting the
original graph about the y-axis, i.e. the vertical axis acts
like a mirror.
2. The function y = −f (x) is obtained by reflecting the
original graph about the x-axis, i.e. the horizontal axis acts
like a mirror.
23 / 52
Stretching/Shrinking: Given the original function y = f (x) and a
constant c > 1:
1. The function y = cf (x) is obtained by stretching the graph
vertically by a factor of c.
2. The function y = 1c f (x) is obtained by shrinking the graph
vertically by a factor of c.
3. The function y = f (cx) is obtained by shrinking the graph
horizontally by a factor of c.
4. The function y = f (x/c) is obtained by stretching the graph
horizontally by a factor of c.
24 / 52
The figure below shows the effect of reflection, stretching or
shrinking.
25 / 52
Example: For following functions, (a) identify the basic
function; (b) identify the transformation; (c) sketch the graph.
√
(i) y = − x.
√
(ii) y = −x.
(iii) y = 2 cos x.
(iv) y = cos 2x.
27 / 52
Example: For following functions, (a) identify the basic
function; (b) identify the sequence of transformations; (c)
sketch the graph.
(i) y = 1 − sin x.
(ii) y = −1/(x − 1).
(iii) y = 2(1 − e−x )u(x) where u(x) is the step function.
29 / 52
NOTATION: ˆ b
f (x) dx
a
is the definite integral of of the function f w.r.t. x for the interval
a ≤ x ≤ b.
I The symbol x is referred to as the variable of integration.
I The function f (x) is known as the integrand.
I The values a and b known are the lower and upper limits
of integration respectively.
´3
Q: For the integral −1 ln(sin x) dx, what is (a) the integrand; (b) the
lower limit; and (c) the upper limit?
30 / 52
Physical interpretation: The definite integral of a non-negative
function f (x) ≥ 0 over the interval a ≤ x ≤ b gives the area
contained below the curve y = f (x) and the x axis for a ≤ x ≤ b.
´b
Here, as f (x) ≥ 0 for a ≤ x ≤ b, the shaded area is a f (x) dx.
31 / 52
Remarks:
I In theory, a definite integral can be evaluated by summing
areas of rectangles of small width, and taking the limit as
this width tends to zero.
I If the integrand f (x) < 0 for a ≤ x ≤ b (i.e. negative valued)
´b
then a f (x) dx gives the negative of the area.
I If f (x) is sometimes positive and sometimes negative, there
will be some cancelling of the ’positive area’ with the
’negative area’: need to beware of this when trying to calculate
areas1 .
1
We will be looking at applications of the integral to calculate areas and
volume in latter weeks.
32 / 52
Sometimes, definite integrals can be evaluated using formulas
from geometry. Consider the following integral
ˆ 2
I= (1 + x) dx
0
33 / 52
As the function y = 1 + x is a straight line (shown above), and
y ≥ 0 for the interval 0 ≤ x ≤ 2, the integral represents the area
found by adding rectangle area2 A1 and triangle3 are A2 .
1
∴ I = A1 + A2 = (1 × 2) + (2 × 2) = 2 + 2 = 4
2
Exercise: Using geometry (i.e. sketch the graph), calculate the
following integrals
´2
(i) −1 |x| dx
´2
(ii) −1 |x + 1| dx
Hint: please revise the section on modulus function in Week 1
if you are unsure.
2
Area of rectangle is width times height.
3
Area of right angle triangle rectangle is half of width times height.
34 / 52
Properties of definite integral:
I Dummy variable:
ˆ b ˆ b
f (x) dx = f (t) dt
a a
When the two limits are the same, the width of the interval
is zero and this is equivalent to calculating the area of a
region with zero width.
35 / 52
I Interchange limits:
ˆ b ˆ a
f (x) dx = − f (x) dx
a b
36 / 52
We can apply these properties to integrals that have:
1. Integrands that have symmetry, i.e. even or odd function.
2. Limits that are symmetrical where b = −a, i.e. lower limit
is negative of upper limit.
to show that:
1. For an even function f (x), i.e. f (x) = f (−x),
ˆ a ˆ a
f (x) dx = 2 f (x) dx
−a 0
The lower limit has been changed to zero and the result is
multiplied by two.
2. For an odd function f (x), i.e. f (x) = −f (−x),
ˆ a
f (x) dx = 0
−a
I With even functions the area to the right (of the y-axis) is
the same the area to the left. The total area is twice the area
to the right (which is the integral with limits [0, a])
I With odd functions, the area to the right is the same as the
area to the left. However the area to the left is below the
x-axis and contributes a negative value to the integral, i.e.
there is a cancelling of the ’positive area’ (right) with the
’negative area’ (left).
38 / 52
´3 √
Example: I = −3 4x1 + 2x4 dx = 0 because
√ p
1. f (x) = 4x 1 + 2x4 and f (−x) = −4x 1 + 2(−x)4 = −f (x),
i.e. f (x) is odd.
2. the limits [−3, 3] are symmetrical.
39 / 52
A NTIDERIVATIVE AND E VALUATING I NTEGRALS
40 / 52
Definition: The antiderivative of a function f (x) is any function
G(x) that satisfies
G0 (x) = f (x)
i.e. any function when differentiated gives f (x) is an
antiderivative. The antiderivative is not unique because if one
adds any constant value C to G(x), i.e. (G(x) + C), the result is
another antiderivative of f (x).
41 / 52
If an antiderivative is known, the definite integral can then be
evaluated as ˆ b
f (x) dx = G(b) − G(a)
a
i.e. the definite integral is evaluated by calculating the
antiderivative at the two limits and taking the difference.
´2
Q: What is I = 3 f 0 (x) dx in terms of the f (x)?
42 / 52
Remarks:
I Basically in integration, we need to find a function such
that, when differentiated gives us the original function in
question.
I This is not always possible and some functions cannot be
integrated.
I Integration is generally more difficult than differentiation.
The analogy is like trying to ’unscramble an egg’.
I Since integration is the reverse of differentiation, we can
use the results of differentiation studied earlier and apply
them in reverse to integrate certain functions.
43 / 52
The following are some commonly encountered indefinite
integrals obtained using the results of differentiation in reverse.
´
f (x) f (x) dx
xn+1
1. xn (n 6= −1) n+1
+C
1
2. x
ln |x| + C
1
3. cos(kx) k
sin(kx) + C
4. sin(kx) − 1k cos(kx) + C
1 kx
5. ekx k
e +C
1
6. cosh(kx) k
sinh(kx) + C
1
7. sinh(kx) k
cosh(kx) + C.
44 / 52
NOTE:
1. The value n and k are any arbitrary constants with the
restriction n 6= −1 and k 6= 0.
2. In each case, the derivative of the function on the right
gives the function on the left.
3. In result 2, |x| allows x to be negative.
45 / 52
Example: Evaluate
ˆ
4 3 1
(i) I = x − 2x + √ dx
x
ˆ
3
(ii) I = cos(2x) − dx
x
ˆ 2
1
(iii) I = 3x2 − dx
1 x
46 / 52
Exercises: Evaluate
ˆ
3x 9
(i) I = e − 4 dx
x
ˆ
(ii) I = (sinh(x/2) − cosh(3x)) dx
ˆ 4
√
(iii) I = 6 x dx
1
ˆ 2
4
(iv) I = − 2x dx
1 x3
ˆ 4
2 1/3
(v) I = +x dx
1 x
47 / 52
F UNDAMENTAL T HEOREM OF C ALCULUS
48 / 52
In the following, x and t are considered as variables; and a and
b are considered as constants. The following are fundamental
theorems of calculus rules.
d
´ x
(i) dx a f (t) dt = f (x) (FTC1).
´b df (t)
(ii) a dt dt = [f (t)]ba = f (b) − f (a) (FTC2).
49 / 52
Remarks:
I In the integrals above t is also known as a ’dummy
variable’ - one can change the symbol t to another symbol s
and the results above will still hold.
I With FTC1 the upper limit of integration is a variable x.
I With LR the upper limit of integration is a function of the
variable x, i.e. u(x).
I FTC1 is a special case of the LR when u(x) = x.
These rules can be used to calculate certain integrals without
actual performing any integration as will be seen next.
50 / 52
Example: Find
´1 √
(i) 0 ddt t4 + 1 dt
h´ √ i
d x 4 + 1 dt
(ii) dx 4 t
h´ √ i
d 2 4 + 1 dt
(iii) dx 1 t
h´ 2 √ i
d x 4 + 1 dt
(iv) dx 0 t
51 / 52
Exercise: Find
d
´ x 2
(i) dx 2 cos(t ) dt
h´ i
d x 1
(ii) dx 1 t3 +1 dt
h´ i
d y (t2 −t)
(iii) dy 1 e dt
h´ i
d √10 2 ) dt
(iv) dx x cos(t
h´ i
d 3x u2 −1
(v) dx 2
2x u +1 du
d
´ cos x
(vi) dx sin x (1 + v2 )10 dv
Hint: For the last three problems, we will need also to use some
properties of definite integrals discussed two sections ago before using
the rules discussed in this section.
52 / 52