The more I learn about people, the more I like dogs and I don’t even have a dog, Apocalypse, Anawim, #justtothepoint.
Antiderivatives are the inverse operation of derivatives and form the foundation of integral calculus.
Given a function $f(x)$, an antiderivative (also known as an indefinite integral), denoted as $F(x)$, is a function that can be differentiated to obtain the original function, i.e., $F'(x) = f(x)$; e.g., $3x^2 - 1$ is the derivative of $x^3 - x + 7$, which means $x^3 - x + 7$ is an antiderivative of $3x^2 - 1$.
Symbolically, the process of finding antiderivatives is called integration, and we write it as: $F(x) = \int f(x)dx$
The Fundamental Theorem of Calculus bridges the gap between derivatives and integrals.
It states that the definite integral of a function $f$ over an interval $[a, b]$ is equal to the change in any of its antiderivatives $F$ between the ends of that interval: $\boxed{\int_{a}^{b} f(x)dx = F(b) - F(a) = F(x) \bigg\vert{}_{a}^{b}}$
If we consider $f$ to be a continuous rate of change (meaning $f(x) = F'(x)$), this theorem can be restated as the Net Change Theorem: The definite integral of a rate of change of a function on $[a, b]$ is the total change of the function itself on that interval.
The Second Fundamental Theorem of Calculus. If $f$ is a continuous function and c is a constant, then f has a unique antiderivative A that satisfies $A(c) = 0$, and that antiderivative is given by the rule $A(x) = \int_{c}^{x} f(t)dt$.
Some functions do not have an elementary antiderivative, making standard evaluation techniques impossible. A famous example is the function $f(t) = e^{-t^2}$, which forms the basis of the normal distribution in probability and statistics.
While we cannot find a simple function $F(t)$ such that $F'(t) = e^{-t^2}$, we can evaluate its definite integral over the entire real line using advanced techniques (such as polar coordinates with multivariable calculus). This is known as the Gaussian Integral (Figure 1.b.).
Because the function $e^{-t^2}$ is an even function (symmetric across the y-axis), we can split the integral: $\int_{-\infty}^{\infty} e^{-t^{2}} \,dt = \int_{-\infty}^{0} e^{-t^{2}} \,dt + \int_{0}^{\infty} e^{-t^{2}} \,dt = 2\int_{0}^{\infty} e^{-t^{2}} \,dt$
Recall the Second Fundamental Theorem of Calculus. If $f$ is a continuous function and $c$ is a constant, then $f$ has a unique antiderivative $A$ that satisfies $A(c) = 0$, and that antiderivative is given by the rule $A(x) = \int_{c}^{x} f(t) \,dt$.
Let $F(x) = \int_{0}^{x} e^{-t^{2}} \,dt$. Then, our integral is $2F(\infty)$.
It turns out that evaluating this limit as $x \to \infty$ yields $F(\infty) = \frac{\sqrt{\pi}}{2}$ (this is indeed a difficult integral). Therefore, the total area under the Gaussian curve is: $2\left(\frac{\sqrt{\pi}}{2}\right) = \sqrt{\pi}$
When analytical solutions are challenging, extremely difficult, or even impossible, like with $e^{-x^2}$, we rely on numerical integration. This comprises a broad family of algorithms for calculating the numerical value of a definite integral by approximating the area under the curve using simple geometric shapes.
All numerical approximations of the integral $\int_{a}^{b} f(x) \,dx$ start with a partition of the interval $[a, b]$ into $n$ equal parts: $a = x_{0} < x_{1} < \dots < x_{n} = b$
The width of each subinterval is $\Delta x = \frac{b-a}{n}$, and the corresponding heights of the function are $y_{0} = f(x_{0}), y_{1} = f(x_{1}), \dots, y_{n} = f(x_{n})$
The most basic approximations use rectangles (Figure 1.b).
Left Riemann Sum. The height of each rectangle is determined by the function’s value at the left edge of the subinterval.
$\sum_{k=0}^{n-1} f(x_k)\Delta x = \Delta x (y_{0} + y_{1} + \dots + y_{n-1})$
Right Riemann Sum: The height is determined by the function’s value at the right edge.
$\sum_{k=1}^{n} f(x_k)\Delta x = \Delta x (y_{1} + y_{2} + \dots + y_{n})$
If a continuous function is monotonically decreasing, the left Riemann sum overestimates the area and the right sum underestimates it. The reverse is true for monotonically increasing functions.
Instead of rectangles, we can approximate the area using trapezoids. A trapezoid is a four-sided region with two parallel sides.
For a given subinterval $[x_{i-1}, x_{i}]$, the area of the trapezoid is the average of the two parallel heights multiplied by the width: $\text{Area} = \Delta x \left( \frac{y_{i-1} + y_{i}}{2} \right)$
Adding all the individual trapezoids together gives the Trapezoidal Rule: $\Delta x \left( \frac{y_0+y_1}{2} + \frac{y_1+y_2}{2} + \dots + \frac{y_{n-1}+y_n}{2} \right) = \Delta x \left( \frac{y_0}{2} + y_1 + y_2 + \dots + y_{n-1} + \frac{y_n}{2} \right) = \frac{left Riemann Sum + Right Riemann Sum}{2}$
Notice that every interior point $y_k$ is counted twice (once for the trapezoid on its left, once for the right), while the endpoints $y_0$ and $y_n$ are only counted once. The trapezoidal sum is exactly equal to the average of the Left and Right Riemann sums.
Simpson’s Rule provides a highly accurate approximation by modeling the curve not with flat lines (rectangles) or slanted lines (trapezoids), but with parabolas (quadratic interpolation).
Because a parabola requires three points to define it, we partition $[a, b]$ into an even number of intervals, $n$.
For any three adjacent points $(x_{k-1}, y_{k-1})$, $(x_{k}, y_{k})$, and $(x_{k+1}, y_{k+1})$, the area under the parabola passing through them is exactly: $\text{Area} = \frac{\Delta x}{3} (y_{k-1} + 4y_k + y_{k+1})$
🧠 Step‑by‑step derivation
The weights (1, 4, 1) arise because the integral of a quadratic interpolant over a symmetric interval produces those exact coefficients.
Set up the three points.
Let the three equally spaced x‑values be: $x_{k-1}=a,\quad x_k=a+h,\quad x_{k+1}=a+2h,$ where $h=\Delta x$.
Let the corresponding function values be: $f(a)=y_{k-1},\quad f(a+h)=y_k,\quad f(a+2h)=y_{k+1}.$
Build the unique quadratic interpolant.
The Lagrange form of the quadratic interpolating polynomial is: $P(x)=y_{k-1}L_0(x)+y_k L_1(x)+y_{k+1}L_2(x),$ where the Lagrange basis polynomials are: $L_0(x)=\frac{(x-(a+h))(x-(a+2h))}{(a-(a+h))(a-(a+2h))}, L_1(x)=\frac{(x-a)(x-(a+2h))}{((a+h)-a)((a+h)-(a+2h))}, L_2(x)=\frac{(x-a)(x-(a+h))}{((a+2h)-a)((a+2h)-(a+h))}.$
📐 Integrate the quadratic exactly.
We compute: $\int_{a}^{a+2h} P(x)dx = y_{k-1}\int_a^{a+2h} L_0(x)dx + y_k\int_a^{a+2h} L_1(x)dx + y_{k+1}\int_a^{a+2h} L_2(x)dx.$
Because the interval is symmetric and the spacing is uniform, these integrals evaluate to simple constants: $\int_a^{a+2h} L_0(x)dx = \frac{h}{3}, \int_a^{a+2h} L_1(x)dx = \frac{4h}{3}, \int_a^{a+2h} L_2(x)dx = \frac{h}{3}.$
🎉Combine the pieces.
So the area under the interpolating parabola is: $\int_a^{a+2h} P(x)dx = \frac{h}{3}y_{k-1} + \frac{4h}{3}y_k + \frac{h}{3}y_{k+1}.$
Factor out $h=\Delta x$: $\boxed{ \text{Area} = \frac{\Delta x}{3}\left(y_{k-1} + 4y_k + y_{k+1}\right) }$
When we sum these parabolic areas across the entire interval, the coefficients overlap in a specific pattern:
This yields Simpson’s Rule: $S_n = \frac{\Delta x}{3} (y_0 + 4y_1 + 2y_2 + 4y_3 + \dots + 2y_{n-2} + 4y_{n-1} + y_n)$
Here, the coefficients alternate between $4$ and $2$ for the interior points.
Simpson's Rule is significantly more accurate than the Trapezoidal rule for approximating integrals because it uses a quadratic interpolation to model the curve. It provides a superb balance between simplicity and accuracy. Furthermore, it is incredibly powerful because it is exact when integrating polynomials of degree 3 or less, meaning it perfectly calculates the area under cubics and quadratics with zero error.
Here, we will compare the exact analytical calculation of an integral with the approximations generated by the Trapezoidal and Simpson’s Rules.
Figure 1.a.
First, let’s find the exact area under the curve $y = \frac{1}{x}$ from $x = 1$ to $x = 2$:
$\int_{1}^{2} \frac{dx}{x} = \ln(x)\bigg\vert{}_{1}^{2} = \ln(2) - \ln(1) = \ln(2) \approx 0.693147$
Now, let’s approximate this integral using $n = 2$ intervals.
The bounds are $a = 1$, $b = 2$.
The width of each subinterval is $\Delta x = \frac{b-a}{n} = \frac{2-1}{2} = \frac{1}{2}$.
The x-values are: $x_0 = 1$, $x_1 = 1.5$, $x_2 = 2$.
The corresponding y-values ($y = \frac{1}{x}$) are: $y_0 = 1$, $y_1 = \frac{2}{3}$, $y_2 = \frac{1}{2}$.
Trapezoidal Rule ($n=2$).
$T_2 = \Delta x \left(\frac{1}{2}y_0 + y_1 + \frac{1}{2}y_2\right) = \frac{1}{2} \left(\frac{1}{2}(1) + \frac{2}{3} + \frac{1}{2}\left(\frac{1}{2}\right)\right)$
Simplifying this expression we get, $T_2 = \frac{1}{2} \left(\frac{1}{2} + \frac{2}{3} + \frac{1}{4}\right) = \frac{1}{2} \left(\frac{6}{12} + \frac{8}{12} + \frac{3}{12}\right) = \frac{1}{2} \left(\frac{17}{12}\right) = \frac{17}{24} \approx 0.70833$
This approximation has a noticeable error ($\approx 2.19\%$). A more accurate trapezoidal estimation would require splitting the interval into many more subintervals (a larger $n$).
Simpson’s Rule ($n=2$).
Note: Simpson’s rule requires $n$ to be an even number, which it is here.
$S_2 = \frac{\Delta x}{3} (y_0 + 4y_1 + y_2) = \frac{1/2}{3} \left(1 + 4\left(\frac{2}{3}\right) + \frac{1}{2}\right)$
$S_2 = \frac{1}{6} \left(1 + \frac{8}{3} + \frac{1}{2}\right) = \frac{1}{6} \left(\frac{6}{6} + \frac{16}{6} + \frac{3}{6}\right) = \frac{1}{6} \left(\frac{25}{6}\right) = \frac{25}{36} \approx 0.69444$
With just two subintervals, Simpson's rule provides a much closer approximation ($\approx 0.18\%$ error) than the trapezoidal rule. It is surprisingly a relatively good approximation of the correct value.
This integral represents a quarter of a circle with a radius of $1$. The exact area is: $\int_{0}^{1} \sqrt{1-x^2} \,dx = \frac{1}{4}(\pi r^2) = \frac{\pi(1)^2}{4} = \frac{\pi}{4} \approx 0.785398$
Let’s approximate this using $n = 4$ intervals.
The bounds are $a = 0$, $b = 1$.
The width is $\Delta x = \frac{1-0}{4} = \frac{1}{4}$.
The x-values are: $x_0 = 0, x_1 = \frac{1}{4}, x_2 = \frac{1}{2}, x_3 = \frac{3}{4}, x_4 = 1$.
Now, we need to compute the function $f(x) = \sqrt{1-x^2}$ values at the endpoints of the subintervals:
$f(x_0) = \sqrt{1 - 0^2} = 1$, $f(x_1) = \sqrt{1 - \left(\frac{1}{4}\right)^2} = \sqrt{\frac{15}{16}}$, $f(x_2) = \sqrt{1 - \left(\frac{1}{2}\right)^2} = \sqrt{\frac{3}{4}}$, $f(x_3) = \sqrt{1 - \left(\frac{3}{4}\right)^2} = \sqrt{\frac{7}{16}}$, and $f(x_4) = \sqrt{1 - 1^2} = 0$
Trapezoidal Rule ($n=4$).
$T_4 = \Delta x \left(\frac{1}{2}y_0 + y_1 + y_2 + y_3 + \frac{1}{2}y_4\right)$
Simplifying this expression we get $T_4 = \frac{1}{4} \left(\frac{1}{2}(1) + \sqrt{\frac{15}{16}} + \sqrt{\frac{3}{4}} + \sqrt{\frac{7}{16}} + \frac{1}{2}(0)\right) \approx 0.748927$
Simpson’s Rule ($n=4$)&.
$S_4 = \frac{\Delta x}{3} (y_0 + 4y_1 + 2y_2 + 4y_3 + y_4) = \frac{1/4}{3} \left(1 + 4\sqrt{\frac{15}{16}} + 2\sqrt{\frac{3}{4}} + 4\sqrt{\frac{7}{16}} + 0\right)$
$S_4 = \frac{1}{12} \left(1 + \sqrt{15} + \sqrt{3} + \sqrt{7}\right) \approx 0.770899$
Solution:
Because the region is rotated around the y-axis and the function is given in terms of $x$, the Shell Method is the most efficient choice. Figure 1.c.
Find the Intersections:
Set the function equal to the x-axis ($y=0$).
$x - x^3 = 0 \implies x(1 - x^2) = 0 \implies x = 0, x = 1, x = -1$
Since we are restricted to the first quadrant, our bounds are $x = 0$ to $x = 1$.
Integrate Using Shells.
The radius of each shell is $x$, and the height is $(x - x^3) = 2\pi \int_{0}^{1} (x^2 - x^4) \,dx$
$V = 2\pi \left[ \frac{x^3}{3} - \frac{x^5}{5} \right]_{0}^{1} = 2\pi \left( \left(\frac{1}{3} - \frac{1}{5}\right) - 0 \right) = 2\pi \left( \frac{5 - 3}{15} \right) = 2\pi \left( \frac{2}{15} \right) = \frac{4\pi}{15}$