Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

NIntegrate - Gaussian quadrature more exact than thought

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73833] [mg73833] NIntegrate - Gaussian quadrature more exact than thought
  • From: "janos" <janostothmeister at gmail.com>
  • Date: Fri, 2 Mar 2007 06:16:25 -0500 (EST)

NIntegrate[x^4, {x, 0, 1}, Method->GaussKronrod, GaussPoints->2]

gives 0.2, the exact result, although the Gauss quadrature should be
inexact on a polynomial of degree 2n+2 where n is the number of
GaussPoints. More exactly, we expected the same results as here:

<< NumericalMath`GaussianQuadrature`
gw = GaussianQuadratureWeights[2, 0, 1]
f[{x_, y_}] := x^4 y
Total[f /@ gw]
0.194444

This is inexact, OK.

Why is NIntegrate so good?
Something I may have missed.

Thank you for your help.

Janos



  • Prev by Date: change filename automatically in Export Command
  • Next by Date: Problems with simplify and Sqrt[a^2]
  • Previous by thread: NIntegrate - Gaussian quadrature more exact than thought
  • Next by thread: Re: NIntegrate - Gaussian quadrature more exact than thought