Calculus of Single Variables
Fully Worked Tutorial Guide
A step-by-step companion to the HAI103 / HDS103 / HCC103 / HCS103 / HICH107
assignment
University of Zimbabwe — Department of Mathematics and Computational Sciences
How to use this guide
This guide walks through every question on the assignment from first principles, assuming you are meeting some of these ideas for the first time. Each
question is presented in three parts:
Key idea — the one or two facts/tools you need before you start.
Worked solution — the full, line-by-line working.
Tip — a shortcut, common mistake to avoid, or a way to check your answer.
Read the Key idea box first and try the question yourself before reading the
solution — you will learn far more that way than by only reading. Use this as
a study companion; write your final submission in your own words with your
group.
Compiled as a study aid. All working shown for learning purposes.
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Contents
1 The Basics and Induction
2
2 Number Systems and Absolute Value
5
3 Sequences
7
4 Functions
10
5 Limits and Continuity
12
6 Differentiation
14
7 Mean Value Theorem and L’Hôpital’s Rule
17
8 Extrema and Curve Sketching
20
9 Integration
22
1
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 1 The Basics and Induction
(a) Solve |x − 1| + |2x + 3| ≤ 6 and show the solution set on the real line.
[4]
Key idea
An absolute value |A| ”switches formula” depending on the sign of A. To solve an inequality
with several absolute values, find the points where each expression inside the bars is zero (these
are called critical points), then split the real line into intervals around them and solve the
inequality separately on each interval.
Worked solution. The critical points are where x − 1 = 0 and 2x + 3 = 0, i.e. x = 1 and x = − 32 .
These split R into three intervals: x < − 32 , − 32 ≤ x < 1, x ≥ 1.
Interval 1: x < − 32 . Here x − 1 < 0 and 2x + 3 < 0, so
|x − 1| = 1 − x,
|2x + 3| = −(2x + 3) = −2x − 3.
The inequality becomes
(1 − x) + (−2x − 3) ≤ 6 =⇒ −3x − 2 ≤ 6 =⇒ −3x ≤ 8 =⇒ x ≥ − 83 .
(Remember: dividing by a negative number flips the inequality sign.) Combined with x < − 32 :
− 83 ≤ x < − 32 .
Interval 2: − 32 ≤ x < 1. Here x − 1 < 0 but 2x + 3 ≥ 0, so
|x − 1| = 1 − x,
|2x + 3| = 2x + 3.
(1 − x) + (2x + 3) ≤ 6 =⇒ x + 4 ≤ 6 =⇒ x ≤ 2.
This is automatically true throughout − 32 ≤ x < 1, so the whole interval is part of the solution.
Interval 3: x ≥ 1. Here x − 1 ≥ 0 and 2x + 3 > 0, so
|x − 1| = x − 1,
|2x + 3| = 2x + 3.
(x − 1) + (2x + 3) ≤ 6 =⇒ 3x + 2 ≤ 6 =⇒ x ≤ 43 .
Combined with x ≥ 1: 1 ≤ x ≤ 43 .
Putting it together:
− 83 , − 23
∪ − 23 , 1 ∪ 1, 43 = − 83 , 43 .
Number line: a solid dot at − 83 ≈ −2.67 and a solid dot at 43 ≈ 1.33, with the segment between
them shaded (both endpoints included, since the inequality is ≤).
Tip for beginners
Always check your endpoints by substituting back into the original inequality: at x = − 83 ,
7
4 1
17
|x − 1| + |2x + 3| = 11
3 + 3 = 6 (equality holds, good). At x = 3 , 3 + 3 = 6 too. This is a fast
way to catch arithmetic slips.
2
Calculus of Single Variables — Fully Worked Tutorial
(b) Prove by induction that
n
X
3
i =
i=1
University of Zimbabwe
n(n + 1)
2
2
.
[3]
Key idea
Mathematical induction has two steps: (1) Base case — check the statement for the smallest
n (here n = 1). (2) Inductive step — assume the statement is true for n = k (the ”inductive
hypothesis”), and use that assumption to prove it for n = k + 1.
Worked solution. Base case (n = 1): LHS = 13 = 1. RHS =
statement holds for n = 1.
1·2 2
= 12 = 1.
2
Equal, so the
Inductive hypothesis: Assume that for some k ≥ 1,
k
X
3
i =
i=1
k(k + 1)
2
2
.
Inductive step: We must show the formula also holds for n = k + 1. Add the next term, (k + 1)3 ,
to both sides:
k+1
X
i3 =
i=1
k
X
i=1
i3 + (k + 1)3 =
k(k + 1)
2
2
+ (k + 1)3
(by the hypothesis).
Factor out (k + 1)2 :
2
2
2
(k + 1)(k + 2) 2
k
2 k + 4k + 4
2 (k + 2)
+ (k + 1) = (k + 1) ·
= (k + 1) ·
=
.
= (k + 1)
4
4
4
2
2
This is exactly the original formula with n = k + 1. Since the base case holds and the truth of the
statement for n = k forces its truth for n = k + 1, the formula holds for all n ∈ N by the principle
of mathematical induction. ■
Tip for beginners
The whole trick in induction proofs of this type is ”add the next term, then factor”. Always
factor out the common piece — here (k + 1)2 — so that what remains matches the shape of the
formula you are proving.
(c) Prove by induction that 2n ≥ n2 for all integers n ≥ 4, and explain why this
matters when comparing 2n -step and n2 -step algorithms.
[4]
Worked solution. Base case (n = 4): 24 = 16 and 42 = 16, so 24 ≥ 42 holds (with equality).
Inductive hypothesis: Assume 2k ≥ k 2 for some k ≥ 4.
Inductive step: We want to show 2k+1 ≥ (k + 1)2 .
2k+1 = 2 · 2k ≥ 2k 2
(by the hypothesis).
So it is enough to show 2k 2 ≥ (k + 1)2 = k 2 + 2k + 1, i.e. that
k 2 − 2k − 1 ≥ 0.
3
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
For k ≥ 4: at k = 4, k 2 − 2k − 1 = 16 − 8 − 1 = 7 ≥ 0. Also k 2 − 2k − 1 is increasing for k ≥ 1 (its
derivative 2k − 2 > 0 once k > 1), so once it is non-negative at k = 4 it stays non-negative for all
k ≥ 4. Hence 2k 2 ≥ (k + 1)2 , and combining with the line above,
2k+1 ≥ 2k 2 ≥ (k + 1)2 .
By induction, 2n ≥ n2 for all integers n ≥ 4. ■
Why it matters: Once the input size n reaches 4, an algorithm that takes 2n steps will always
need at least as many steps as one that takes n2 steps, and the exponential algorithm’s lead grows
without bound — so for large inputs a polynomial-time (n2 ) algorithm is always the better choice.
Tip for beginners
When an inductive step reduces to ”prove some inequality g(k) ≥ 0 for k ≥ k0 ”, you don’t need
calculus every time: checking it at the smallest value and arguing the expression only grows
from there is a fully rigorous shortcut.
4
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 2 Number Systems and Absolute Value
(a) Express 0.123 = 0.1232323 . . . as p/q in lowest terms.
[2]
Key idea
To convert a recurring decimal to a fraction: multiply by a power of 10 to shift the decimal
point so that two copies of the number line up with the same repeating tail, then subtract to
cancel the repeating part.
Worked solution. Let x = 0.1232323 . . .. The non-repeating part has 1 digit and the repeating
block ”23” has 2 digits.
Multiply by 10 (to move past the non-repeating digit) and by 1000 (to move past one full extra
repeating block):
10x = 1.232323 . . . ,
1000x = 123.232323 . . .
Subtract the first from the second (the repeating tails cancel exactly):
1000x − 10x = 123.2323 . . . − 1.2323 . . . = 122 =⇒ 990x = 122 =⇒ x =
Since 61 is prime and does not divide 495 = 32 · 5 · 11, the fraction
122
61
=
.
990
495
61
is already in lowest terms.
495
Tip for beginners
Quick check: divide 61 ÷ 495 by long division and confirm you get back 0.1232323 . . ..
(b) Express the recurring binary fraction (0.011)2 as p/q in base 10.
[3]
Key idea
The same ”shift and subtract” trick works in any base — in base 2, shifting the point one place
multiplies by 2, not 10. A repeating block of 3 binary digits means we shift by 23 = 8.
Worked solution. Let x = (0.011011011 . . .)2 . The whole decimal expansion is repeating, with
block length 3, so multiply by 23 = 8:
8x = (011.011011 . . .)2 = (011)2 + x = 3 + x,
since (011)2 = 0 · 4 + 1 · 2 + 1 · 1 = 3, and the part after the point is again x.
3
8x = 3 + x =⇒ 7x = 3 =⇒ x = .
7
Tip for beginners
This is the binary analogue of the well-known fact 0.9 = 1 style shift-and-subtract tricks — the
base changes, but the method is identical.
(c) Using |a + b| ≤ |a| + |b|, prove the reverse triangle inequality |x| − |y| ≤ |x − y|.
[3]
5
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Key idea
To prove |A| ≤ B, it is enough to prove both A ≤ B and −A ≤ B (equivalently A ≥ −B). Here
A = |x| − |y|.
Worked solution. Step 1. Write x = (x − y) + y and apply the triangle inequality with a = x − y,
b = y:
|x| = |(x − y) + y| ≤ |x − y| + |y| =⇒ |x| − |y| ≤ |x − y|.
(1)
Step 2. Symmetrically, write y = (y − x) + x and apply the triangle inequality with a = y − x,
b = x:
|y| = |(y − x) + x| ≤ |y − x| + |x| = |x − y| + |x|
(using |y − x| = |x − y|). Rearranging,
|y| − |x| ≤ |x − y| =⇒ −(|x| − |y|) ≤ |x − y| =⇒ |x| − |y| ≥ −|x − y|.
(2)
Combine (1) and (2):
−|x − y| ≤ |x| − |y| ≤ |x − y|,
which is precisely the statement |x| − |y| ≤ |x − y|. ■
Tip for beginners
Whenever you need to bound |A| from both sides, look for a way to prove A ≤ B and then get
−A ≤ B ”for free” just by swapping the roles of the two variables, as we did here.
6
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 3 Sequences
3n2 + 1
= 3.
n→∞ n2 + n
(a) Use the definition of the limit to prove lim
[4]
Key idea
The definition: limn→∞ an = L means for every ε > 0 there exists a natural number N such
that |an − L| < ε for all n > N . The strategy is always: simplify |an − L|, find a simple
expression that is bigger than it (an ”upper bound”), and force that upper bound to be less
than ε — this tells you how to choose N .
Worked solution. Let ε > 0 be given. First simplify the quantity we need to control:
3n2 + 1
3n − 1
1 − 3n
3n2 + 1 − 3(n2 + n)
−3 =
= 2
= 2
2
n +n
n2 + n
n +n
n +n
(for n ≥ 1, so 3n − 1 > 0).
Now bound this from above by something simpler: since 3n − 1 < 3n and n2 + n > n2 ,
3n
3
3n − 1
< 2 = .
n2 + n
n
n
3
3
< ε, we are done. This happens once n > .
n
ε
3
Choice of N : let N = . Then for every n > N ,
ε
So if we make
3n2 + 1
3
3
−3 < <
= ε.
2
n +n
n
N
3n2 + 1
= 3. ■
n→∞ n2 + n
Since ε > 0 was arbitrary, lim
Tip for beginners
You do not need the smallest possible N — any N that works is fine. Using a slightly generous
upper bound (like replacing 3n − 1 by 3n) to get clean algebra is a completely standard and
accepted technique.
(b) Evaluate the following limits, giving full reasons.
[6]
(i) lim
n→∞
p
n2 + 5n − n
Key idea
”∞−∞” expressions involving square roots are handled by multiplying by the conjugate, turning
a subtraction into a fraction.
√
Worked solution. Multiply and divide by the conjugate n2 + 5n + n:
p
(n2 + 5n) − n2
5n
n2 + 5n − n = √
=√
.
2
2
n + 5n + n
n + 5n + n
7
Calculus of Single Variables — Fully Worked Tutorial
Divide top and bottom by n (for n > 0, n =
√
n2 , so
University of Zimbabwe
√
n2 + 5n = n
p
1 + 5/n):
5n
5
5
5
n→∞
= p
=p
−−−→
= .
1+1
2
n 1 + 5/n + n
1 + 5/n + 1
2 3n
(ii) lim 1 −
n→∞
n
Key idea
Remember the fundamental limit 1 + na
expression as a power of the basic form.
n
→ ea . If the exponent is a multiple of n, rewrite the
Worked solution.
3
2 n
2 3n
n→∞
=
1−
−−−→
1−
n
n
e−2
3
= e−6 .
n!
(Squeeze Theorem)
n→∞ nn
(iii) lim
Key idea
The Squeeze Theorem: if 0 ≤ an ≤ bn and bn → 0, then an → 0. Try to trap the sequence
between 0 and something obviously going to 0.
Worked solution. Write out the fraction as a product:
n!
1 2 3
n
= · · ··· .
n
n
n n n
n
Every factor nk with k ≤ n satisfies 0 < nk ≤ 1. So if we keep only the first factor and bound all the
others by 1,
n!
1
1
0 < n ≤ · 1 · 1···1 = .
n
n
n
n!
Since n1 → 0 as n → ∞, the Squeeze Theorem gives lim n = 0.
n→∞ n
Tip for beginners
Splitting a product into ”one troublesome factor” times ”a bunch of factors each ≤ 1” is a very
common squeeze-theorem trick — look out for it whenever you see n! divided by an exponentialtype expression.
1
(c) Newton’s square-root algorithm: a > 0, x1 > 0, xn+1 =
2
a
xn +
.
xn
[10]
Key idea
√
This whole part is a guided proof that a famous iterative method converges to a. The key tool
√
for part (i) is the AM–GM inequality: for positive numbers p, q, p+q
pq, with equality
2 ≥
only when p = q.
(i) Show xn ≥
√
a for all n ≥ 2.
[2]
8
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Worked solution. For any n ≥ 1, xn > 0 (an easy check by induction, since starting from x1 > 0,
the recurrence only adds and divides positive numbers). Apply AM–GM to the positive numbers
p = xn and q = a/xn :
r
xn + xan
√
p+q √
a
xn+1 =
= a.
=
≥ pq = xn ·
2
2
xn
√
√
This shows xn+1 ≥ a for every n ≥ 1 — which is the same as saying xm ≥ a for every m ≥ 2
(just relabel m = n + 1). ■
(ii) Show {xn }n≥2 is monotonic decreasing.
[2]
Worked solution. For n ≥ 2, compute the difference between consecutive terms:
a − x2n
1
a
1 a
xn+1 − xn =
xn +
− xn =
− xn =
.
2
xn
2 xn
2xn
√
From part (i), xn ≥ a for n ≥ 2, so x2n ≥ a, i.e. a − x2n ≤ 0. Since xn > 0, the whole fraction
a − x2n
≤ 0, so
2xn
xn+1 ≤ xn
for all n ≥ 2.
Hence {xn }n≥2 is (monotonically) decreasing. ■
(iii) Deduce convergence, and that the limit is
√
a.
[3]
√
Worked solution. By part (i), the sequence {xn }n≥2 is bounded below (by a); by part (ii), it is
decreasing. The Monotone Convergence Theorem then guarantees the sequence converges to
√
some limit L, with L ≥ a > 0.
To find L: take the limit of both sides of the recurrence xn+1 = 21 xn + xan as n → ∞. Since
xn → L and xn+1 → L (same sequence, shifted by one term), and L ̸= 0,
1
a
a
a
L+
=⇒ 2L = L +
=⇒ L =
=⇒ L2 = a.
2
L
L
L
√
√
Since L ≥ a > 0, we take the positive root: L = a. ■
√
√
(xn − a)2
(iv) Show xn+1 − a =
and interpret it.
2xn
√
Worked solution. Start from the recurrence and subtract a from both sides:
L=
[3]
√
√ 2
√
a
x2n + a − 2 a xn
(xn − a)
xn+1 −
xn +
− a=
=
,
xn
2xn
2xn
√
√
where the numerator was recognised as a perfect square, x2n − 2 a xn + a = (xn − a)2 .
√
1
a=
2
√
e2
Interpretation. If xn has an error en = xn − a, the formula says en+1 = n — the new error is
2xn
proportional to the square of the old error. If en is small (say of size 10−k , meaning about k correct
decimal digits), then e2n is of size 10−2k : the number of correct digits roughly doubles at every step.
This extremely fast behaviour is called quadratic convergence, and it’s why Newton’s method is
used in real calculators and computers to compute square roots.
Tip for beginners
This whole question is a template for almost any ”iterative sequence” problem: (1) bound it,
(2) show monotonicity using the bound, (3) invoke the Monotone Convergence Theorem, (4)
plug the limit into the recurrence to solve for it algebraically.
9
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 4 Functions
(a) Let f : R \ {3} → R \ {2}, f (x) =
2x + 1
. Prove f is a bijection and find f −1 .
x−3
[4]
Key idea
A function is a bijection if it is both injective (one-to-one: different inputs give different
outputs) and surjective (onto: every element of the codomain is hit). To find the inverse, solve
y = f (x) for x in terms of y.
Worked solution. Injectivity. Suppose f (x1 ) = f (x2 ):
2x1 + 1
2x2 + 1
=
.
x1 − 3
x2 − 3
Cross-multiply:
(2x1 + 1)(x2 − 3) = (2x2 + 1)(x1 − 3)
2x1 x2 − 6x1 + x2 − 3 = 2x1 x2 − 6x2 + x1 − 3.
The 2x1 x2 and −3 terms cancel from both sides, leaving
−6x1 + x2 = −6x2 + x1 =⇒ 7x2 = 7x1 =⇒ x1 = x2 .
So f is injective.
Surjectivity. Take any y ∈ R \ {2}; we must find x ̸= 3 with f (x) = y:
y=
2x + 1
=⇒ y(x − 3) = 2x + 1 =⇒ yx − 3y = 2x + 1
x−3
=⇒ x(y − 2) = 1 + 3y =⇒ x =
3y + 1
.
y−2
Since y ̸= 2, this division is valid, so a pre-image x always exists. (If this x equalled 3, substituting
back would force y(0) = 7, impossible — so automatically x ̸= 3, consistent with the domain.)
Hence f is surjective.
Being both injective and surjective, f is a bijection. From the surjectivity working, the inverse
function is
3x + 1
f −1 (x) =
.
x−2
Tip for beginners
Notice f −1 has almost the same shape as f itself — this ”self-similar” pattern is typical of
Möbius-type functions ax+b
cx+d , and it’s a nice way to sanity-check your algebra.
(b) Find the domain of h(x) =
√
x2 − 5x + 6 ln
x+1
.
3−x
[3]
10
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Key idea
For a product of functions, the domain is the intersection of the domains of each piece. Here:
(1) the expression under a square root must be ≥ 0; (2) the argument of ln must be > 0.
Worked solution. Condition 1 (square root): x2 − 5x + 6 ≥ 0. Factorising, (x − 2)(x − 3) ≥ 0,
which holds when x ≤ 2 or x ≥ 3.
x+1
Condition 2 (logarithm):
> 0. A fraction is positive when numerator and denominator
3−x
have the same sign.
Both positive: x + 1 > 0 and 3 − x > 0, i.e. −1 < x < 3.
Both negative: x + 1 < 0 and 3 − x < 0, i.e. x < −1 and x > 3 — impossible simultaneously.
So Condition 2 gives −1 < x < 3.
Intersect the two conditions:
x ≤ 2 or x ≥ 3 ∩
− 1 < x < 3 = (−1, 2].
(The piece x ≥ 3 contributes nothing, since it doesn’t overlap with x < 3.)
Domain: (−1, 2] .
Tip for beginners
√
√
Check the boundary x = 2: 4 − 10 + 6 = 0 = 0 (fine, square root of 0 is allowed) and
ln(3/1) = ln 3 (fine) — so x = 2 is correctly included. Check x = −1: ln(0/4) = ln 0 is
undefined, confirming x = −1 is correctly excluded.
11
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 5 Limits and Continuity
(a) Use the ε–δ definition to prove lim (x2 − 2x) = 3.
x→3
[4]
Key idea
Definition: limx→a f (x) = L means for every ε > 0 there is a δ > 0 such that whenever
0 < |x − a| < δ, we have |f (x) − L| < ε. The standard trick: factor out (x − a) from f (x) − L,
then bound the leftover factor by first restricting δ ≤ 1.
Worked solution. Let ε > 0. We need to control
|f (x) − L| = |x2 − 2x − 3| = |(x − 3)(x + 1)|.
Step 1 (bound the extra factor). First restrict δ ≤ 1. If |x − 3| < 1, then 2 < x < 4, so
3 < x + 1 < 5, giving |x + 1| < 5.
Step 2. Then
|(x − 3)(x + 1)| = |x − 3| · |x + 1| < 5|x − 3|.
We want 5|x − 3| < ε, i.e. |x − 3| < ε/5.
ε
Choice of δ: let δ = min 1, . Then whenever 0 < |x − 3| < δ:
5
|x2 − 2x − 3| = |x − 3||x + 1| < 5 ·
ε
= ε.
5
Since ε > 0 was arbitrary, lim (x2 − 2x) = 3. ■
x→3
Tip for beginners
Taking δ = min(1, ε/5) is the standard move: the ”1” keeps x near enough to 3 to control the
extra factor (x + 1), and the ε/5 handles the size you actually need.
(b) Evaluate the following limits.
[4]
(i) lim
x→∞
p
p
x2 + x − x2 − x
Worked solution. Multiply by the conjugate:
p
(x2 + x) − (x2 − x)
2x
√
√
x2 − x = √
=√
.
2
2
2
x +x+ x −x
x + x + x2 − x
p
√
For x > 0, factor x out of each square root ( x2 + x = x 1 + 1/x, similarly for the other):
p
x2 + x −
2x
2
2
x→∞
p
p
= 1.
= p
=p
−−−→
1+1
x 1 + 1/x + x 1 − 1/x
1 + 1/x + 1 − 1/x
1 − cos 4x
(without L’Hôpital’s Rule)
x→0
x2
(ii) lim
12
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Key idea
θ
sin u
Use the identity 1 − cos θ = 2 sin
, then the standard limit
→ 1 as u → 0.
2
u
2
Worked solution. With θ = 4x: 1 − cos 4x = 2 sin2 (2x). So
1 − cos 4x
2 sin2 (2x)
=
=8·
x2
x2
sin 2x
2x
2
2
2
(2x)
(multiplying and dividing appropriately: 2 sinx2(2x) = 2 · 4 · sin(2x)
2 ). As x → 0, 2x → 0 too, so
sin 2x
→ 1, giving
2x
1 − cos 4x
= 8 · 12 = 8.
lim
x→0
x2
Tip for beginners
Whenever you see 1 − cos(something) divided by a power, converting it to sin2 via the half-angle
identity is almost always the fastest non-L’Hôpital route.
(
ax2 + b,
(c) Find a, b so that f (x) =
1/x,
x≤1
is continuous and differentiable at x = 1.
x>1
[4]
Key idea
Continuity at a join point needs the two one-sided limits (and the function value) to agree.
Differentiability additionally needs the two one-sided derivatives to agree. Always do continuity first — it’s usually needed for differentiability to even make sense.
Worked solution. Continuity at x = 1:
lim f (x) = a(1)2 + b = a + b,
x→1−
lim f (x) =
x→1+
For continuity: a + b = 1.
1
= 1.
1
(Equation 1)
Differentiability at x = 1: differentiate each piece separately.
1
For x > 1 : f ′ (x) = − 2 ⇒ f ′ (1+ ) = −1.
x
For x < 1 : f ′ (x) = 2ax ⇒ f ′ (1− ) = 2a.
1
For differentiability: 2a = −1 ⇒ a = − .
2
3
Solve for b using Equation 1: b = 1 − a = 1 − − 12 = .
2
a = − 12 ,
b = 23 .
Tip for beginners
A common mistake is to only check continuity and forget the derivative-matching condition (or
vice versa) — a piecewise function can easily be continuous but have a ”kink” (corner) where
it is not differentiable.
13
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 6 Differentiation
1
(a) Use first principles to differentiate f (x) = √ , x > 0.
x
[3]
Key idea
f (x + h) − f (x)
directly — no shorth→0
h
cut rules allowed. For square roots, multiplying by the conjugate is the standard way to remove
the h from the denominator.
”First principles” means using the definition f ′ (x) = lim
Worked solution.
1
1
√
√
−√
x− x+h
x
x+h
′
f (x) = lim
= lim √
√ .
h→0
h→0 h x + h x
h
√
√
Multiply numerator and denominator by the conjugate x + x + h:
√
√
√
√
x− x+h
x+ x+h
x − (x + h)
√
√
√
= lim √
= lim
√ √
√ √
h→0 h x + h x
h→0 h x + h x
x+ x+h
x+ x+h
√
−h
−1
√
√
= lim √
.
= lim √
√ √
√ √
h→0 h x + h x
h→0
x+ x+h
x+h x x+ x+h
Now let h → 0 (safe, since x > 0):
f ′ (x) = √
−1
−1
√
√ = 3/2 .
x · x · (2 x)
2x
Tip for beginners
Check against the power rule: f (x) = x−1/2 ⇒ f ′ (x) = − 12 x−3/2 =
which is a great way to confirm a first-principles computation.
−1
— matches exactly,
2x3/2
(b) Folium of Descartes x3 + y 3 = 6xy: find dy/dx implicitly, and the tangent at (3, 3).
[4]
Key idea
Implicit differentiation: differentiate both sides with respect to x, treating y as a function of
x (so every time you differentiate a y-term, multiply by y ′ via the chain rule). Then just solve
algebraically for y ′ .
Worked solution. Differentiate x3 + y 3 = 6xy term by term with respect to x. On the right, use
the product rule on 6xy:
3x2 + 3y 2 y ′ = 6y + 6xy ′ .
Collect all y ′ terms on one side:
3y 2 y ′ − 6xy ′ = 6y − 3x2 =⇒ y ′ (3y 2 − 6x) = 6y − 3x2 .
y′ =
6y − 3x2
2y − x2
= 2
.
2
3y − 6x
y − 2x
14
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
At (3, 3):
y′ =
2(3) − 32
6−9
−3
=
=
= −1.
2
3 − 2(3)
9−6
3
Tangent line through (3, 3) with slope −1:
y − 3 = −1(x − 3) =⇒ y = −x + 6,
x+y =6 .
i.e.
Tip for beginners
On the right-hand side, 6xy is a product of two functions of x (namely x and y), so you must
d
use the product rule:
(6xy) = 6y + 6xy ′ — a very common place to lose marks by forgetting
dx
the y ′ term.
(c) Use logarithmic differentiation to find dy/dx for y = xsin x , x > 0.
[3]
Key idea
When the variable appears in both the base and the exponent, ordinary power/exponential rules
don’t directly apply. Logarithmic differentiation: take ln of both sides first, which turns the
exponent into a multiplying factor, then differentiate implicitly.
Worked solution. Take natural logs of both sides:
ln y = sin x · ln x.
Differentiate both sides with respect to x (left side needs the chain rule, right side needs the product
rule):
1 ′
1
y = cos x ln x + sin x · .
y
x
Multiply through by y = xsin x :
′
y =x
sin x
sin x
cos x ln x +
x
.
Tip for beginners
Logarithmic differentiation is the go-to method any time you see ”variable to the power of a
function of that same variable” — e.g. xx , (sin x)cos x , etc.
(d) A closed cylindrical tank must hold 16π m3 . Find the radius and height that
minimise the total surface area, and prove it is a minimum.
[5]
Key idea
This is a classic optimisation problem: (1) write the quantity to optimise (surface area)
as a function of two variables; (2) use the constraint (volume) to eliminate one variable; (3)
differentiate, set to zero, solve; (4) confirm it’s a minimum (second derivative test).
Worked solution. Set-up. Let r = radius, h = height.
16
Volume constraint: V = πr2 h = 16π =⇒ h = 2 .
r
15
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Total surface area of a closed cylinder (top + bottom + curved side):
S = 2πr2 + 2πrh.
Substitute h:
S(r) = 2πr2 + 2πr ·
32π
16
= 2πr2 +
.
2
r
r
Differentiate and solve S ′ (r) = 0:
S ′ (r) = 4πr −
Set to zero:
4πr =
32π
.
r2
32π
=⇒ 4r3 = 32 =⇒ r3 = 8 =⇒ r = 2.
r2
16
16
=
= 4.
r2
4
Confirm it is a minimum (second derivative test):
Then h =
S ′′ (r) = 4π +
64π
.
r3
For every r > 0, both terms are positive, so S ′′ (r) > 0 always — in particular S ′′ (2) = 4π +
8π = 12π > 0. A positive second derivative at a critical point confirms a local minimum; since
S(r) → ∞ as r → 0+ or r → ∞, this is also the global minimum.
r = 2 m,
h = 4 m.
Tip for beginners
Notice the optimal tank has h = 2r — the height equals the diameter. This ”square” proportion
is a famous general result for minimum-surface-area closed cylinders, worth remembering as a
sanity check.
16
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 7 Mean Value Theorem and L’Hôpital’s Rule
(a) State Rolle’s Theorem and the Mean Value Theorem.
[2]
Worked solution. Rolle’s Theorem. If f is continuous on [a, b], differentiable on (a, b), and
f (a) = f (b), then there exists c ∈ (a, b) such that f ′ (c) = 0.
Mean Value Theorem (MVT). If f is continuous on [a, b] and differentiable on (a, b), then there
exists c ∈ (a, b) such that
f (b) − f (a)
f ′ (c) =
.
b−a
Tip for beginners
Rolle’s Theorem is just the special case of the MVT where f (a) = f (b) (so the right-hand side
is 0). Learning one is really learning both.
(b) Apply the MVT to f (x) =
√
√
1
x on [100, 101] to show 10 +
< 101 < 10.05.
22
[5]
Key idea
√
Apply the MVT to get an exact equation involving 101 and an unknown point c strictly
between 100 and 101; then bound c (and hence bound the
√ derivative at c) using only the fact
that 100 < c < 101 — without needing to already know 101.
√
Worked solution. f (x) = x is continuous on [100, 101] and differentiable on (100, 101), with
1
f ′ (x) = √ . By the MVT, there exists c ∈ (100, 101) with
2 x
f ′ (c) =
√
1
f (101) − f (100)
=⇒ √ = 101 − 10.
101 − 100
2 c
Upper bound. Since c > 100, we have
√
c>
√
100 = 10, so
1
1
1
√ <
=
= 0.05.
2(10)
20
2 c
Hence
√
101 − 10 < 0.05, i.e.
√
101 < 10.05.
Lower bound. Since c < 101 < 121 = 112 , we have
√
c < 11, so
1
1
1
√ >
= .
2(11)
22
2 c
√
1
1
, i.e. 101 > 10 + .
22
22
Combining both bounds:
√
1
10 +
< 101 < 10.05.
22
Hence
√
101 − 10 >
17
■
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Tip for beginners
The trick to both bounds is to use only ”easy”√reference points (100 = 102 and 121 = 112 )
to trap the unknown c — never try to estimate 101 itself, since that’s what you’re trying to
prove a bound for!
(c) Prove that x3 + x − 1 = 0 has exactly one real root.
[4]
Key idea
”Exactly one root” always splits into two separate jobs: existence (there is at least one — use
the Intermediate Value Theorem) and uniqueness (there is at most one — usually a proof by
contradiction using Rolle’s Theorem).
Worked solution. Let f (x) = x3 + x − 1, a polynomial (so continuous and differentiable everywhere).
Existence. f (0) = 0 + 0 − 1 = −1 < 0 and f (1) = 1 + 1 − 1 = 1 > 0. Since f is continuous on [0, 1]
and changes sign, the Intermediate Value Theorem guarantees some c ∈ (0, 1) with f (c) = 0.
So at least one real root exists.
Uniqueness (by contradiction). Suppose, for contradiction, there were two distinct roots c1 < c2
with f (c1 ) = f (c2 ) = 0. Since f is continuous on [c1 , c2 ] and differentiable on (c1 , c2 ), Rolle’s
Theorem guarantees some d ∈ (c1 , c2 ) with f ′ (d) = 0. But
f ′ (x) = 3x2 + 1 ≥ 1 > 0
for every real x
(since 3x2 ≥ 0 always), so f ′ (d) = 0 is impossible. This contradiction shows two distinct roots
cannot exist.
Combining existence and uniqueness: x3 + x − 1 = 0 has exactly one real root. ■
Tip for beginners
Whenever f ′ (x) can be shown to be always strictly positive (or always strictly negative), f is
strictly monotonic and therefore automatically injective — so it can cross zero at most once.
This is a fast alternative way to phrase the uniqueness argument.
(d) Evaluate the following limits.
[4]
(i) lim
x→0
1
1
−
x ex − 1
Worked solution. Combine into a single fraction:
1
1
(ex − 1) − x
− x
=
.
x e −1
x(ex − 1)
Both numerator and denominator → 0 as x → 0 (an ” 00 ” form), so apply L’Hôpital’s Rule (differentiate top and bottom separately):
ex − 1 − x L’H
ex − 1
=
lim
.
x→0 xex − x
x→0 ex + xex − 1
lim
18
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
This is again 00 at x = 0, so differentiate once more:
L’H
ex
1
1
ex
=
lim
= lim
= .
x→0 ex (2 + x)
x→0 2 + x
x→0 ex + ex + xex
2
= lim
(ii) lim xx
x→0+
Key idea
For limits of the form (something)something , take logs first: if y = xx then ln y = x ln x, and it is
easier to find lim ln y, then exponentiate at the end.
Worked solution. Let y = xx , so ln y = x ln x. As x → 0+ , this is a ”0 · (−∞)” form; rewrite it as
a fraction and use L’Hôpital:
x ln x =
ln x
1/x
L’H
(form − ∞/∞) =
1/x
x→0+
=
−x
−
−−−→ 0.
−1/x2
So ln y → 0, which means y = eln y → e0 = 1. Hence lim xx = 1.
x→0+
(ln x)3
√ , and its algorithmic interpretation.
x→∞
x
(iii) lim
Worked solution. This is an ”∞/∞” form; apply L’Hôpital repeatedly (or quote the standard
fact that every power of ln x grows slower than every positive power of x). One application:
3(ln x)2 · x1
(ln x)3 L’H
6(ln x)2
=
lim
=
lim
.
1
−1/2
x→∞ x1/2
x→∞
x→∞ x1/2
2x
lim
The power of ln x dropped from 3 to 2 while the power of x in the denominator stayed the same
order — repeating L’Hôpital two more times drives (ln x)2 → (ln x)1 → (ln x)0 = 1, each time
keeping a positive power of x in the denominator, so the whole limit is
(ln x)3
√
= 0.
x→∞
x
lim
√
Interpretation. Since the ratio → 0, (log n)3 grows much more slowly than n as n → ∞. In
algorithm analysis, this means an algorithm with running time proportional to (log n)3 is asymp√
totically far more efficient than one with running time proportional to n, for large enough input
size n.
Tip for beginners
It’s worth memorising the ”growth hierarchy” ln x ≪ xp ≪ ax ≪ x! (for any fixed p > 0 and
a > 1) — many limits at infinity can be answered instantly just by knowing where each piece
sits in this hierarchy, without doing any L’Hôpital algebra at all.
19
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 8 Extrema and Curve Sketching
Let f (x) = x2 e−x .
Key idea
Standard curve-analysis workflow: find f ′ for increasing/decreasing and local extrema; find f ′′
for concavity and inflection points; check limits at ±∞ for asymptotes; then combine everything
into a sketch.
(a) Critical points, and where f is increasing/decreasing.
[3]
Worked solution. By the product rule:
f ′ (x) = 2xe−x + x2 (−e−x ) = e−x (2x − x2 ) = e−x x(2 − x).
Since e−x > 0 always, f ′ (x) = 0 exactly when x = 0 or x = 2 — the critical points.
Check the sign of x(2 − x) on each interval:
x < 0: x < 0, (2 − x) > 0 ⇒ product < 0 ⇒ f decreasing.
0 < x < 2: x > 0, (2 − x) > 0 ⇒ product > 0 ⇒ f increasing.
x > 2: x > 0, (2 − x) < 0 ⇒ product < 0 ⇒ f decreasing.
Since f changes from decreasing to increasing at x = 0: local minimum, f (0) = 0. Since f changes
from increasing to decreasing at x = 2: local maximum, f (2) = 4e−2 ≈ 0.541.
(b) Concavity and inflection points.
[3]
Worked solution. Differentiate f ′ (x) = e−x (2x − x2 ) again (product rule):
f ′′ (x) = −e−x (2x − x2 ) + e−x (2 − 2x) = e−x x2 − 2x + 2 − 2x = e−x (x2 − 4x + 2).
Set x2 − 4x + 2 = 0 (quadratic formula):
√
√
√
4 ± 16 − 8
4±2 2
x=
=
= 2 ± 2.
2
2
√
√
So x = 2 − 2 ≈ 0.586 and x = 2 + 2 ≈ 3.414 are the exact inflection x-coordinates (since e−x > 0
never affects the sign, only x2 − 4x + 2 does, and this upward parabola changes sign exactly at its
two roots):
√
x < 2 − 2: concave up;
√
√
2 − 2 < x < 2 + 2: concave down;
√
x > 2 + 2: concave up.
(c) Asymptotes and sketch.
[2]
Worked solution. As x → +∞: exponential decay beats polynomial growth, so x2 e−x → 0 —
giving a horizontal asymptote y = 0 as x → +∞. As x → −∞: both x2 → ∞ and e−x → ∞, so
f (x) → +∞ (no asymptote on this side). There are no vertical asymptotes, since f is defined and
continuous for all real x.
Sketch summary: the curve comes down from +∞ on the left, decreasing through√concave-up
territory, reaches a minimum of 0 at the origin, rises through an inflection at x = 2 − 2 (turning
−2
concave down)
√ up to a local maximum of 4e at x = 2, then decreases, passing a second inflection
at x = 2 + 2 (turning concave up again), and flattens out towards the x-axis (but always staying
≥ 0, since f (x) = x2 e−x is a product of two non-negative quantities).
20
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
(d) Absolute maximum and minimum on [−1, 4].
[2]
Key idea
On a closed interval, the absolute max/min occur either at a critical point inside the interval
or at one of the two endpoints — so evaluate f at all of these and compare.
Worked solution. Relevant points in [−1, 4]: critical points x = 0, 2, and endpoints x = −1, 4.
f (−1) = (−1)2 e1 = e ≈ 2.718,
f (2) = 4e−2 ≈ 0.541,
f (0) = 0,
f (4) = 16e−4 ≈ 0.293.
Comparing all four values: the largest is f (−1) = e and the smallest is f (0) = 0.
Absolute maximum = e at x = −1;
Absolute minimum = 0 at x = 0.
Tip for beginners
It’s easy to assume the local max/min found in part (a) are automatically the absolute max/min
on an interval — always double-check the endpoints too, as this question shows (the true absolute
maximum here is at an endpoint, not at the local maximum x = 2).
21
Calculus of Single Variables — Fully Worked Tutorial
University of Zimbabwe
Question 9 Integration
(a) Using right-endpoint Riemann sums, find the area under f (x) = x2 + 1 on [0, 3].
[6]
Key idea
A Riemann sum approximates area with n thin rectangles of width ∆x = b−a
n . For a rightendpoint sum, the height of the i-th rectangle is f (a + i∆x). The exact area is the limit of this
P
sum as n → ∞. You will need the formula ni=1 i2 = n(n+1)(2n+1)
— the same type of formula
6
you proved by induction in Question 1(b).
3
3i
Worked solution. Here a = 0, b = 3, so ∆x = , and the right endpoints are xi = 0 + i∆x =
n
n
for i = 1, . . . , n.
f (xi ) =
3i
n
2
+1=
9i2
+ 1.
n2
The Riemann sum is
Sn =
n
X
f (xi ) ∆x =
i=1
Using
i=1
n(n + 1)(2n + 1)
2
and
i=1 i =
Pn
6
Sn =
n 2
X
9i
n
+1
2
n
n
i=1
i=1
3
27 X 2 3 X
= 3
i +
1.
n
n
n
Pn
i=1 1 = n:
27 n(n + 1)(2n + 1) 3
9(n + 1)(2n + 1)
·
+ ·n=
+ 3.
3
n
6
n
2n2
Expand the numerator: (n + 1)(2n + 1) = 2n2 + 3n + 1, so
3
9(2n2 + 3n + 1)
9
1
Sn =
+3=
2 + + 2 + 3.
2n2
2
n n
Take the limit as n → ∞ (the n3 and n12 terms vanish):
9
lim Sn = (2) + 3 = 9 + 3 = 12.
n→∞
2
Area = 12.
Tip for beginners
Always sanity-check a Riemann-sum answer against the Fundamental Theorem of Calculus once
3
3
R3 2
x
you know it: 0 (x + 1) dx =
+ x = 9 + 3 = 12 — matches exactly. This is a great way
3
0
to build confidence that the (more laborious) Riemann-sum method was executed correctly.
22
Calculus of Single Variables — Fully Worked Tutorial
Z
(b) Show
n x
Z
n x
x e dx = x e − n
x
University of Zimbabwe
Z
n−1 x
e dx, and use it to evaluate
x3 ex dx.
[4]
Key idea
R
R
This is integration by parts, u dv = uv − v du, applied with u = xn (which gets simpler
when differentiated) and dv = ex dx (which is easy to integrate). A formula like this, where the
same type of integral reappears with a smaller power, is called a reduction formula — you
apply it repeatedly until the power reaches 0.
Worked solution. Proving the reduction formula. Let u = xn , dv = ex dx, so du = nxn−1 dx
and v = ex . Integration by parts gives
Z
Z
Z
Z
n x
n x
n−1 x
n x
x e dx = uv − v du = x e − nx
e dx = x e − n xn−1 ex dx.
■
Applying it three times, for n = 3, 2, 1:
Z
Z
3 x
3 x
n=3:
x e dx = x e − 3 x2 ex dx.
Z
n=1:
2 x
x e dx = x e − 2
n=2:
Z
2 x
x
x
xe dx = xe −
Z
Z
xex dx.
ex dx = xex − ex + C.
Substitute back, starting from the bottom. First,
Z
x2 ex dx = x2 ex − 2 xex − ex + C = x2 ex − 2xex + 2ex + C.
Then,
Z
x3 ex dx = x3 ex − 3 x2 ex − 2xex + 2ex + C = x3 ex − 3x2 ex + 6xex − 6ex + C.
Z
x3 ex dx = ex x3 − 3x2 + 6x − 6 + C.
Tip for beginners
x 3
d
2
Always
verify
a
reduction-formula
answer
by
differentiating
it
back:
dx e (x − 3x + 6x −
x
3
2
x
2
x
3
6) = e (x − 3x + 6x − 6) + e (3x − 6x + 6) = e · x , which is exactly the original integrand
x3 ex — confirming the answer is correct.
End of worked tutorial
Work through each solution with pen and paper, then attempt the assignment as a group in your own
words.
23
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )