0% found this document useful (0 votes)
6 views

SIT194 - Graph Sketching & Integration (Lecture Notes)

The document provides an overview of important functions in calculus, including linear, power, trigonometric, exponential, logarithmic, and piecewise functions, along with their graphical representations and properties. It also discusses transformations of these functions through shifting, reflection, and stretching, and introduces the concept of definite integrals in integral calculus. The document emphasizes the significance of understanding the shapes and transformations of functions for practical applications in various fields.

Uploaded by

trminhselflearn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

SIT194 - Graph Sketching & Integration (Lecture Notes)

The document provides an overview of important functions in calculus, including linear, power, trigonometric, exponential, logarithmic, and piecewise functions, along with their graphical representations and properties. It also discusses transformations of these functions through shifting, reflection, and stretching, and introduces the concept of definite integrals in integral calculus. The document emphasizes the significance of understanding the shapes and transformations of functions for practical applications in various fields.

Uploaded by

trminhselflearn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

S HAPE OF IMPORTANT FUNCTIONS

Calculus deals with the analysis of functions and a visual


representation of a function, via a graph, is an important tool in
the analysis. We first look at the shapes of important basic
functions encountered in practice. Subsequent sections will
look at the shapes of more complicated functions that are
derived from these functions. Some of the concepts here should
be more of a revision to you.

1 / 52
Linear functions: The equation of a straight line is given by:

y = f (x) = mx + c

where m is the slope and c is the y-axis intercept. An example


of a linear function is shown below:

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.

Case I: a = n which is a positive integer, i.e. a = n = 1, 2, . . ..


The shape for n = 2, 3, 4, 5 is shown below.

3 / 52
Q: Sketch the shape of the power function when n = 1.

Q: Look at the graphs of the power functions above. What is


(coordinates of ) the point that all graphs pass through?

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:

Q: What is the domain of the reciprocal function?

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:

Q: What is the range of the sine and cosine functions?


7 / 52
Exponential function: The function is given by: y = ex and the
graph of the function is given below

Logarithm function: The function is given by: y = loge x and the


graph of the function is given 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

We next describe three piecewise functions commonly


encountered in practical applications.

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:

This function is sometimes referred to as the Heaviside function


and is very important in electrical and mechanical engineering.

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:

This function is very important in the area of AI (Artificial


Intelligence) and is also known in that area as the ReLU
(Rectifier Linear Unit) function.

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 .

Many graphs encountered in practice are not exactly the same


as the basic graphs discussed in the previous section. They
however ’look- like’ or inherit the shapes of these basic graphs
because they are transformation of these basic shapes.

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.

Q: For the original graph y = x2 , determine the function of the new


graph if the original is shifted by (a) 4 units downwards; (b) 2 units
upwards; (c) 1 unit to the left; (d) 2 units to the right;
16 / 52
Example: Sketch the graph of the following functions
(i) y = x4 + 1

(ii) y = x − 2
(iii) y = cos x + 1
(iv) y = sin(x − π/4)
Exercise Sketch the graph of the functions below. Note that
u(x), sgn(x) and r(x) are piecewise functions defined
previously.
(i) y = (x − 4)4

(ii) y = x − 2
(iii) y = ln(x − 2)
(iv) y = u(x − 1)
(v) y = sgn(x) + 1
(vi) y = r(x − 2)

17 / 52
Combination of shifts: if the new graph function is given by

y = f (x ± c2 ) ± c1

this is obtained from the old graph by


1. Vertical shift of c1 units: + for up and − for down.
2. Horizontal shift of c2 units: + for left and − for right.

Sometimes given the expression of the function, it is not


straightforward to determine the c1 and c2 values. Some
algebraic manipulation, such as completing the squares, is
required and this will be seen in the next example.

18 / 52
Example: Sketch the graph of the following functions
1
(i) y = x−1 + 2
(ii) y = x2 − 6x + 10

Exercise Sketch the graph of the functions below. Note that


u(x) is the step function.
(i) y = ln(x − 2) − 1

(ii) y = x − 1 + 1
(iii) y = x2 − 2x + 2
(iv) y = u(x + 1) − 1

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.

We shall consider a special case when one of the function is the


step function u(x) or its shifted version. This is very important
in certain areas of electrical and mechanical engineering.

What we would like to do here is to determine the graph

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)

Exercise: Sketch the graph of the functions below.


(i) y = x2 u(x)
(ii) y = x u(x − 2)
(iii) y = cos(x − π/4) u(x)
(iv) y = cos(x − π/4) u(x − π/4)

21 / 52
T RANSFORMATION BY REFLECTION AND
STRETCHING .

We continue our study of transformation of basic graphs by


looking at other types of operation. The basic idea is still to
understand how the shapes are inherited. Eventually we would
like to combine these operations to give quite general graphs.

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.

Q: If y = 2x + 1 is the original function, what is the new function


obtained by (a) reflection about the vertical axis; (b) reflection about
the horizontal axis?

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.

Q: If y = x2 + 1 is the original function, what is the new function


obtained by (a) stretching vertically by a factor of 2; (b) stretching
horizontally by a factor of 2?

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.

Exercise: For following functions, (a) identify the basic


function; (b) identify the transformation; (c) sketch the graph.

(i) y = − 3 x.

(ii) y = 3 −x.
(iii) y = e−x .
(iv) y = −ex .
1
(v) y = 2 sin x.
(vi) y = sin(x/2).
26 / 52
Combination of transformations:
I All the transformations we have discussed here and in the
previous section can be combined to give a variety of
graphs.
I However the transformed graph will still inherit the shape
of the original graph.
I It is important to identify the correctly the transformations
that are used and also the sequence in which they are
applied.

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.

Exercise: For following functions, (a) identify the basic


function; (b) identify the the sequence of transformation; (c)
sketch the graph.
(i) y = 1 − x2 .

(ii) y = 1 + 3 x − 1.
(iii) y = 1 + 2 sin x.
(iv) y = 3 − cos x.
(v) y = (1 + e−x )u(x).
(vi) y = (1 − 21 e−x )u(x).
28 / 52
THE DEFINITE INTEGRAL

The study of calculus are broadly be divided into two parts.


The first is called differential calculus which mainly involves
the derivative and we studied that in the previous weeks. We
now embark on the second part called integral calculus.
Central to this is the concept of the integral, which finds many
applications, such as calculating the area of a region with
curved boundaries.

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.

Consider the figure below:

´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

and the diagram below

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

The symbol x (variable of integration) can be interchanged


with any other symbol, e.g. t. Hence the term ’dummy’ as
it is basically a placeholder.
I Zero width interval:
ˆ a
f (x) dx = 0
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

Lower limit becomes upper limit and vice-versa.


I Dividing the interval into two:
ˆ b ˆ c ˆ b
f (x) dx = f (x) dx + f (x) dx
a a c

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

Important note: These results only apply if there are symmetry


in the limits and in the function.
37 / 52
These results can also be understood visually using the figures
shown below. The shaded area represent the value of the
integral.

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.

Exercise: Determine if the following integrals equal zero or not:


´π
1. I = x sin x dx
´−π
π
2. I = x sin(x2 ) dx
´−π
π 2)
3. I = −π/2 x sin(x dx

39 / 52
A NTIDERIVATIVE AND E VALUATING I NTEGRALS

In the previous section we used geometrical formulas to


evaluate definite integrals. This however limits the type of
integrals that can be evaluated. In practice integrals are
evaluated with the help of antiderivatives. The term ’anti’
suggest something which is the reverse or opposite and one can
think of integration to be the reverse of differentiation.

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).

A general antiderivative is also known as an indefinite integral


written as ˆ
f (x) dx = G(x) + C

where C is an arbitrary constant. Note that an indefinite


integral have no limits.

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.

Useful tip: To check if you get the right result in integration,


differentiate your answer and see if it gives you the original
function.

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

The Fundamental Theorem of Calculus formally establishes a


connection differential calculus and integral calculus. The
relationships and formulas are also useful to enable the efficient
evaluation of certain integrals.

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).

Another related rule that is very useful is obtained by


combining FTC1 above with the Chain rule to give the Leibniz’s
Rule :
h´ i
d u(x)
dx a f (t) dt = f (u) du
dx (LR)

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

You might also like