MHB Calculating Integral with Simpson's Rule for Error < $0.5\cdot 10^{-3}$

  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Error Integral
Click For Summary
SUMMARY

The forum discussion focuses on calculating the integral $\int_0^1\sqrt{1+x^4}\, dx$ using the composite Simpson's Rule, aiming for an error less than $0.5\cdot 10^{-3}$. The upper bound of the error is derived from the formula $$\frac{h^4}{180}(b-a)\max_{\xi \in [a,b]}|f^{(4)}(\xi)|$$, leading to the conclusion that $h$ must be approximately $0.294283$. However, it is clarified that $h$ must be defined as $h=\frac{b-a}{n}$ for some even integer $n$, resulting in $n=4$ and $h=\frac{1}{4}$. Alternatives for achieving the desired accuracy include iterating Simpson's Rule with increasing values of $n$ until the error condition is satisfied.

PREREQUISITES
  • Understanding of Simpson's Rule for numerical integration
  • Knowledge of calculating derivatives, specifically the fourth derivative
  • Familiarity with error analysis in numerical methods
  • Basic algebra for manipulating inequalities and solving for variables
NEXT STEPS
  • Learn about the implications of the error bound in Simpson's Rule
  • Explore numerical integration techniques beyond Simpson's Rule
  • Study the behavior of higher-order derivatives in error estimation
  • Investigate numerical methods for evaluating definite integrals
USEFUL FOR

Mathematicians, engineering students, and anyone involved in numerical analysis or computational mathematics seeking to understand error estimation in numerical integration techniques.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! 😊

Calculate using the Simpson's Rule the integral $\int_0^1\sqrt{1+x^4}\, dx$ approximately such that the error is less that $0,5\cdot 10^{-3}$. Which has to be $h$ ?

So we use here the composite Simpson's rule, right?

An upper bound of the error of that rule is defined as $$\frac{h^4}{180}(b-a)\max_{\xi \in [a,b]}|f^{(4)}(\xi)|$$ and we have to set this equal to $0,5\cdot 10^{-3}$, right?

So we get $$\frac{h^4}{180}\max_{\xi \in [a,b]}|f^{(4)}(\xi)|=0,5\cdot 10^{-3} $$

The $4$.th derivative of $f(x)=\sqrt{1+x^4}$ is $\frac{12 (1 - 14 x^4 + 5 x^8)}{(1 + x^4)^{7/2}}$. If we check if this is increasing or decreasing on $[0,1]$ we see that the maximum on that interval is at $x=0$ and it is equal to $12$.

So we get $$\frac{h^4}{180}\cdot 12=0,5\cdot 10^{-3} \Rightarrow h^4=\frac{180}{12}0,5\cdot 10^{-3} \Rightarrow h^4=7.5\cdot 10^{-3} \Rightarrow h\approx 0.294283$$

Is that correct?
 
Mathematics news on Phys.org
Hey mathmari!

The calculation looks correct to me.
But $h$ cannot be $0.29$. Instead we must have that $h=\frac{b-a}{n}$ for some even $n$. (Worried)
I checked with $n=4$ and found an error of $1.6\cdot 10^{-5}$, which satisfies the condition.
 
Klaas van Aarsen said:
The calculation looks correct to me.
But $h$ cannot be $0.29$. Instead we must have that $h=\frac{b-a}{n}$ for some even $n$. (Worried)
I checked with $n=4$ and found an error of $1.6\cdot 10^{-5}$, which satisfies the condition.

Aaa so do we do the following?

Since $h=\frac{b-a}{n}=\frac{1}{n}$ we get $$\frac{h^4}{180}\cdot 12<0,5\cdot 10^{-3} \Rightarrow h^4<\frac{180}{12}0,5\cdot 10^{-3} \Rightarrow h^4<7.5\cdot 10^{-3}\Rightarrow \frac{1}{n^4}<7.5\cdot 10^{-3}\Rightarrow n^4>\frac{1}{7.5}\cdot 10^{3}\Rightarrow n>3.398 $$
So we take $n=4$ and so $h=\frac{1}{4}$.

Is that correct? :unsure:
 
Yep. (Nod)
 
Klaas van Aarsen said:
Yep. (Nod)

Thank you! 🥳
 
I thought about that again and I have a question. Is this the only way, i.e. to use that formula with the fourth derivative? :unsure:
 
mathmari said:
I thought about that again and I have a question. Is this the only way, i.e. to use that formula with the fourth derivative?
An alternative is to apply Simpson's Rule with n=2, n=4, ... until the difference with the actual integral is less than the required error.
It means we need to evaluate the actual integral somehow, perhaps with a numerical program. 🤔

Yet another alternative is to apply Simpson's Rule with n=2, n=4, ... until the difference with the previous iteration is less than the required error.
This is how most algorithms work, although it's strictly speaking not a full-proof method. 🤔
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K