2
$\begingroup$

Please help me to solve this problem... enter image description here

By the method of undetermined coefficients I found $a=c=1/6$ and $b=2/3$ and $\alpha=\gamma=2/3$ and $\beta=-1/3$. Also that both are exact for polynomials of degree $\leq 3$. But I cannot figure out which one is better.

Thank you.

$\endgroup$
2
  • $\begingroup$ I believe you are expected to find the error for a fourth degree polynomial. The multiplier is different for the two cases. The "better" one is the one with a lower multiplier. This is not a blanket recommendation-you can find functions where each one is more accurate than the other. $\endgroup$ Mar 17 '15 at 23:30
  • $\begingroup$ Please see this tutorial on how to format mathematics on this site. $\endgroup$ Mar 17 '15 at 23:35
1
$\begingroup$

Considering function $f(x)$ to be integrated between $a$ and $b$, let me set $f_i=f(x_i)$ where $x_i=a+(b-a)\frac in$ where $n$ is the degree. We shall consider $n=3$ which is your problem.

Closed Newton-Cotes formula is $$\int_a^b f(x)\,dx\approx \frac{b-a}{6}\,(f_0+4f_1+f_2)$$ and the error is $-\frac{(b-a)^5}{2880}f^{(4)}(\xi)$.

Open Newton-Cotes formula is $$\int_a^b f(x)\,dx\approx \frac{b-a}{3}\,(2f_1-f_2+2f_3)$$ and the error is $\frac{7(b-a)^5}{23040}f^{(4)}(\xi)$.

As you can see, assuming similar $\xi$'s, the errors are in a ratio of $7:8$ slightly favouring the open form (just as Rory Daulton answered).

$\endgroup$
3
0
$\begingroup$

"Better" is vague here. I tested both approximations using $f(x)=x^4$, and the approximation errors I got were:

  • about $0.00833$ for the first (out of $0.2$),
  • about $0.00729$ for the second (out of $0.2$).

So, for this example, the second was slightly "better" in terms of error. However, other examples may give different results.

Another way the second is better is that it can handle improper integrals, where the values of $f(x)$ are not defined at the endpoints $x=0$ and $x=1$. For example, the second could approximate

$$\int_0^1 \frac 1{\sqrt x}\,dx$$

to an error of about $0.36827$ (out of $2$), whereas the first could not give any approximation at all.

I therefore conclude that the second approximation formula is "better."

$\endgroup$

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.