0% found this document useful (0 votes)
25 views36 pages

Lecture 01

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)
25 views36 pages

Lecture 01

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/ 36

MA1521 Calculus for Computing

Lecture 1

Wong Yan Loi

National University of Singapore

January 11, 2022

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 1 / 36
Assessment

1 Final exam (open book via Zoom proctoring) - 50%


2 Midterm (open book via Zoom proctoring) - 35% (schedule on the
first lecture of week 8 (i.e. 8 March 2022, 8-10am). Material to be
tested includes chapter 1 to 5, and tutorial 1 to 5.)
3 Three assignments - each 5% (due on week 4,9,12 Wed noon)

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 2 / 36
1 All learning material will be uploaded at Luminus.
2 Learning schedule is at Luminus.
3 Textbook: Thomas’ Calculus, Weir and Hass, Fourteenth edition.
2018 Pearson, ISBN 9780134438986

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 3 / 36
Table of Contents

1 Real Numbers and Functions

2 Absolute Value

3 Functions

4 Polynomials

5 Rational Functions

6 Trigonometric Functions

7 Exponential and Logarithmic Functions

8 The Range of a Function

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 4 / 36
Chapter 0: Real numbers and functions
Read Thomas’ Calculus, Chapter 1.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 5 / 36
Real Numbers and Functions

The collection of all real numbers is denoted by R. Thus R includes the


integers
. . . , −2, −1, 0, 1, 2, 3 . . . ,

√ where p and q are integers (q 6= 0), and the


the rational numbers, p/q,
irrational numbers, like 2, π, e, etc.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 6 / 36
Real Numbers and Functions

a ∈ R means a is a member of the set R. In other words, a is a real


number.

Given two real numbers a and b with a < b, the closed interval [a, b]
consists of all x such that a ≤ x ≤ b, and the open interval (a, b)
consists of all x such that a < x < b.

Similarly, we may form the half-open intervals [a, b) and (a, b].

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 7 / 36
Absolute Value

The absolute value of a number a ∈ R is written as |a| and is defined


as 
a if a ≥ 0
|a| =
−a if a < 0.
For example, |2| = 2, | − 2| = 2.

Some properties of |x| are summarized as follows:


1 | − x| = |x|, for all x ∈ R.
2 |xy| = |x||y |, for all x, y ∈ R.
3 −|x| ≤ x ≤ |x|, for all x ∈ R.
4 For a fixed r > 0, |x| < r if and only if x ∈ (−r , r ).

5 x 2 = |x|, x ∈ R.
6 (Triangle Inequality) |x + y | ≤ |x| + |y| for all x, y ∈ R.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 8 / 36
Absolute Value

Example
2x − 1
Solve the inequality < 1.
2x + 1

Solution.
2x − 1
<1
2x + 1
2x − 1
⇔0 < 1 −
2x + 1
2x + 1 − 2x + 1
⇔0 <
2x + 1
2
⇔0 <
2x + 1
⇔ 0 < 2x + 1
1
⇔ − < x.
2


Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 9 / 36
Absolute Value

Example
Solve the inequality |x + 1| ≤ |2x − 1|.

Solution.

|x + 1| ≤ |2x − 1|
⇔ |x + 1|2 ≤ |2x − 1|2
⇔ x 2 + 2x + 1 ≤ 4x 2 − 4x + 1
⇔ 0 ≤ 3x 2 − 6x
⇔ 0 ≤ 3x(x − 2)
⇔ x ≤ 0 or x ≥ 2
⇔ x ∈ (−∞, 0] ∪ [2, ∞).

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 10 / 36
Absolute Value

Exercise
Let r > 0. Prove that |x − a| < r if and only if x ∈ (−r + a, a + r ).

Exercise
Prove the triangle inequality |x + y| ≤ |x| + |y|.

Exercise
Prove that for any x, y ∈ R, ||x| − |y|| ≤ |x − y|.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 11 / 36
Absolute Value

Example
Prove the triangle inequality |x + y| ≤ |x| + |y|.

Solution.

|x + y| ≤ |x| + |y|
⇔ |x + y|2 ≤ (|x| + |y|)2
⇔ (x + y)2 ≤ (|x| + |y |)2
⇔ x 2 + y 2 + 2xy ≤ |x|2 + |y |2 + 2|x||y|
⇔ x 2 + y 2 + 2xy ≤ x 2 + y 2 + 2|x||y|
⇔ xy ≤ |x||y |
⇔ xy ≤ |xy|.

Since the last inequality xy ≤ |xy| is true, we have proved the triangle
inequality.


Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 12 / 36
Functions

A function f : A −→ B is a rule that assigns to each a ∈ A one specific


member f (a) of B. Symbolically we may denote the function by
a 7→ f (a). We can specify a function f by giving the rule for f (x).

Example
f (x) = x 2 /(1 − x) assigns the number x 2 /(1 − x) to each x 6= 1 in R.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 13 / 36
Functions

The set A is called the domain of f and B is the codomain of f .


The range of f is the subset of B consisting of all the values of f . That
is, the range of f = {f (x) ∈ B | x ∈ A}.
Given f : A −→ R, it means that f assigns a value f (x) in R to each
x ∈ A.
Such a function is called a real-valued function.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 14 / 36
Functions

For a real-valued function f : A −→ R defined on a subset A of R, the


graph of f consists of all the points (x, f (x)) in the xy-plane.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 15 / 36
Functions

If f : A → B and g : B → C, then the composite function of f and g is


the function g ◦ f : A → C given by g ◦ f (x) = g(f (x)).

Example
1
Let f (x) = x and g(x) = x 2 − 1. Find g ◦ f and f ◦ g.

Solution. g ◦ f (x) = g(f (x)) = g( x1 ) = ( x1 )2 − 1 = 1


x2
− 1.

1
f ◦ g(x) = f (g(x)) = f (x 2 − 1) = x 2 −1
.


Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 16 / 36
Functions

Let f : A → B. If g : B → A is a function such that f (g(x)) = x for all


x ∈ B and g(f (x)) = x for all x ∈ A, then g is called the inverse of f .
Similarly, f is the inverse of g.
The inverse function of f is usually denoted by f −1 .
Let f : A → B.
f is called an injective function if for any x, y ∈ A, f (x) = f (y) ⇒ x = y.
f is called a surjective function if for any z ∈ B, there is an x ∈ A such
that f (x) = z.
f is called a bijective function if f is injective and surjective.

Exercise
Prove that if f −1 exists, then f is a bijective function.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 17 / 36
Functions

The graph of f −1 is obtained by reflecting the graph of f about the line


y = x.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 18 / 36
Polynomials

A function of the form p(x) = an x n + an−1 x n−1 + · · · + a1 x + a0 , where


a0 , . . . , an are constants, is called a polynomial of degree n.
For example, a quadratic function p(x) = ax 2 + bx + c is a polynomial
of degree 2.
A polynomial of degree n can be factored as a product of linear and
quadratic factors.
For example, x 4 − 1 = (x 2 + 1)(x + 1)(x − 1).
In general a polynomial of degree n has at most n real roots.
For example, x 4 − 1 has only two real roots −1 and 1.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 19 / 36
Rational Functions

p(x)
A rational function is a function of the form , where p(x) and q(x)
q(x)
p(x)
are polynomials. The domain of consists of all real numbers
q(x)
except the roots of q(x).

x3 + 3
For example, the domain of is R \ {−1, 1}.
x4 − 1

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 20 / 36
Trigonometric Functions

The 6 trigonometric functions are sin x, cos x, tan x, csc x, sec x, cot x.
They are periodic functions of period 2π.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 21 / 36
Trigonometric Functions

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 22 / 36
Trigonometric Functions

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 23 / 36
Trigonometric Functions

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 24 / 36
Trigonometric Functions

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 25 / 36
Trigonometric Functions

Exercise
Sketch the graph of csc(x).

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 26 / 36
Exponential and Logarithmic Functions

A function of the form f (x) = ax , where a > 0 is called an exponential


function. It’s inverse function, denoted by loga x is called the
logarithmic function to the base a.

Let e = 2.718281828459045235360287 be the Euler constant. Then


the inverse of the exponential function ex is the natural logarithm ln x.

We have eln x = x for x > 0 and ln ex = x for all x.

The domain of ex is R and the range is the set R+ of all positive real
numbers.

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 27 / 36
Exponential and Logarithmic Functions

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 28 / 36
Exponential and Logarithmic Functions

Example
4
Sketch the graph of y = x+2 − 3.

Solution. The domain of the function y is R \ {−2}.


When x > −2 and close to −2, the value of y is large and tends to
positive infinity.
When x < −2 and close to −2, the value of y is large and tends to
negative infinity.
4
When x is large and positive, the term x+2 is positive and small, the
value of y is bigger than −3 but close to −3.
4
When x is large and negative, the term x+2 is negative and small, the
value of y is smaller than −3 but close to −3.
Also if x2 > x1 , then x24+2 − 3 < 4
x1 +2 − 3. That is y2 < y1 , meaning y is
a decreasing function.
With this information, we can sketch he graph of y as follow.
Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 29 / 36
Exponential and Logarithmic Functions


Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 30 / 36
The Range of a Function

In general it is not so easy to determine the range of a function. In


some simple cases, basic algebraic techniques can be used to find the
range of a function.

Example
1
Find the maximal domain and the range of f (x) = x−1 .

Solution. The maximal domain of f is R \ {1}.


Recall that the range of f = {f (x) ∈ R | x 6= 1}.
1
To find the range of f , let y = f (x). That is y = x−1 . Solving for x, we
1
get x = 1 + y . From this we see that if y 6= 0 then we may choose
1
x =1+ y to get f (x) = y . Thus the range of f is R \ {0}.


Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 31 / 36
The Range of a Function

Example
Find the maximal domain and range of f (x) = x 2 − x + 1.

Solution. The maximal domain of f is R.


To find the range of f , let y = f (x). That is y = x 2 − x + 1. Solving for
x, we get
x = 12 (1 ± 1 − 4(1 − y)). That is x = 21 (1 ± 4y − 3)).
p p

From this we see that if y ≥ 43 then we may choose


x = 21 (1 ± 4y − 3)) to get f (x) = y. Thus the range of f is [ 34 , ∞).
p

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 32 / 36
The Range of a Function

Exercise
Let f (x) = x + 5 and g(x) = x 2 − 3. Find the maximal domain and
range of g(f (x)).

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 33 / 36
The Range of a Function

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 34 / 36
The Range of a Function

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 35 / 36
The Range of a Function

Wong Yan Loi (NUS) MA1521 Calculus for Computing Lecture 1 January 11, 2022 36 / 36

You might also like