Single-variable Calculus
Intro
Fundamentally, calculus was motivated by two problems: computing the instantaneous rate of change and the area under a curve. Calculus proves that these two seemingly separate problems are actually intrinsically linked.
Calculus studies the behavior of functions mapping between continuous real numbers. Therefore, unlike discrete mathematics, calculus operates on the real numbers $\mathbb{R}$, which is a complete set (that is, there are no “holes” in the number line). This implies the following theorems which, although used in introductory calculus classes, are more of an analysis topic. Nevertheless, we state the theorem here as a convenience for the reader.
The IVT is equivalent to the completeness of the real numbers. The EVT is a consequence of the Bolzano-Weierstrass Theorem and is used to prove the Mean Value Theorem.
Limits
Intuitively, limits are an educated guess by mathematicians. Consider $f(x) = x^2 \sin(x)$, which is undefined at $x = 0$. Although $f$ cannot be evaluated at $x = 0$ directly, we can still study the behavior of $f$ in the neighborhood around $0$ to get a sense of what’s going on at zero.
For example, we can ask is whether $f$ approaches some value arbitrarily close when $x$ is moved sufficiently close to $0$. If such a value does exist, we formally denote it through the notion of a limit.
Let $f: I \subseteq \R \to \R$ be defined on some open interval $I$ that contains $a$, except possibly at $a$ itself. Then we write $\lim\limits_{x \to a} f(x) = L$ if for any number $\epsilon > 0$, there exists another number $\delta > 0$ such that:
$$0 < \abs{x-a} < \delta \implies \abs{f(x) - L} < \epsilon$$
We also define one-sided limits similarly, and denote them by $x \to a^+$ and $x \to a^-$ in the subscripts respectively.
This definition is known as the epsilon-delta definition of the limit, in addition to serving as a giant shock to first-year calculus students. If the reader is currently a first-year calculus student, then rest assured that you almost certainly won’t ever use this definition to compute limits.
This is because computing limits through its definition is tedious, and rarely done in an introductory calculus class. Thus, we develop the limit laws below to assist us in calculating trivial limits. In addition to the laws, it can also be proven that limits of continuous functions and polynomial functions are exactly their function values.
| Limit Laws |
|---|
| $\lim\limits_{x \to a} (\alpha \cdot f(x)) = \alpha \cdot \lim\limits_{x \to a} f(x)$ |
| $\lim\limits_{x \to a} (f(x) \pm g(x)) = \lim\limits_{x \to a} f(x) \pm \lim\limits_{x \to a} g(x)$ |
| $\lim\limits_{x \to a} (f(x) \cdot g(x)) = \lim\limits_{x \to a} f(x) \cdot \lim\limits_{x \to a} g(x)$ |
| $\lim\limits_{x \to a} \dfrac{f(x)}{g(x)} = \dfrac{\lim_{x \to a} f(x)}{\lim_{x \to a} g(x)}$, provided $\lim\limits_{x \to a} g(x) \neq 0$ |
| $\lim\limits_{x \to a} f(g(x)) = f \left(\lim\limits_{x \to a} g(x) \right)$, provided $f$ continuous |
The function $f$ is said to be continuous at a point $c$ in $I$ if and only if $\lim\limits_{x \to c} f(x) = f(c)$ (the limit existing and the function value defined). If $f$ is continuous at every $x$ in $I$, then $f$ is said to be continuous on $I$.
Derivatives
Derivatives were developed to solve the first problem in calculus: computing instantaneous change. Because the change $\Delta f / \Delta t$ cannot be evaluated directly when $\Delta t = 0$, one must use the limiting machinery developed in the previous section.
Let $f: I \subseteq \R \to \R$ be defined on the open interval $I$. Its derivative as a function is defined as the limit:
$$f’(x) = \lim\limits_{h \to 0} \dfrac{f(x + h) - f(x)}{h}$$
If the limit exists at $x = c$, then $f$ is called differentiable at $c$. If $f$ is differentiable for every point in $I$, then $f$ is called differentiable on $I$. Other notations for $f’$ include $\dot{f}$ and $\dv{f}{x}$, the Newtonian and Leibniz notation respectively.
If $f$ is differentiable at $x = a$, then $f$ must also be continuous. However, the reverse is not necessarily true. Again, similar to the case with limits, using the definition to compute derivatives is tedious. Thus, we develop the following rules for differentiation, as well as derivatives of common functions below.
| Differentiation rules | |
|---|---|
| $\displaystyle \dv{}{x} (\alpha \cdot f(x)) = \alpha \cdot f’(x)$ | constant multiple1 |
| $\displaystyle \dv{}{x} (f(x) \pm g(x)) = f’(x) \pm g’(x)$ | sum rule1 |
| $\displaystyle \dv{}{x} (f(x) \cdot g(x)) = f(x)\thinspace g’(x) + g(x)\thinspace f’(x)$ | product rule |
| $\displaystyle \dv{}{x} \left(\dfrac{f(x)}{g(x)}\right) = \dfrac{g(x)\thinspace f’(x) - f(x)\thinspace g’(x)}{g(x)^{2}}$ | quotient rule |
| $\displaystyle \dv{}{x} (f(g(x))) = f’(g(x)) \cdot g’(x)$ | chain rule |
| Derivatives of Common Functions | |
|---|---|
| $\displaystyle \dv{}{x} (x^\alpha) = \alpha \cdot x^{\alpha - 1}$ | $\displaystyle \dv{}{x} (f^{-1}(x)) = \dfrac{1}{f’(f^{-1}(x))}$ |
| $\displaystyle \dv{}{x} (e^{x}) = e^{x}$ | $\displaystyle \dv{}{x} (a^{x}) = a^{x} \ln a$ |
| $\displaystyle \dv{}{x} (\ln \abs{x}) = \dfrac{1}{x}$ | $\displaystyle \dv{}{x} (\log_{a} \abs{x}) = \dfrac{1}{x \ln a}$ |
| $\displaystyle \dv{}{x} (\sin x) = \cos x$ | $\displaystyle \dv{}{x} (\arcsin x) = \dfrac{1}{\sqrt{1 - x^{2}}}$ |
| $\displaystyle \dv{}{x} (\cos x) = -\sin x$ | $\displaystyle \dv{}{x} (\arccos x) = \dfrac{-1}{\sqrt{1 - x^{2}}}$ |
| $\displaystyle \dv{}{x} (\sec x) = \sec x \tan x$ | $\displaystyle \dv{}{x} (\arcsec x) = \dfrac{1}{\abs{x} \sqrt{x^{2} - 1}}$ |
| $\displaystyle \dv{}{x} (\csc x) = -\csc x\cot x$ | $\displaystyle \dv{}{x} (\arccsc x) = \dfrac{-1}{\abs{x} \sqrt{x^{2} - 1}}$ |
| $\displaystyle \dv{}{x} (\tan x) = \sec^{2} x$ | $\displaystyle \dv{}{x} (\arctan x) = \dfrac{1}{1 + x^{2}}$ |
| $\displaystyle \dv{}{x} (\cot x) = -\csc^{2} x$ | $\displaystyle \dv{}{x} (\arccot x) = \dfrac{-1}{1 + x^{2}}$ |
Let $f: [a, b] \to \R$ be continuous on the closed interval $[a, b]$ and differentiable on the open interval $(a, b)$. Then, there exists some $c$ in $(a, b)$ such that
$$f’(c) = \dfrac{f(b) - f(a)}{b - a}$$
When $f(b) = f(a)$, this reduces to Rolle’s Theorem.
We now discuss some applications of derivatives.
One application is linearization. We can approximate a differentiable function with a linear function locally. In one dimension, the linearization $L$ of a function $f$ at point $x = a$ is given by $L(x) = f’(a)(x - a) + f(a)$. This idea will be further applied in advanced calculus.
Another application is in optimization. While most real life problems are optimizations with multiple variables, one variable optimization is still very much relevant because it provides the foundation in which multivariable optimization uses. In particular, we can use the first and second derivative tests.
- First derivative test: If $f’(a)$ is zero or undefined, and $f’(x)$ changes from positive to negative at $x = a$, then $f(a)$ is a local maximum. If $f(x)$ changes from negative to positive, then $f(a)$ is a local minimum.
- Second derivative test: If $f’(a)$ is zero and $f’’(a) > 0$, then $f(a)$ is a local minimum. If $f’(a)$ is zero and $f’’(a) < 0$, then $f(a)$ is a local maximum. The test is inconclusive if $f’’(a) = 0$ or is undefined.
Finally, we can use derivatives backwards to help us compute limits. In particular, we can apply L’Hôpital’s Rule, as described below, to calculate a limit of the indeterminate forms $0 / 0$ and $\infty / \infty$, again saving us from using the epsilon-delta definition.
Let $f,\ g: I \to \R$ be well-defined on an open interval $I$ which contains $a$. If both $f(a)$ and $g(a)$ equals $0$ or $\pm \infty$, $g’(x)$ is nonzero everywhere on $I \backslash \{ a \}$, and $\lim\limits_{x \to a} \tfrac{f’(x)}{g’(x)}$ exist, then:
$$\lim\limits_{x \to a} \dfrac{f(x)}{g(x)} = \lim\limits_{x \to a}\dfrac{f’(x)}{g’(x)}$$
Although we have written $x \to a$, the limiting value may also be one sided ($x \to a^+$ or $x \to a^-$) or infinite.
Integrals
Integrals were developed to solve the second problem in calculus: computing the area under a curve. That said, finding area is only one application of a much more general idea, which is the recovery of the net change through instantaneous change. This is the idea expressed in the Fundamental Theorem of Calculus.
In Riemann integration theory, this is done by first samping the rate of accumulation $f$ at $k$ different points and summing them. Then, the net change change is recovered by taking the limit of the partial sums as $k \to \infty$. This sampling business is defined as follows.
Let $f: [a, b] \to \R$ be defined on the closed interval $[a, b]$, and let $a = x_0 < x_1 < x_2 < \dots < x_k = b$ be a partition of $[a, b]$. The Riemann sum $S$ of $f$ over $[a, b]$ is defined as
$$S = \sum_{i = 1}^{k} f(x_i^*) \Delta x_i$$
where $x_i^*$ is a sample point of the interval $[x_{i - 1}, x_i]$ and $\Delta x_i = x_i - x_{i - 1}$.
Riemann summation is best approached with subintervals of equal size. The interval $[a, b]$ is therefore divided into $n$ subintervals, each of length $\Delta x = \frac{b - a}{n}$. In particular, the sum is a
- A left Riemann sum if $x_i^* = x_{i - 1}$ for all $i$, as given by the left rule
- A right Riemann sum if $x_i^* = x_i$ for all $i$, as given by the right rule
- A middle Riemann sum if $x_i^* = (x_i + x_{i - 1}) / 2$ for all $i$, as given by the midpoint rule
Let $f: [a, b] \to \R$ be defined on the closed interval $[a, b]$. The definite integral of $f$ on $[a, b]$ is defined to be the limit of the Riemann sum as the number of partitions approaches $\infty$ and each $\Delta x_i \to 0$
$$\int_{a}^{b} f(x)\ \dd{x} = \lim_{\Delta x_i \to 0} \sum_{i = 1}^{k} f(x_i^*) \Delta x_i$$
If the limit exist, we say that $f$ is Riemann integrable, or simply integrable. In this case, $f$ the integrand, $a$ the lower bound, $b$ the upper bound, and $x$ the variable of integration.
Similar to the case with limits and differentiation, using this definition directly to compute integrals is tedious and even impossible in some cases. Thus, we develop the following theorem to compute precise answers for integrals.
Let $f: [a, b] \to \R$ be continuous on $[a, b]$. Let $f’$ be Riemann integrable on $[a, b]$. Then, the definite Riemann integral is calculated as:
$$\int_{a}^{b} f’(x)\ \dd{x} = f(b) - f(a)$$
This is sometimes known as the Newton-Leibniz Theorem.
The Fundamental Theorem of Calculus states that integration recovers the net change from instantaneous change. Thus, when one integrates $f(x)$ to find the area under the curve, $f(x)$ is really the “area density function”, or how much its own area changes as $x$ changes. The integral then recovers the area from the density function.
Finally, since the Fundamental Theorem of Calculus requires evaluating antiderivatives to compute definite integrals, we will use the integral sign to denote this antiderivative finding process.
Let $f, F: [a, b] \to \R$ be defined on the closed interval $[a, b]$ such that $F’ = f$. The indefinite integral of $f$ on $[a, b]$ is defined as
$$\int f(t)\ \dd{t} = F(x) + C$$
which is the most general form of the antiderivative of $f$ plus a constant $C \in \R$.
We give some properties and integrals of common functions below as a convenience.
| Integral Properties | ||
|---|---|---|
| $\displaystyle \int _{a}^{b} f(x)\ \dd{x} = -\int _{b}^{a} f(x)\ \dd{x}$ | ||
| $\displaystyle\int _{a}^{b} \alpha \cdot f(x)\ \dd{x} = \alpha \int _{a}^{b} f(x)\ \dd{x}$ | ||
| $\displaystyle\int _{a}^{b} (f(x) \pm g(x))\ \dd{x} = \int _{a}^{b} f(x)\ \dd{x} \pm \int _{a}^{b} g(x)\ \dd{x}$ | ||
| $\displaystyle \int _{a}^{c} f(x)\ \dd{x} = \int _{a}^{b} f(x)\ \dd{x} + \int _{b}^{c} f(x)\ \dd{x}$ | (for all $b \in \R$) |
| Integrals of Common Functions | |
|---|---|
| $\displaystyle \int x^{\alpha}\ \dd{x} = \frac{x^{\alpha + 1}}{\alpha + 1} + C$ (for all $\alpha \neq -1)$ | $\displaystyle \int \frac{1}{x}\ \dd{x} = \ln \abs{x} + C$ (for all $x \in \R$) |
| $\displaystyle \int e^{x}\ \dd{x} = e^{x} + C$ | $\displaystyle \int b^{x}\ \dd{x} = \frac{b^{x}}{\ln b} + C$ |
| $\displaystyle \int \sin x\ \dd{x} = -\cos x + C$ | $\displaystyle \int \cos x\ \dd{x} = \sin x + C$ |
| $\displaystyle \int \sec x \tan x\ \dd{x} = \sec x + C$ | $\displaystyle \int \csc x \cot x \ \dd{x} = -\csc x + C$ |
| $\displaystyle \int \sec^{2} x\ \dd{x} = \tan x + C$ | $\displaystyle \int \csc^{2} x\ \dd{x} = \cot x + C$ |
| $\displaystyle \int \tan x\ \dd{x} = -\ln \abs{\cos x} + C$ | $\displaystyle \int \cot x\ \dd{x} = \ln \abs{\sin x} + C$ |
| $\displaystyle \int \sec x\ \dd{x} = \ln \abs{\sec x + \tan x} + C$ | $\displaystyle \int \csc x\ \dd{x} = -\ln \abs{\csc x + \cot x} + C$ |
| $\displaystyle \int \frac{1}{\sqrt{1 - x^{2}}}\ \dd{x} = \arcsin x + C$ | $\displaystyle \int \frac{1}{1 + x^{2}}\ \dd{x} = \arctan x + C$ |
In addition to above, we also include the following techniques to find antiderivatives and some formulas for the reader’s convenience.
Note that in contrast to differentiation, integration (or antidifferentiation, which is probably a more apt term) is not done algorithmically and is by orders of magnitude harder. In fact, most functions do not have an elementary antiderivative and cannot be integrated symbolically at all. Some examples include $e^x \ln x$, $\sin (x^2)$, $\sqrt{1 - x^4}$, and many more.
| Expression | Trigonometric Substitution | Result |
|---|---|---|
| $\sqrt{a^2 - x^2}$ | $x = a \sin \theta \iff \dd{x} = a \cos \theta\ \dd{\theta}$ | $\sqrt{a^2 - x^2} = a \cos \theta$ |
| $\sqrt{a^2 + x^2}$ | $x = a \tan \theta \iff \dd{x} = a \sec^2 \theta\ \dd{\theta}$ | $\sqrt{a^2 + x^2} = a \sec \theta$ |
| $\sqrt{x^2 - a^2}$ | $x = a \sec \theta \iff \dd{x} = a \sec \theta \tan \theta\ \dd{\theta}$ | $\sqrt{x^2 - a^2} = a \tan \theta$ |
Series
A series is, loosely speaking, the addition of infinitely many terms. Series are useful in that they turn complicated functions into simpler polynomial representations, which are nicer to work with. In particular, calculus enables us to define the Taylor Series.
Let $f$ be an infinitely differentiable real-valued function, and let $f^{(k)}$ denote the $k$-th derivative of $f$. We state the following without proof. The Taylor series of $f$ at the center $x = a$ is the power series given by
$$\sum_{k = 0}^\infty \dfrac{f^{(k)}(a)}{k!}(x - a)^k = f(a) + \frac{f’(a)}{1!}(x - a) + \frac{f’’(a)}{2!}(x - a)^2 + \cdots$$
In particular, when the center of the Taylor series is at $x = 0$, it is called the Maclaurin series.
Taylor series can be added, subtracted, and multiplied. Taylor series may also be differentiated and integrated term by term. The differentiated and integrated series have the same radius of convergence (see below) as the original power series, although the convergence behavior at the boundary may be different.
In real life, we cannot evaluate series with infinitely many terms. Thus, we develop the tools to quantify the error when we use a finite Taylor polynomial of degree $n$ to approximate a function.
Let $T_n$ be the $n$-th degree Taylor polynomial of $f$ at $x = a$. Then, $f(x) = T_n(x) + R_{n}(x)$ for some error term $R_n(x)$. If $f^{(n + 1)}$ is continuous on the interval containing $a$, then $R_n(x)$ satisfies:
$$R_n(x) = \dfrac{f^{(n + 1)}(c)}{(n + 1)!}(x - a)^{n + 1}$$
for some $c$ between $x$ and $a$ (this is the Lagrange form of the error).
Below is a table of Maclaurin series of the most common function and their interval of convergence.
| Function | Maclaurin series | Interval of Convergence |
|---|---|---|
| $\displaystyle \frac{1}{1-x}$ | $\displaystyle \sum_{n=0}^{\infty} x^n = 1 + x + x^2 + x^3 + \cdots$ | $(-1, 1)$ |
| $e^x$ | $\displaystyle \sum_{n=0}^{\infty} \frac{x^n}{n!} = 1 + x + \dfrac{x^2}{2!} + \dfrac{x^3}{3!} + \cdots$ | $(-\infty, \infty)$ |
| $\sin x$ | $\displaystyle \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!} = x - \dfrac{x^3}{3!} + \dfrac{x^5}{5!} - \dfrac{x^7}{7!} + \cdots$ | $(-\infty, \infty)$ |
| $\cos x$ | $\displaystyle \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n}}{(2n)!} = 1 - \dfrac{x^2}{2!} + \dfrac{x^4}{4!} - \dfrac{x^6}{6!} + \cdots$ | $(-\infty, \infty)$ |
| $\arctan x$ | $\displaystyle \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{2n+1} = x - \dfrac{x^3}{3} + \dfrac{x^5}{5} - \dfrac{x^7}{7} + \cdots$ | $[-1, 1]$ |
| $\ln(1+x)$ | $\displaystyle \sum_{n=1}^{\infty} \frac{(-1)^{n+1} x^n}{n} = x - \dfrac{x^2}{2} + \dfrac{x^3}{3} - \dfrac{x^4}{4} + \cdots$ | $(-1, 1]$ |
In the previous section, there are several places where we mentioned the radius or interval of convergence. We care about these because most Taylor series are not good for any arbitrary value we plug in; there are values in which a series converges to a useful value, or diverges to a nonsensical one no matter how many terms one add.
Let us define the following terms. Note that we sometimes omit the limit in the summation notation since it is easier to type and looks cleaner.
- $\sum a_n$ converges if its partial sums $ S_k = \sum_{n = 1}^k a_n$ has a limit, otherwise it diverges.
- $\sum a_n$ absolutely converges if $\sum \abs{a_n}$ converges. This implies regular convergence.
- $\sum a_n$ conditionally converges if $\sum \abs{a_n}$ diverges, but $\sum a_n$ converges.
To determine whether or not a series converges or diverges, we develop the following tests for convergence. Let $\sum a_n$ be the series we try to determine convergence for, and let $f(n) = a_n$. Then:
| Name | Convergence Condition | Divergence Condition |
|---|---|---|
| $n$-th Term Test | N/A | $\lim\limits_{n \to \infty} a_n \neq 0$ |
| Ratio Test | $\lim\limits_{n \to \infty} \left|\dfrac{a_{n + 1}}{a_n}\right| < 1$ | $\lim\limits_{n \to \infty} \left|\dfrac{a_{n + 1}}{a_n}\right| > 1$ |
| Root Test | $\lim\limits_{n \to \infty} \sqrt[n]{\abs{a_n}} < 1$ | $\lim\limits_{n \to \infty} \sqrt[n]{\abs{a_n}} > 1$ |
| Direct Comparison | $0 < a_n \le b_n$ and $\sum\limits_{n = 1}^\infty b_n$ converges | $0 < b_n \le a_n$ and $\sum\limits_{n = 1}^\infty b_n$ diverges |
| Limit Comparison | $\lim\limits_{n \to \infty} \dfrac{a_n}{b_n} > 0$ and $\sum\limits_{n = 1}^\infty b_n$ converges | $\lim\limits_{n \to \infty} \dfrac{a_n}{b_n} > 0$ and $\sum\limits_{n = 1}^\infty b_n$ diverges |
| Integral Test | $\int_1^\infty f(x)\ \dd{x}$ converges | $\int_1^\infty f(x)\ \dd{x}$ diverges |
In addition, series of the form $\sum 1 / n^p$ and $\sum (-1)^{n - 1} a_n$ (p-series and alternating series, respectively) come up so frequently in determining convergence that we develop separate tests just for these special series:
- The p-series test: converges when $p > 1$, diverges when $p \le 1$.
- The alternating series test: converges when $0 < a_{n + 1} < a_n$ and $\lim\limits_{n \to \infty} a_n = 0$.
Footnotes
Note that the constant multiple and the sum rule also means that differentiation is a linear transformation between polynomial vector spaces, since it satisfies $T(ax + by) = a \cdot T(x) + b \cdot T(y)$. See linear algebra. ↩︎ ↩︎