Midpoint Rule Error
$a =$, $b =$, $n =$
$|E_M| \le$
Trapezoidal Rule Error
$a =$, $b =$, $n =$
$|E_T| \le$
Note: Errors in this toolkit are guaranteed to be calculated accurately if $f(x)$ is at least three times differentiable on $[a, b]$, meaning all derivatives of $f(x)$ up to $f'''(x)$ should exist at all points across the interval $[a, b]$. As a rule of thumb, most functions that are continuously differentiable are generally smooth (i.e., no corners or cusps, no discontinuities, and no vertical tangents) across their whole domain.
Since we already have $a$, $b$, and $n$, we only need to solve for $K$. However, since most JavaScript plugins are unable to solve for exact maximum function values across an interval, we use a hybrid of two methods to numerically compute $\max_{x\in[a,b]} |f''(x)|$:
The error bound for the Midpoint Rule represents the maximum difference between the true integral and the midpoint rule approximation.
The formula for the error bound is the inequality $|{E_M}| \le \frac{K(b-a)^3}{24n^2}$, where $K$ is the maximum value of $|f''(x)|$ on the closed interval $[a, b]$.
Below are the steps followed to calculate the error bound, given $a =$ , $b = $ , and $n =$ .
Note: A second derivative of $0$ may mean the derivative is unable to be computed.
The expression $\frac{K(b-a)^3}{24n^2}$ provides the guaranteed upper bound of the approximation's error; that is, the absolute error $|{E_M}|$ is at most $\frac{K(b-a)^3}{24n^2}$.
The error bound for the Trapezoidal Rule represents the maximum difference between the true integral and the trapezoidal rule approximation.
The formula for the error bound is the inequality $|{E_T}| \le \frac{K(b-a)^3}{12n^2}$, where $K$ is the maximum value of $|f''(x)|$ on the closed interval $[a, b]$.
Below are the steps followed to calculate the error bound, given $a =$ , $b = $ , and $n =$ .
Note: A second derivative of $0$ may mean the derivative is unable to be computed.
The expression $\frac{K(b-a)^3}{12n^2}$ provides the guaranteed upper bound of the approximation's error; that is, the absolute error $|{E_T}|$ is at most $\frac{K(b-a)^3}{12n^2}$.