Truth is not what you want it to be; it is what it is. And you must bend to its power or live a lie, Miyamoto Musashi.
The truth is multifaceted and complex. Life is always messier than our dreams and beliefs, reality is more complicated that we think it is, it is constantly changing like the wind and the future is not promised, but completely unpredictable, Anawim, #justtothepoint.
Understanding Functions and Their Graphs
Definition. A function f is a rule, relationship, or correspondence that assigns to each element of one set (x ∈ D), called the domain, exactly one element of a second set, called the range (y ∈ E).
The pair $(x, y)$ is denoted as $y = f(x)$. In this notation, $x$ is the independent variable (input), and $y$ is the dependent variable (output). Typically in introductory calculus, the sets $D$ (domain) and $E$ (range) are subsets of the real numbers, $\mathbb{R}$.
Graphing functions involves the visual representation of a curve that reflects the behavior of a mathematical function on a coordinate plane, also known as the Cartesian plane. It is a two-dimensional space defined by two perpendicular axes: the horizontal x-axis and the vertical y-axis.
A systematic approach to graphing a function begins by constructing a table containing selected input values and their corresponding output values. By extending this table, we can plot the points on the coordinate plane and observe the pattern they form. Connecting these points reveals the shape of the curve, allowing us to gain insights into the behavior of the function across its domain. This process provides a visual means of understanding the relationships between different variables and aids in interpreting the overall characteristics of the function, such as rates of change and limits.
General strategy to plot functions
When sketching the graph of a function without relying heavily on point-plotting, follow this systematic, 7-step calculus approach:
- Find undefined values and the function's domain. Identify where the function cannot exist (e.g., division by zero, negative numbers under even roots, or logarithms of non-positive numbers).
- Locate Locate the intercepts. y-intercept: Evaluate $f(0)$. x-intercepts (roots): Solve the equation $f(x) = 0$.
- Study the end behavior and asymptotes. Determine whether $f$ has any horizontal, vertical, or oblique asymptotes by evaluating limits:
$\star$ Vertical Asymptotes: Look at $x$-values where the denominator is zero.
$\star$ Horizontal Asymptotes: Evaluate $\lim_{x \to \pm\infty} f(x)$.
$\star$ Oblique Asymptotes: Occur in rational functions when the numerator’s degree is exactly one greater than the denominator’s.
- Check for symmetries. This can immensely reduce the amount of work you need to do:
$\star$ Even functions: $f(-x) = f(x)$ (Symmetric about the y-axis).
$\star$ Odd functions: $f(-x) = -f(x)$ (Rotational symmetry about the origin).
$\star$ Periodic functions: $f(x + P) = f(x)$ (Like sine or cosine).
- First Derivative Test (Monotonicity). Calculate $f'(x)$. Solve $f'(x) = 0$ to find critical points. Use these points to divide the domain into intervals, and determine where $f$ is increasing ($f'(x) > 0$) or decreasing ($f'(x) < 0$).
- Determine local extrema. Identify the local minimums or maximums where the function changes direction from increasing to decreasing, or vice versa.
- Second Derivative Test (Concavity). Calculate $f''(x)$. Determine the intervals where $f$ is concave up ($f''(x) > 0$) or concave down ($f''(x) < 0$). Points where concavity changes are called inflection points.
Sometimes it is easiest to draw a simple “parent” graph and then apply geometric transformations. Given a parent function $f(x)$, we can alter it to $y = a \cdot f(b(x - h)) + k$.
-
Translations (Shifting). A translation of a function is a shift in one or more directions. It is a transformation that moves the function’s graph horizontally or vertically without changing its shape or orientation.
$\star$ Vertical Shift: $f(x) + k$ shifts the graph vertically by $k$ units (up if $k>0$, down if $k<0$).
$\star$ Horizontal Shift: $f(x - h)$ shifts the graph horizontally by $h$ units (right if $h>0$, left if $h<0$).
$\star$ Example: $y = (x - 3)^2 + 5$ (Figure d) moves the parent function $x^2$ three units to the right and five units up.
-
Dilations and Compressions (Scaling). Scaling stretches or squeezes the graph.
$\star$ Horizontal Scaling: f(bx) where |b| > 1 squeezes or compresses the graph toward the y-axis. For example, $y = \cos(2x)$ (Figure 1) oscillates twice as fast as $\cos(x)$. Conversely, f(bx) where $0 < |b| < 1$ dilates the graph away from the y-axis, stretching it horizontally, e.g., $y = (0.5x)^2$ (Figure e).
$\star$ Vertical Scaling: $a \cdot f(x)$ stretches the graph vertically if $|a| > 1$ and compresses it vertically if $0 < |a| < 1$.
-
Reflections (Flipping). A reflection is a transformation where a curve is flipped across a line of reflection.
$\star$ x-axis reflection: $-f(x)$ flips the graph upside down. Example: $f(x) = x^2 - 3 \implies -f(x) = -x^2 + 3$ is a reflection in the y-axis (Figure 2).
$\star$ y-axis reflection: $f(-x)$ flips the graph left-to-right. Example: $f(x) = \sqrt{x}$ has a domain of $x \ge 0$. Its reflection, $g(x) = \sqrt{-x}$, has a domain of $x \le 0, Domain(g) = \mathbb{R}^+$ (Figure 3).
-
Combining transformations: The function $y = 4(x - 2)^2 + 3$ takes the parent $x^2$, stretches it vertically by a factor of 4, translates it right by 2, and translates it up by 3.
Plotting Piecewise functions
Piecewise functions are functions that behave differently based on the input ($x$) value. They define different mathematical expressions for different intervals of their domain. Graphing them involves plotting the respective “pieces” strictly within their defined bounds.
To evaluate limits and continuity at the “break points”, we must check the left-hand and right-hand limits.
Example 1: A Continuous Piecewise Function
$$f(x) = \begin{cases} -x + 2, & \text{if } x < 0 \\\\ x^2 + 2, & \text{if } x \ge 0 \end{cases}$$
- Approaching $0$ from the left ($x < 0$): $\lim_{x \to 0^-} (-x + 2) = 2$
- Approaching $0$ from the right ($x > 0$): $\lim_{x \to 0^+} (x^2 + 2) = 2$
- Because the left and right limits match, $\lim_{x \to 0} f(x) = 2$, meaning the pieces connect and the function is continuous at $x=0$ (Figure i).
Example 2: A Jump Discontinuity
$$f(x) = \begin{cases} 2x + 1, & \text{if } x < -5 \\\\ x^2 - 12, & \text{if } x > -5 \end{cases}$$
- Approaching $-5$ from the left: $\lim_{x \to -5^-} (2x + 1) = 2(-5) + 1 = -9$
- Approaching $-5$ from the right: $\lim_{x \to -5^+} (x^2 - 12) = (-5)^2 - 12 = 25 - 12 = 13$
- Therefore, $\lim_{x \to -5} f(x)$ does not exist because the left and right limits are different. There is a gap (a jump discontinuity) in the graph (Figure ii).
Example 3: The Signum-style Function
$$f(x) = \frac{|x|}{x} = \begin{cases} -1, & \text{if } x < 0 \\\\ 1, & \text{if } x > 0 \end{cases}$$
Notice that $\frac{|x|}{x}$ is undefined at $x = 0$. $\lim_{x \to 0^-} \frac{-x}{x} = -1$, while $\lim_{x \to 0^+} \frac{x}{x} = 1$. The limit does not exist, creating a split graph (figure iii).
Figure iv, v, and vi are the corresponding plots of $f(x)=\sqrt{x}$, Domain(f) = ℝ⁺, $f(x) =
\begin{cases}
x^2, &x < 2 \\\\
2x, &x ≥ 2
\end{cases}$, and the greatest integer function ⌊x⌋ respectively.
Plotting inverse functions
Loosely speaking, the inverse function of a function f is a function that undoes the operation of the original function. If $f$ maps an element $x$ in its domain to a unique element $y$ in its range, then the inverse function, denoted as $f^{-1}$, maps $y$ back to $x$.
For a given function $f$, its inverse $f^{-1}$ reverses the input and output: $f^{-1}(f(x)) = x$. Note that $f^{-1}$ is not an exponent; $f^{-1}(x) \neq \frac{1}{f(x)}$.
The Horizontal Line Test and Restrictions: For an inverse function to exist, the original function must be both one-to-one (injective) and onto (surjective).
A function is one-to-one if each element of the domain maps to a distinct (unique) element in the codomain or range (meaning it passes the Horizontal Line Test —no horizontal line crosses the graph more than once), and it is onto if every element in the codomain is mapped to by at least one element in the domain or, in other words, has a pre-image in the domain.
If a function is not one-to-one (like $y = x^2$, which is a U-shape), we must restrict its domain (e.g., $x \ge 0$) to find an inverse.
Graphical Relationship: If you want to plot the graph of $f^{-1}$, you just simply reflect the graph of $f(x)$ across the diagonal line $y = x$. This is because finding an inverse algebraically involves swapping the $x$ and $y$ variables.
Common Inverse Pairs:
- The square function $f(x) = x^2$ (for $x \ge 0$) and the square root function $f^{-1}(x) = \sqrt{x}$.
- The exponential function $f(x) = a^x$ and the logarithmic function $f^{-1}(x) = \log_a(x)$.
Specifically, the natural exponential $e^x$ is the inverse of the natural logarithm $\ln(x)$ (Figure 1.e).
- The tangent function $f(x) = \tan(x)$ (restricted to $-\frac{\pi}{2} < x < \frac{\pi}{2}$) and the inverse tangent $f^{-1}(x) = \arctan(x)$ (Figure 1.f).
Algebraic Examples:
- $f(x) = 2x + 3 \iff f^{-1}(x) = \frac{x - 3}{2}$ (Figure 1.a)
- $f(x) = \frac{1}{2}x^2 + 3 \quad (x \ge 0) \iff f^{-1}(x) = \sqrt{2x - 6}$ (Figure 1.c)
- $f(x) = 2^{3x - 5} \iff f^{-1}(x) = \frac{\log_2(x) + 5}{3}$ (Figure 1.d)
Solved Examples in Curve Sketching
Example 1: Rational Function with Even Symmetry
$\frac{x^{2}}{1-x^{2}}$
- Domain: The denominator cannot be zero. $1 - x^2 = 0 \implies x^2 = 1 \implies x = \pm 1$. Therefore, the domain is $\mathbb{R} \setminus \{-1, 1\}$. Additionally, $f(0) = \frac{0}{1} = 0$, giving an intercept at $(0,0)$.
- Symmetry: $f(-x) = \frac{(-x)^2}{1 - (-x)^2} = \frac{x^2}{1 - x^2} = f(x)$. This means the function is even and symmetric about the y-axis.
- Horizontal Asymptote: Evaluate the limits at infinity: $\lim_{x \to \pm\infty} \frac{x^2}{1 - x^2} = -1$
Thus, $y = -1$ is a horizontal asymptote.
- Vertical Asymptotes: Evaluate behavior near the restricted domain points $x = 1$ and $x = -1$:
$\lim_{x \to 1^+} \frac{x^2}{1 - x^2} = \frac{1}{0^-} = -\infty$ and $\lim_{x \to 1^-} \frac{x^2}{1 - x^2} = \frac{1}{0^+} = \infty$
Due to symmetry, the limits at $x = -1$ mirror this behavior: $\lim_{x \to -1^+} = \infty$ and $\lim_{x \to -1^-} = -\infty$. Therefore, $x = -1$ and $x = 1$ are vertical asymptotes.
- First Derivative (Monotonicity): Using the quotient rule, we get $f'(x) = \frac{2x}{(1 - x^2)^2}$.
Critical points: $f'(x) = 0$ at $x = 0$. (Note: $f'$ is undefined at $\pm 1$).
$x < -1 \implies f'(x) < 0 \implies$ decreasing $\searrow$
$-1 < x < 0 \implies f'(x) < 0 \implies$ decreasing $\searrow$
$0 < x < 1 \implies f'(x) > 0 \implies$ increasing $\nearrow$
$x > 1 \implies f'(x) > 0 \implies$ increasing $\nearrow$
- Second Derivative (Concavity): $f''(x) = \frac{6x^2 + 2}{(1 - x^2)^3}$.
$x < -1 \implies f''(x) < 0 \implies$ concave downward
$-1 < x < 1 \implies f''(x) > 0 \implies$ concave upward (making $(0,0)$ a local minimum)
$x > 1 \implies f''(x) < 0 \implies$ concave downward
The plot is shown in Figure 1.d.
Example 2: Involving Logarithms
$$f(x) = \frac{x}{\ln x}$$
- Domain: Logarithms are only defined for positive numbers ($x > 0$). Furthermore, the denominator cannot be zero, so $\ln x \neq 0 \implies x \neq 1$. Therefore, the domain is $\mathbb{R}^+ \setminus \{1\}$, or $(0, 1) \cup (1, \infty)$.
- Vertical Asymptote: Check the behavior near the undefined point $x = 1$:
$\lim_{x \to 1^+} \frac{x}{\ln x} = \frac{1}{0^+} = \infty$
$\lim_{x \to 1^-} \frac{x}{\ln x} = \frac{1}{0^-} = -\infty$
Thus, $x = 1$ is a vertical asymptote.
- End Behavior:
$\lim_{x \to 0^{+}}\frac{x}{lnx}=\frac{0}{-\infty}=\lim_{x \to 0^{+}} {\frac{1}{\frac{1}{x}}}= \lim_{x \to 0^{+}}x = 0, \lim_{x \to \infty}\frac{x}{lnx}=~ [\text{L'Hopitals Rule}]~\lim_{x \to \infty} {\frac{1}{\frac{1}{x}}}= \lim_{x \to \infty}x = \infty$
- First Derivative (Monotonicity): $f'(x) = \frac{1 \cdot \ln x - x \cdot (\frac{1}{x})}{(\ln x)^2} = \frac{\ln x - 1}{(\ln x)^2}$.
$f'(x) = 0 \iff \ln x = 1 \iff x = e$. The critical point is $(e, e)$.
$0 < x < 1 \implies f'(x) < 0 \implies$ decreasing $\searrow$
$1 < x < e \implies f'(x) < 0 \implies$ decreasing $\searrow$
$x > e \implies f'(x) > 0 \implies$ increasing $\nearrow$
Thus, f has a local minimum at x = e.
- Second Derivative (Concavity): $f''(x) = \frac{\frac{1}{x}(\ln x)^2 - (\ln x - 1)\cdot 2\ln x \cdot (\frac{1}{x})}{(\ln x)^4} = \frac{2 - \ln x}{x(\ln x)^3}$.
$0 < x < 1 \implies f''(x) < 0 \implies$ concave downward
$1 < x < e^2 \implies f''(x) > 0 \implies$ concave upward
$x > e^2 \implies f''(x) < 0 \implies$ concave downward
Because concavity changes at $x = e^2$, $x = e^2$ is an inflection point.
The plot is shown in Figure 1.b.
Some exotic examples
The Topologist’s Sine Curve
$$y = \sin\left(\frac{1}{x}\right)$$
The sine function is the ratio of the length opposite to the given angle and the hypotenuse of the given triangle, $\sin(\theta) = \frac{\text{opposite}}{\text{hypotenuse}}$. It is an odd function ($\sin(-x) = -\sin(x)$), periodic with a period of $2\pi$, and strictly bounded between $-1$ and $1$.
For $f(x) = \sin(1/x)$, it is essential to notice that $|\sin(1/x)| \le 1$, hence the entire graph is bounded between the horizontal lines $y = -1$ and $y = 1$.


- Zeros: The function crosses the x-axis when $1/x = n\pi \implies x = \frac{1}{n\pi}$ (for integer $n \neq 0$).
- Behavior near zero: As $x$ approaches $0$, the interior term $1/x$ grows infinitely large (both positively and negatively). This causes the sine function to cycle through its entire period infinitely many times in any small interval around $x = 0$.
- The function is undefined at $x=0$, and because it oscillates infinitely between $-1$ and $1$, the limit $\lim_{x \to 0} \sin(1/x)$ does not exist (Figure a).
Squeeze Theorem Application
$$y = x \cdot \sin\left(\frac{1}{x}\right)$$
(Figure b).
Recall our boundary for the sine function: $\left| \sin\left(\frac{1}{x}\right) \right| \le 1 \iff -1 \le \sin\left(\frac{1}{x}\right) \le 1$
If we multiply the entire inequality by $x$ (assuming $x > 0$ for a moment), we get: $-x \le x\cdot\sin\left(\frac{1}{x}\right) \le x$
This means the graph is “squeezed” or bounded between the linear lines $y = x$ and $y = -x$. Because both of these boundary lines approach $0$ as $x \to 0$, we can apply the Squeeze Theorem: $\boxed{\lim_{x \to 0} x \cdot \sin\left(\frac{1}{x}\right) = 0}$
Near $x = 0$, both the sinusoidal and reciprocal properties cause rapid oscillations, but those oscillations are strictly clamped down to the origin by the envelope of $y = x$ and $y = -x$.
End behavior at infinity: As $x \to \infty$, we can rewrite the expression to use L’Hôpital’s rule (or the standard limit $\lim_{u\to 0} \frac{\sin u}{u} = 1$ where $u = 1/x$):
$$\lim_{x \to \infty} x \cdot \sin\left(\frac{1}{x}\right) = \lim_{x \to \infty} \frac{\sin(1/x)}{1/x} = \lim_{x \to \infty} \frac{\cos(1/x) \cdot (-1/x^2)}{(-1/x^2)} = \lim_{x \to \infty} \cos(1/x) = \cos(0) = 1$$
So moving away from the origin, the function will touch its boundary envelopes $y = \pm x$ for the last time near $x = \pm 1$, and then gradually approach a horizontal asymptote of $y = 1$.
Bibliography
This content is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
- NPTEL-NOC IITM, Introduction to Galois Theory.
- Algebra, Second Edition, by Michael Artin.
- LibreTexts, Calculus.
- Field and Galois Theory, by Patrick Morandi. Springer.
- Michael Penn, and MathMajor.
- Contemporary Abstract Algebra, Joseph, A. Gallian.
- YouTube’s Andrew Misseldine: Calculus, College Algebra and Abstract Algebra.
- Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.
- blackpenredpen.