Module I — Functions and Limits

Module I — Functions and Limits

Course: MAT1CJ101 — Differential Calculus
Hours: 12 | Textbook Sections: Prelim §3, Prelim §4, §1.1, §1.2, §1.4 (Thomas & Finney, 9th Ed.)


1. Functions

1.1 What Is a Function?

A function $f$ from a set $D$ to a set $Y$ is a rule that assigns to each element $x$ in $D$ exactly one element $f(x)$ in $Y$.

  • Domain ($D$): the set of all allowable inputs
  • Range: the set of all actual outputs ${f(x) : x \in D}$
  • Codomain ($Y$): the set in which outputs live (range $\subseteq Y$)

Notation: $f : D \to Y$, or simply $y = f(x)$, where $x$ is the independent variable and $y$ is the dependent variable.

Why this matters: Many real-world quantities depend on others — distance depends on time, profit depends on quantity sold. A function is the mathematical way to capture that dependence precisely.

1.2 Ways to Define a Function

A function can be given by:

  • Formula: $f(x) = x^2 - 3x + 2$
  • Graph: a curve in the xy-plane (passes the vertical line test)
  • Table: pairs $(x, f(x))$ listed explicitly
  • Words: “$f(x)$ = the area of a square with side $x$”

Vertical Line Test: A curve in the plane is the graph of a function if and only if no vertical line meets the curve more than once.

1.3 Domain and Range

If the domain is not stated, assume it is the natural domain — all x for which the formula makes sense.

Rules for finding the natural domain:

  • Exclude values making a denominator zero
  • Exclude values making an even-root expression negative
  • Exclude values where a logarithm argument is non-positive

Worked Example 1: Find the domain of $f(x) = \dfrac{\sqrt{x - 1}}{x - 3}$.

We need:

  • $x - 1 \geq 0 \implies x \geq 1$ (even root must be non-negative)
  • $x - 3 \neq 0 \implies x \neq 3$ (denominator non-zero)

Domain: $[1, \infty)$ minus ${3}$ = $[1, 3) \cup (3, \infty)$

Worked Example 2: Find the range of $g(x) = x^2$.

For any $x$, $x^2 \geq 0$. Every non-negative number is achieved: if $y \geq 0$, then $x = \sqrt{y}$ gives $g(x) = y$. Range: $[0, \infty)$

1.4 Common Function Types

Type Form Behaviour
Constant $f(x) = c$ Horizontal line
Linear $f(x) = mx + b$ Straight line, slope $m$
Power $f(x) = x^n$ Polynomial degree 1
Polynomial $f(x) = a_n x^n + \cdots + a_0$ Smooth, defined everywhere
Rational $f(x) = p(x)/q(x)$ Undefined where $q = 0$
Root/Radical $f(x) = x^{1/n}$ Even roots: domain $\geq 0$
Absolute value $f(x) = \lvert x \rvert$ Corner at origin
Piecewise Different rules on different intervals May have jumps

1.5 Even and Odd Functions

  • Even: $f(-x) = f(x)$ for all $x$ in domain. Graph symmetric about y-axis. Example: $f(x) = x^2$.
  • Odd: $f(-x) = -f(x)$ for all $x$ in domain. Graph symmetric about origin. Example: $f(x) = x^3$.

Test: Substitute $-x$ and simplify. If you get $f(x)$ back: even. If you get $-f(x)$: odd. Otherwise: neither.

1.6 Composite Functions

Given $f$ and $g$, the composite $f \circ g$ is defined by $(f \circ g)(x) = f(g(x))$.

Domain of $f \circ g$: all $x$ in the domain of $g$ such that $g(x)$ is in the domain of $f$.

Worked Example 3: Let $f(x) = \sqrt{x}$ and $g(x) = x + 1$. Find $f \circ g$ and its domain.

\[(f \circ g)(x) = f(g(x)) = f(x+1) = \sqrt{x+1}\]

Domain: need $x + 1 \geq 0 \implies x \geq -1$ Domain of $f \circ g$: $[-1, \infty)$

Evaluation: $f(g(3)) = f(4) = \sqrt{4} = 2$, $f(9) = \sqrt{9} = 3$

Note: $f \circ g$ and $g \circ f$ are generally different. Order matters in composition.


2. Shifting and Scaling Graphs

Understanding how graphs transform lets you sketch complicated functions by starting from a known base shape.

2.1 Vertical and Horizontal Shifts

If $c > 0$:

Transformation Effect
$y = f(x) + c$ Shift up $c$ units
$y = f(x) - c$ Shift down $c$ units
$y = f(x - c)$ Shift right $c$ units
$y = f(x + c)$ Shift left $c$ units

Intuition for horizontal shifts: In $y = f(x - c)$, the value that was at $x = 0$ is now at $x = c$, so the whole graph moves right.

Worked Example 4: Start from $y = x^2$. Write equations for:

(a) Shifted up 3: $y = x^2 + 3$ (b) Shifted right 2: $y = (x-2)^2$ (c) Shifted left 1, down 4: $y = (x+1)^2 - 4$

2.2 Reflections

Transformation Effect
$y = -f(x)$ Reflect about x-axis
$y = f(-x)$ Reflect about y-axis

2.3 Vertical Scaling

Transformation Effect
$y = cf(x)$, $c > 1$ Stretch vertically (taller)
$y = cf(x)$, $0 < c < 1$ Compress vertically (flatter)

Worked Example 5: Shift the graph of $x = 3y^2$ up 2 and right 3 units.

Original: $x = 3y^2$

“Up 2” means $y$ increases by 2: replace $y$ with $(y - 2)$ “Right 3” means $x$ increases by 3: replace $x$ with $(x - 3)$

Result: $(x-3) = 3(y-2)^2 \implies x = 3(y-2)^2 + 3$

2.4 Combining Transformations

Apply in this order: horizontal shift $\to$ scaling $\to$ vertical shift $\to$ reflections.

Worked Example 6: Describe the graph of $y = -2(x+1)^2 + 3$.

Start with $y = x^2$

  • shift left 1: $y = (x+1)^2$
  • scale by 2: $y = 2(x+1)^2$
  • reflect: $y = -2(x+1)^2$
  • shift up 3: $y = -2(x+1)^2 + 3$

Vertex at $(-1, 3)$, opening downward, steeper than $y = x^2$.


3. Rates of Change and the Limit Concept

3.1 Average Rate of Change

The average rate of change of $f$ from $x = x_0$ to $x = x_1$ is:

\[\frac{f(x_1) - f(x_0)}{x_1 - x_0} = \frac{\Delta y}{\Delta x}\]

This is the slope of the secant line joining $(x_0, f(x_0))$ and $(x_1, f(x_1))$.

Worked Example 7: Find the average rate of change of $f(x) = x^2$ from $x = 1$ to $x = 3$.

\[\text{Average rate} = \frac{f(3) - f(1)}{3 - 1} = \frac{9 - 1}{2} = \frac{8}{2} = 4\]

3.2 The Limit — Informal Idea

As $x$ approaches a value $c$ (but does not equal $c$), if $f(x)$ gets arbitrarily close to a number $L$, we write:

\[\lim_{x \to c} f(x) = L\]

Key point: The limit is about what $f$ does near $c$, not at $c$. The function need not even be defined at $c$.

Worked Example 8: Find $\displaystyle\lim_{x \to 2} \frac{x^2 - 4}{x - 2}$.

At $x = 2$, both numerator and denominator are 0. But for $x \neq 2$:

\[\frac{x^2 - 4}{x - 2} = \frac{(x+2)(x-2)}{x-2} = x + 2\]

As $x \to 2$, this approaches $2 + 2 = 4$.

So $\displaystyle\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = 4$

3.3 One-Sided Limits

  • Right-hand limit: $\displaystyle\lim_{x \to c^+} f(x)$ — approach from values greater than $c$
  • Left-hand limit: $\displaystyle\lim_{x \to c^-} f(x)$ — approach from values less than $c$

Two-sided limit exists if and only if both one-sided limits exist and are equal:

\[\lim_{x \to c} f(x) = L \iff \lim_{x \to c^+} f(x) = L \text{ and } \lim_{x \to c^-} f(x) = L\]
Worked Example 9: For $f(x) = x /x$, find the one-sided limits at $x = 0$.
  • For $x > 0$: $f(x) = x/x = 1 \implies \displaystyle\lim_{x \to 0^+} f(x) = 1$
  • For $x < 0$: $f(x) = -x/x = -1 \implies \displaystyle\lim_{x \to 0^-} f(x) = -1$

The two limits differ, so $\displaystyle\lim_{x \to 0} f(x)$ does not exist.


4. Rules for Finding Limits

4.1 Basic Limit Laws

If $\lim_{x \to c} f(x) = L$ and $\lim_{x \to c} g(x) = M$, then:

Law Statement
Sum $\lim [f(x) + g(x)] = L + M$
Difference $\lim [f(x) - g(x)] = L - M$
Constant multiple $\lim [k \cdot f(x)] = k \cdot L$
Product $\lim [f(x) \cdot g(x)] = L \cdot M$
Quotient $\lim [f(x) / g(x)] = L/M$, provided $M \neq 0$
Power $\lim [f(x)]^n = L^n$
Root $\lim [f(x)]^{1/n} = L^{1/n}$ (when defined)

Direct substitution: For polynomials and rational functions (where the denominator is non-zero), just substitute $x = c$:

\(\lim_{x \to c} p(x) = p(c) \quad \text{for any polynomial } p\) \(\lim_{x \to c} \frac{p(x)}{q(x)} = \frac{p(c)}{q(c)} \quad \text{provided } q(c) \neq 0\)

Worked Example 10: Evaluate $\displaystyle\lim_{x \to 2} (3x^2 - 4x + 1)$.

Direct substitution: $3(4) - 4(2) + 1 = 12 - 8 + 1 = 5$

4.2 Limits Involving 0/0 — Algebraic Techniques

When direct substitution gives 0/0, factor and cancel.

Technique 1 — Factoring:

Worked Example 11: Evaluate $\displaystyle\lim_{x \to 3} \frac{x^2 - 9}{x - 3}$.

\[\frac{x^2 - 9}{x - 3} = \frac{(x+3)(x-3)}{x-3} = x + 3 \quad (\text{for } x \neq 3)\] \[\lim_{x \to 3} (x+3) = 6\]

Technique 2 — Rationalizing (for expressions with square roots):

Multiply numerator and denominator by the conjugate.

Worked Example 12: Evaluate $\displaystyle\lim_{x \to 0} \frac{\sqrt{x+2} - \sqrt{2}}{x}$.

Multiply by $\dfrac{\sqrt{x+2} + \sqrt{2}}{\sqrt{x+2} + \sqrt{2}}$:

\[\frac{(\sqrt{x+2} - \sqrt{2})(\sqrt{x+2} + \sqrt{2})}{x(\sqrt{x+2} + \sqrt{2})} = \frac{(x+2) - 2}{x(\sqrt{x+2} + \sqrt{2})} = \frac{x}{x(\sqrt{x+2} + \sqrt{2})} = \frac{1}{\sqrt{x+2} + \sqrt{2}}\]

As $x \to 0$: $\dfrac{1}{\sqrt{2} + \sqrt{2}} = \dfrac{1}{2\sqrt{2}} = \dfrac{\sqrt{2}}{4}$

4.3 The Squeeze (Sandwich) Theorem

Theorem (Squeeze): If $g(x) \leq f(x) \leq h(x)$ near $c$, and $\lim_{x \to c} g(x) = \lim_{x \to c} h(x) = L$, then $\lim_{x \to c} f(x) = L$.

Why it works: If $f$ is always trapped between two functions both converging to $L$, $f$ has no choice but to converge to $L$ too.

Worked Example 13: Show $\displaystyle\lim_{x \to 0} x^2 \sin(1/x) = 0$.

We know: $-1 \leq \sin(1/x) \leq 1$ for all $x \neq 0$.

Multiply by $x^2 \geq 0$: $-x^2 \leq x^2 \sin(1/x) \leq x^2$

Both $-x^2$ and $x^2$ approach 0 as $x \to 0$.

By the Squeeze Theorem: $\displaystyle\lim_{x \to 0} x^2 \sin(1/x) = 0$

4.4 More Limit Techniques

Technique 3 — One-sided limits from piecewise functions:

Worked Example 14: Let $f(x) = \begin{cases} x + 1, & x < 2 \ x^2 - 1, & x \geq 2 \end{cases}$. Find $\displaystyle\lim_{x \to 2} f(x)$.

Left-hand: $\displaystyle\lim_{x \to 2^-} (x+1) = 3$ Right-hand: $\displaystyle\lim_{x \to 2^+} (x^2-1) = 3$

Both equal 3, so $\displaystyle\lim_{x \to 2} f(x) = 3$.


5. Extensions of the Limit Concept

5.1 Infinite Limits

We write $\lim_{x \to c} f(x) = \infty$ if $f(x)$ increases without bound as $x \to c$ (from both sides). Similarly for $-\infty$.

Worked Example 15: Analyse $\displaystyle\lim_{x \to 0} 1/x^2$.

As $x \to 0$ from either side, $x^2 \to 0^+$, so $1/x^2 \to +\infty$.

\[\lim_{x \to 0} 1/x^2 = +\infty\]

Worked Example 16: Analyse $\displaystyle\lim_{x \to 0^+} 1/x$ and $\displaystyle\lim_{x \to 0^-} 1/x$.

  • As $x \to 0^+$: $1/x \to +\infty$
  • As $x \to 0^-$: $1/x \to -\infty$

The two-sided limit does not exist (the function goes to different infinities).

5.2 Limits at Infinity

We write $\lim_{x \to \infty} f(x) = L$ if $f(x) \to L$ as $x$ grows without bound.

Key results:

\(\lim_{x \to \infty} 1/x^n = 0 \quad \text{for any } n > 0\) \(\lim_{x \to \infty} c = c \quad \text{(constants)}\)

Strategy for rational functions at infinity: Divide numerator and denominator by the highest power of $x$ in the denominator.

Worked Example 17: Find $\displaystyle\lim_{x \to \infty} \frac{2x^2 + 3}{5x^2 - 1}$.

Divide through by $x^2$:

\[\frac{2 + 3/x^2}{5 - 1/x^2}\]

As $x \to \infty$, the terms $3/x^2$ and $1/x^2 \to 0$.

Limit = $2/5$

5.3 The Sandwich Theorem at Infinity

Worked Example 18: Show that $\displaystyle\lim_{x \to \infty} \frac{\sin x}{x} = 0$.

We know $-1 \leq \sin x \leq 1$.

Divide by $x > 0$: $-1/x \leq (\sin x)/x \leq 1/x$

Both $-1/x$ and $1/x \to 0$ as $x \to \infty$.

By the Squeeze Theorem: $\displaystyle\lim_{x \to \infty} \frac{\sin x}{x} = 0$.

Consequence: $y = (\sin x)/x$ has horizontal asymptote $y = 0$.


6. Summary

Concept Key Idea Worked Example
Function Rule assigning one output per input $f(x) = \sqrt{x-1}/(x-3)$: domain $[1,3)\cup(3,\infty)$
Composition $(f\circ g)(x) = f(g(x))$ $f(x)=\sqrt{x}$, $g(x)=x+1$: domain $[-1,\infty)$
Graph shifts Replace $x$ with $x-c$ (right $c$), add $c$ to output (up $c$) $x=3y^2 \to x=3(y-2)^2+3$
Limit $f(x) \to L$ as $x \to c$ $\lim_{x\to2}(x^2-4)/(x-2) = 4$
Limit laws Limits of sums, products, quotients Direct substitution for polynomials
0/0 form Factor and cancel, or rationalize $\lim_{x\to0}(\sqrt{x+2}-\sqrt{2})/x = \sqrt{2}/4$
Squeeze Thm Trap $f$ between $g$ and $h$ with same limit $\lim_{x\to0} x^2\sin(1/x) = 0$
Infinite limit $f(x) \to \infty$ as $x \to c$ $\lim_{x\to0} 1/x^2 = +\infty$
Limit at $\infty$ $f(x) \to L$ as $x \to \infty$ $\lim_{x\to\infty}(2x^2+3)/(5x^2-1) = 2/5$

7. Practice Problems

Sec A style (3 marks each):

  1. Find the domain of $f(x) = 1/(\sqrt{x-2} \cdot (x+3))$.

  2. Let $f(x) = x^2$ and $g(x) = x - 2$. Compute $(f\circ g)(x)$ and $(g\circ f)(x)$. Are they equal?

  3. Determine the domain of the composite $f\circ g$ when $f(x) = \sqrt{x}$ and $g(x) = x + 1$. Evaluate $f(g(3))$ and $f(9)$. (Oct 2024, Q1)

  4. Find the equation of the graph of $y = x^2$ shifted right 4 units and up 3 units.

  5. Evaluate $\lim_{x \to 3} (x^2 - 2x - 3)/(x - 3)$.

  6. Evaluate $\lim_{x \to 0} (\sqrt{x+2} - \sqrt{2})/x$. (Oct 2024, Q2)

  7. For $f(x) = \begin{cases} 2x + 1, & x \leq 1 \ x^2 + 2, & x > 1 \end{cases}$, find $\lim_{x \to 1^-} f(x)$ and $\lim_{x \to 1^+} f(x)$. Does $\lim_{x \to 1} f(x)$ exist?

  8. Evaluate $\lim_{x \to \infty} (3x^3 - 2)/(x^3 + 5x)$.

  9. Show that $\lim_{x \to \infty} 1/x = 0$. (Oct 2024, Q10)

Sec B style (6 marks each):

  1. Give an equation for the shifted graph of $x = 3y^2$ up 2 and right 3 units. Sketch both graphs. (Oct 2024, Q11)

  2. Define the left-hand limit of $f$ at $x_0$. Construct an example where $\lim_{x \to c^-} f(x) \neq \lim_{x \to c^+} f(x)$ and explain geometrically what this means. (Oct 2024, Q13)

  3. Using the Sandwich Theorem, find the asymptotes of $y = 2 + (\sin x)/x$. Justify your answer. (Oct 2024, Q17)

Sec C style (10 marks):

  1. Find a function satisfying:
    • $\lim_{x \to \infty} f(x) = 1$
    • $\lim_{x \to -\infty} f(x) = -1$
    • $\lim_{x \to 1^+} f(x) = 1$

    Sketch the graph. Can such a function be defined at $x = 1$? Discuss. (Oct 2024, Q18)