Calculus Template

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

Jomo Kenyatta University of Agriculture and Technology

Calculus I Lecture Notes


Sept/Dec 2024
Course content
• Functions: definition, domain, range, codomain, composition (or composite), inverse.
• Limits, continuity and differentiability of a function.
• Differentiation by first principle and by rule for xn (integral and fractional n).
• Other techniques of differentiation, i.e., sums, products, quotients, chain rule; their applications to
algebraic, trigonometric, logarithmic, exponential, and inverse trigonometric functions all of a
single variable.
• Implicit and parametric differentiation.
• Applications of differentiation to: rates of change, small changes, stationary points, equations of
tangents and normal lines, kinematics, and economics and financial models (cost, revenue and
profit).
• Introduction to integration and its applications to area and volume.

References
[1] Calculus: Early Transcendentals (8th Edition) by James Stewart
[2] Calculus with Analytic Geometry by Roland E. Larson, Robert P. Hostetler and Bruce H. Edwards;
5th edition
[3] Calculus and Analytical Geometry (9th edition) by George B. Thomas and Ross L. Finney
[4] Advanced Engineering Mathematics (10th ed.) by Erwin Kreyszig
[5] Calculus by Larson Hostellem

Lecture 1
1 Functions
To understand the word function, we consider the following scenario and definitions. For
example, the growth of a sidling is an instance of a functional relation, since the growth
may be affected by variations in temperature, moisture, sunlight, etc. If all these factors
remain constant, then the growth is a function of time.
Definition 1.1 (Variables). A variable is an object, event, time period, or any other type of
category you are trying to measure.

1
⃝Francis
c Oketch

Consider the formula used for calculating the volume of a sphere of radius r.
4
V = πr3 (1)
3
Then,

i) V and r vary with different spheres. Hence, they are called variables.
4
ii) π and are constants, irrespective of the size of the sphere.
3
There are two types of variables, i.e., independent and dependent variables.

Definition 1.2 (Independent and dependent variables). Independent variable refers to the input value
while dependent variable refers to the output value.

For example from formula (1), the volume, V , depends on the value of the radius, r, of the sphere.
In this case, r is called the independent variable while V is called the dependent variable since it is
affected by the variation of r. Similarly, for the function y = ax2 + bx + c, a, b and c are constants, x
is the independent variable and y is the dependent variable.

Definition 1.3 (Function). A function is a rule that assigns/associates each element in the
independent set, say X, to a unique element in the dependent set, say Y .

Examples of functions are

i) Linear functions e.g., y = x + 5

ii) Quadratic functions e.g., y = x2 − 2x + 5

iii) Cubic functions e.g., y = x3 − 1

iv) Quartic functions e.g., y = 2x4 + x3 − 1

v) Trigonometric functions e.g., y = sin(2x + 5)

vi) Logarithmic functions (log to base 10) e.g., y = log(3x + 1)

vii) Natural logarithmic functions (log to base e ≈ 2.71828) e.g., y = ln(5x + 1)

viii) Inverse of trigonometric functions e.g., y = tan−1 (2x + 1)

ix) Exponential functions e.g., y = e2x+1

x) Absolute value functions e.g., y = |x|. This function is defined as

{
−x, if x < 0
y = |x| =
x, if x ≥ 0

→ Note: in the above examples the variable y depends on the variable x. Thus, we say that the
dependent variable y is a function of the independent variable x. Using function notation, we write
y = f (x), where f is a function. The function f (x) is read as f of x, meaning that f depends on x.

2
1.1 Domain, Range and Codomain ⃝Francis
c Oketch

1.1 Domain, Range and Codomain


Definition 1.4 (Domain). A domain consists of all the elements in the independent set (i.e., the set
of inputs), X, for which the function is defined.
Definition 1.5 (Range). A range refers to a set of all the images of the elements in the domain.
Definition 1.6 (Codomain). A codomain consists of all the elements in the dependent set (i.e., the
set of outputs), Y .
For example, consider the diagram below

Example(s):
1. Find the domain and range of the following functions.
(a) f (x) = (x − 4)2 + 5

Solution
 Since f (x) is defined (or is a real number) for any real number x, the domain of f is
the interval (−∞, ∞).

 Let y = (x − 4)2 + 5. Making x the subject, we have x = 4 ± y − 5. This function is
defined if y − 5 ≥ 0 or y ≥ 5. Therefore, the range is the interval [5, ∞).
(b) f (x) = 2x2 − 5x + 1

Solution
 Since f (x) is defined (or is a real number) for any real number x, the domain of f is
the interval (−∞, ∞).
 Let y = 2x2 − 5x + 1 or 2x√ 2 − 5x + (1 − y) = 0. Making x the subject (use quadratic

5 ± 25 − 8(1 − y)
formula), we have x = . This function is defined if 25 − 8(1 − y) ≥ 0
4 [ )
17
or y ≥ − . Therefore, the range is the interval − 178 ,∞ .
8
4
(c) f (x) = 2
x − 5x + 6
Solution
→ Note: 4/0 = ∞ (infinity), vvvv large value, undefined, indeterminate.
 The function f (x) is defined when the denominator is nonzero, i.e., if x2 − 5x + 6 ̸= 0.
Solving yields x ̸= 2 and x ̸= 3. Therefore, the domain of f includes all the real numbers
of x except x = 2 and x = 3, i.e., the set (−∞, ∞)\{2, 3} or (−∞, 2) ∪ (2, 3) ∪ (3, ∞).
4 ( )
 Let y = 2 or x2 − 5x + 6 − y4 = 0. Making x the subject (use quadratic
x − 5x + 6
formula), we have √ ( )
5± 25 − 4 6 − 4
y
x=
2
( )
This function is defined if 25 − 4 6 − 4
y ≥ 0 or y ≥ −16. Therefore, the range is the
interval [−16, ∞).

3
1.2 Evaluation of functions ⃝Francis
c Oketch


(d) f (x) = x−1

Solution
 Since f (x) is defined (or is a real number) if x − 1 ≥ 0 or x ≥ 1, the domain of f is the
interval [1, ∞).

 Let y = x − 1. Making x the subject, we have x = y 2 + 1. This function is defined
for any real number y. Therefore, the range is the interval (−∞, ∞).
(e) f (x) = 2|x − 3| + 4

Solution
 Since f (x) is defined for all real numbers, the domain of f is the interval (−∞, ∞).
 Since for all |x − 3| ≥ 0, the function f (x) = 2|x − 3| + 4 ≥ 4. Therefore, the range is
all the values of y for which y ≥ 4 or the interval [4, ∞).

Exercise:

1. Find the domain and range of the following functions.

(a) f (x) = 6 − x2 . [ans: domain (−∞, ∞), range (−∞, 6]]


6 + 3x
(b) f (x) = . [ans: domain (−∞, 0.5) ∪ (0.5, ∞), range (−∞, 1.5) ∪ (1.5, ∞)]
1 − 2x
x+5
(c) f (x) = . [ans: domain (−∞, 2) ∪ (2, ∞), range (−∞, 1) ∪ (1, ∞)]
x−2

(d) f (x) = 4 − 2x + 5. [ans: domain (−∞, 2], range (−∞, ∞)]

x2 − 16 [ ]
(e) f (x) = .[ans: domain (−∞, −4) ∪ [4, 6) ∪ (6, ∞), range − √2 , √2 \{−1, 1}]
x2 − 2x − 24 3 3

1.2 Evaluation of functions


This involves replacing x in the function by the suggested value and retaining the rule of the function.

Example(s):
f (x + h) − f (x)
1. Given f (x) = 2x + 1. Find: (i) f (0), (ii) f (1), (iii) f (x + 2), and (iv) for h ̸= 0.
h

Solution

i) f (0) = 2(0) + 1 = 0 + 1 = 1
ii) f (1) = 2(1) + 1 = 2 + 1 = 3
iii) f (x + 2) = 2(x + 2) + 1 = 2x + 4 + 1 = 2x + 5
f (x + h) − f (x) [2(x + h) + 1] − [2x + 1] 2x + 2h + 1 − 2x − 1 2h
iv) = = = = 2.
h h h h
f (x + h) − f (x)
2. Given f (x) = 3x2 − 2x + 4. Find: (i) f (0), (ii) f (−1), (iii) f (x + 2), and (iv)
h
for h ̸= 0.

Solution

i) f (0) = 3(0)2 − 2(0) + 4 = 0 + 0 + 4 = 4


ii) f (−1) = 3(−1)2 − 2(−1) + 4 = 3 + 2 + 4 = 9
iii) f (x + 2) = 3(x + 2)2 − 2(x + 2) + 4 = 3(x2 + 4x + 4) − 2x − 4 + 4 = 3x2 + 10x + 12

4
1.3 Composite functions ⃝Francis
c Oketch

iv)
[ ] [ ]
f (x + h) − f (x) 3(x + h)2 − 2(x + h) + 4 − 3x2 − 2x + 4
=
h ( 2 h ) ( )
3x + 6hx + 3h2 − 2x − 2h + 4 − 3x2 − 2x + 4 6hx + 3h2 − 2h
= =
h h
= 6x + 3h − 2

3. Given f (x) = x2 − 4x + 3. Find: (i) f (1), (ii) f (2), (iii) f (a), and (iv) f (a + h).

Solution

i) f (x) = x2 − 4x + 3 ⇒ f (1) = 12 − 4(1) + 3 = 0


ii) f (x) = x2 − 4x + 3 ⇒ f (2) = 22 − 4(2) + 3 = −1
iii) f (x) = x2 − 4x + 3 ⇒ f (a) = a2 − 4a + 3
iv) f (x) = x2 − 4x + 3 ⇒ f (a + h) = (a + h)2 − 4(a + h) + 3

4. Given ϕ(θ) = 2 sin θ. Find: (i) ϕ( π2 ), (ii) ϕ(0), and (iii) ϕ( π3 ).

Solution
(π)
i) ϕ(θ) = 2 sin θ ⇒ ϕ( π2 ) = 2 sin 2 =2
ii) ϕ(θ) = 2 sin θ ⇒ ϕ(0) = 2 sin (0) = 0

(π) 3 √
iii) ϕ(θ) = 2 sin θ ⇒ ϕ( π3 ) = 2 sin 3 =2× = 3
2

Exercise:
f (x + h) − f (x)
(a) Given f (x) = x3 + 2x + 1, find: (i) f (0), (ii) f (−a), (iii) f (x + 2), and (iv) for
h
h ̸= 0.
1 g(x + h) − g(x)
(b) Given g(x) = √ , find: (i) f (0), (ii) f (1), (iii) f (x + 2), and (iv) for h ̸= 0.
x+1 h
6 − 2x p(x + h) − p(x)
(c) Given p(x) = , find: (i) f (0), (ii) f (−1), (iii) f (2 − x), and (iv) for h ̸= 0.
1 + 3x h
(d) If f (x) = 2x2 − 4x + 1, find (i) f (1), (ii) f (0), (iii) f (2), (iv) f (a), and f (x + h).

(e) If f (x) = (x − 1)(x + 5), find (i) f (1), (ii) f (0), (iii) f (2), (iv) f (a + 1), and f ( a1 ).

(f) If f (θ) = cos θ, find (i) f ( π2 ), (ii) f (0), (iii) f ( π3 ), (iv) f ( π6 ), and (v) f (π).

f (3.001) − f (3)
(g) If f (x) = x2 , find (i) f (3), (ii) f (3.1), (iii) f (3.01), (iv) f (3.001), and .
0.001
(h) If ϕ(x) = 2x , find (i) ϕ(0), (ii) ϕ(1), and (iii) ϕ(0.5).

1.3 Composite functions


The composition of functions is a function of another function. Consider the function f with domain
A and range B, and the function g with domain D and range E. If B is a subset of D, then the
composite function (gof )(x) is the function with domain A and range E such that

(gof )(x) = g(f (x))

For example, given f (x) = 2x + 1 and g(x) = 5x − 3. Then,

(gof )(x) = g(f (x)) = g(2x + 1) = 5(2x + 1) − 3 = 10x + 2

5
⃝Francis
c Oketch

Similarly,
(f og)(x) = f (g(x)) = f (5x − 3) = 2(5x − 3) + 1 = 10x − 5
→ Note: (f og)(x) ̸= (gof )(x).

Exercise:

1. Given f (x) = x2 − 1, g(x) = x − 1 and h(x) = x. Find:
(a) (f og)(x)
(b) (hog)(x)
(c) (gog)(x)
(d) (gohof )(x)
2. Consider the functions f (x) = x2 + 1 and g(x) = 1/x. Evaluate
(a) (f og)(4)
(b) (gof )(−1/2)

3. If f (x) = x and g(x) = 4x + 2, find the domain of (f og)(x). [ans: x ≥ −0.5 or (−∞, −0.5]]

Lecture 2

2 Limits of functions
Definition 2.1 (Basic limit definition). Let f (x) be a function and let a and L be real numbers. If
f (x) approaches L as x approaches a from either RHS or LHS of a (but is not equal to a), then we
say that f (x) has limit L as x approaches a, and is mathematically written as:
. = L.
lim f (x)
x→a

Diagrammatically, we have

→ Note: lim f (x) is the value that f (x)


x→a
approaches as x approaches a, and a does
not have to be in the domain of f .

2.1 Properties of limits


Theorem 2.1. Suppose lim f (x) = L1 and lim g(x) = L2 . Then,
x→a x→a
[ ] [ ]
1. [Addition/subtraction rule] lim [f (x) ± g(x)] = lim f (x) ± lim g(x) = L1 ± L2
x→a x→a x→a
[ ]
2. [Scalar multiple] lim [λf (x)] = λ lim f (x) = λL1 , where λ is a constant.
x→a x→a
[ ] [ ]
3. [Product rule] lim [f (x) · g(x)] = lim f (x) · lim g(x) = L1 · L2
x→a x→a x→a
[ ] lim f (x)
f (x) L1
4. [Quotient rule] lim = x→a = , provided g(a) ̸= 0.
x→a g(x) lim g(x) L2
x→a
√ ( )1/n √
5. lim n
f (x) = lim f (x) = (L1 )1/n = n
L1
x→a x→a
→ Note: if f (x) = c (where c is a constant), then lim [f (x)] = lim [c] = c
x→a x→a

6
2.2 Techniques of evaluating limits of functions ⃝Francis
c Oketch

2.2 Techniques of evaluating limits of functions


 Direct substitution (DS)
The required limit is obtained by just plugging in the value of input, say x, into the given
function, say f (x).

Example(s):

(a) Evaluate lim 3x3 − x2 + 2x + 5.


x→2
Solution

lim (3x3 − x2 + 2x + 5) = 3 lim x3 − lim x2 + 2 lim x + lim 5)


x→2 x→2 x→2 x→2 x→2
= 3(2 ) − (2 ) + 2(2) + 5
3 2

= 29

x2 − 1
(b) Evaluate lim .
x→1 x + 1
Solution
x2 − 1 D.S 12 − 1 0
lim = = =0
x→1 x + 1 1+1 2

 Factorization
If on direct substitution we get the indeterminate form 0/0, then it means that there is a
common factor in both the numerator and denominator. In this case, we perform factorization
first so as to simplify the given function.

→ Note: if the polynomial in the numerator is of degree greater than the degree of the polynomial
in the denominator, we first need to perform long division.

Example(s):
x2 + x − 6
(a) Evaluate lim
x→2 x−2
Solution
x2 + x − 6 (x − 2)(x + 3)
lim = lim
x→2 x−2 x→2 x−2
D.S
= lim (x + 3) = 2 + 3
x→2
= 5

x2 + 3x + 2
(b) Evaluate lim
x→−2 2x2 − 8
Solution
x2 + 3x + 2 (x + 2)(x + 1)
lim = lim
x→−2 2x2 − 8 x→−2 2(x + 2)(x − 2)
x + 1 D.S −2 + 1 −1
= lim = =
x→−2 2(x − 2) 2(−2 − 2) −8
1
=
8

x3 − 1
(c) Evaluate lim .
x→1 x2 − 1

7
2.2 Techniques of evaluating limits of functions ⃝Francis
c Oketch

Solution
( )
x3 − 1 x−1
lim 2 = lim x + 2 (long division)
x→1 x − 1 x→1 x −1
[ ]
x−1
= lim x + (factorization)
x→1 (x − 1)(x + 1)
( )
1 D.S 1 1
= lim x + = 1+ =1+
x→1 x+1 1+1 2
3
=
2
 Limits at infinity
In this case, we first divide the numerator and denominator by the highest power of x in the
denominator.

Example(s):
5x3 − 1
(a) Evaluate lim .
x→∞ 4x3 − 2x − 7

Solution
1 1
5x3 − 1 5− 5− 5−0
lim = lim x3 D.S
= ∞ =
x→∞ 4x3 − 2x − 7 x→∞ 2 7 2 7 4−0−0
4− 2 − 3 4− −
x x ∞ ∞
5
=
4
 Rationalization
Suppose there exists a surd in either the numerator or denominator or both. Then, we first need
to multiply both the numerator and denominator by the conjugate of the factor containing the
surd (in either the numerator or denominator) and then simplify the resulting function. After
rationalization, we perform a direct substitution.
→ Note: in case the surds appear in both the numerator and denominator, then we rationalize
the denominator.

Example(s):

(a) Evaluate lim x2 − 4x − x.
x→∞

Solution
(√ )
√ (√ ) x2 − 4x + x
lim x2 − 4x − x = lim x2 − 4x − x √
x→∞ x→∞ x2 − 4x + x
x2 − 4x − x2 −4x
= lim √ = lim √
x→∞ x − 4x + x
2 x→∞ x − 4x + x
2
1
−4x · −4
lim (√ x lim √
= ) 1 = x→∞
x→∞
x2 − 4x + x · 4
1− +1
x x
D.S −4 −4 −4
= √ =√ =
4 1−0+1 1+1
1− +1

= −2

8
2.2 Techniques of evaluating limits of functions ⃝Francis
c Oketch


x−3
(b) Evaluate lim .
x→9 x − 9

Solution
√ √ √
x−3 ( x − 3)( x + 3)
lim = lim √
x→9 x − 9 x→9 (x − 9)( x + 3)
(x − 9) 1
= lim √ = lim √
x→9 (x − 9)( x + 3) x→9 x+3
D.S 1 1
= √ =
9+3 3 + 3
1
=
6

Exercise:
√ √
(a) lim x2 − 2 − x2 + x.
x→∞

Solution
(√ )
√ √
√ √ √ x2 − 2 + x2 + x
lim x2 − 2 − x2 + x = lim x2 − 2 − x2 + x · √ √
x→∞ x→∞ x2 − 2 + x2 + x
(x2 − 2) − (x2 + x) −2 − x
= lim √ √ = lim √ √
x→∞ x −2+ x +x
2 2 x→∞ x − 2 + x2 + x
2
2 2
− −1 − −1
= lim √ x √
D.S
= √ ∞ √
x→∞ 2 1 2 1
1− 2 + 1+ 1− + 1+
x x ∞ ∞
1
= −
2

x3 − 1
(b) Evaluate lim . [ans: 3]
x→1 x − 1

1− x
(c) Evaluate lim . [ans: 1/2]
x→1 1 − x
5x2 − 3x + 2
(d) Evaluate lim . [ans: 1/2]
x→∞ 10x2 − x + 100
√ √
1+x− 1−x
(e) Evaluate lim . [ans: 1]
x→0 x
→ Note: A function which grows arbitrarily large as x goes to positive or negative infinity is said to
have an infinite limit. Infinity is not a real number, so if a function has infinite limit, we
say that the limit does not exist.

Lecture 3

Theorem 2.2 (Squeeze law (sandwich theorem)). Suppose that f (x) ≤ g(x) ≤ h(x) holds for all
x around a, except possibly at x = a. If lim f (x) = lim h(x) = L, then lim g(x) = L.
x→a x→a x→a

Example(s):
( )
1
1. Find lim x sin .
x→0 x2 + x

Solution

You might also like