0
$\begingroup$

I know that a definite integral is a limit of Riemann sums. So if one wanted to estimate a definite integral (because one might not be able to find an antiderivative), then one can just take enough subintervals.

I have recently learnt that one can also write the function considered as a power series (Taylor series or Maclaurin series). Then it is easy to find an antiderivative power series that one can then use to estimate the definite integral.

My question is: Which of these two methods is in general fastest?

As an example I considered $f(x) = x^3\arctan(x)$ and the integral $$ \int_0^{1/2} f(x) dx. $$ I get that $$ \int_0^{1/2} f(x) dx = \sum_{n=0}^{\infty} (-1)^n\frac{(1/2)^{2n+5}}{(2n+1)(2n+5)}. $$ The first three terms alone give an estimate of $0.0059$.

Using three left rectangles, I get $0.1211$ and the real answer is $0.00591592$. It looks like it is faster to use the Taylor series approach. Is this in general true?

$\endgroup$
2
  • $\begingroup$ Not sure many people know the answer, as definite integrals are computed numerically with well-established methods like Simpson, Romberg or Gaussian quadrature. $\endgroup$
    – user65203
    Apr 20, 2015 at 17:09
  • $\begingroup$ en.wikipedia.org/wiki/Numerical_integration is a well established area of numerical analysis. I suggest you start there. $\endgroup$ Apr 20, 2015 at 18:21

2 Answers 2

1
$\begingroup$

Taylor series don't always converge. The Taylor series method can be very good if the interval of integration is inside the radius of convergence of the series, otherwise it may not converge at all.

But as Yves Daoust mentioned, you should be comparing this to more sophisticated numerical methods, not to Riemann sums. In practice, Riemann sums are almost never used for numerical integration.

$\endgroup$
1
  • $\begingroup$ Thanks. I only know calculus. So I was just wondering how the two methods above might be compared. I am not trying to actually compute anything, just curious. $\endgroup$
    – John Doe
    Apr 20, 2015 at 18:43
-3
$\begingroup$

Take a look at the wiki page for Monte-Carlo Integration:

http://en.wikipedia.org/wiki/Monte_Carlo_integration

This is how mathematica and other systems approximate definite integrals.

And it's devilishly clever.

$\endgroup$
7
  • 2
    $\begingroup$ Certainly not for 1D integrals, Monte-Carlo is way too inaccurate. $\endgroup$
    – user65203
    Apr 20, 2015 at 17:15
  • $\begingroup$ @YvesDaoust What are you talking about? It is exactly used for one-dimensional integrals. You shouldn't neg somebody if you don't know what you are talking about. $\endgroup$ Apr 20, 2015 at 17:18
  • $\begingroup$ I feel sorry for you. en.wikipedia.org/wiki/… $\endgroup$
    – user65203
    Apr 20, 2015 at 17:22
  • 1
    $\begingroup$ Mathematica's standard methods for 1D integrals do not use Monte Carlo. They use numerical techniques that are much more accurate for smooth functions. The reference you gave shows how to compute a Monte Carlo approximation in Mathematica and compare the result to a much more accurate value obtained without Monte Carlo. $\endgroup$ Apr 20, 2015 at 17:51
  • 2
    $\begingroup$ @GregoryGrant: do take a course in numerical methods. $\endgroup$
    – user65203
    Apr 20, 2015 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .