0
$\begingroup$

The error bound formulas for trapezoidal rule and simpson's rule say that:

$\begin{array}{l}{\text { Error Bound for the Trapezoid Rule: Suppose that }\left|f^{\prime \prime}(x)\right| \leq k \text { for some } k \in \mathbb{R} \text { where }} \\ {a \leq x \leq b . \text { Then }} \\ {\qquad\left|E_{T}\right| \leq k \frac{(b-a)^{3}}{12 n^{2}}} \\ {\text { Error Bound for Simpson's Rule: Suppose that }\left|f^{(4)}(x)\right| \leq k \text { for some } k \in \mathbb{R} \text { where }} \\ {a \leq x \leq b . \text { Then }} \\ {\qquad\left|E_{S}\right| \leq k \frac{(b-a)^{5}}{180 n^{4}}}\end{array} $

Using these formulas, is it possible to find functions where Trapezoid Rule is more accurate than Simpson's rule? Maybe starting off with something like:

$k_T \frac{(b-a)^{3}}{12 n^{2}} \leq k_S \frac{(b-a)^{5}}{180 n^{4}}$

$k_T {15 n^{2}} \leq k_S {(b-a)^{2}}$

If we cant use this inequality. How can I identify functions where Trapezoidal rule is more accurate than Simpson's rule.

$\endgroup$
2
  • $\begingroup$ Are you looking for where the absolute value of the actual error is greater, or where the upper bound of the potential errors is greater? Note you question title indicates your're asking for the former, but your question text calculations indicate you're looking for the latter. $\endgroup$ Nov 9 '19 at 7:28
  • $\begingroup$ Sorry for the confusion. I was looking for cases where the absolute error is greater. $\endgroup$ Nov 9 '19 at 7:47
2
$\begingroup$

Note that "these formulas" give only an error estimate. The actual error may be much smaller.

In order to obtain an example where the formula for $E_S$ produces a larger error than the formula for $E_T$ consider the function $$f(x):=\sin(\omega x)\qquad(0\leq x\leq1)\ .$$ You then have $|f''(x)|\leq\omega^2$ and $|f^{(4)}(x)|\leq \omega^4$. This gives $$|E_T|\leq {\omega^2\over12 n^2},\qquad |E_S|\leq{\omega^4\over180 n^4}\ ,$$ so that the estimate for $E_S$ is worse than the estimate for $E_T$ as soon as $\omega^2\geq 15 n^2$.

$\endgroup$
2
  • $\begingroup$ How did you deduce that $\sin(wx)$ would satisfy those conditions. Did you know this before? $\endgroup$ Nov 10 '19 at 8:57
  • $\begingroup$ @NoLand'sMan: By differentiating $x\mapsto \sin(\omega x)$ according to the chain rule, and using that $|\sin t|\leq1$ for all $t$. $\endgroup$ Nov 10 '19 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.