Why the quadrature formula is exact one not an approximation?

219 Views Asked by At

I am reading this material on the algorithm of calculating the centroid of a polyhedron.

I am confused by the last step of the deduction:

The three coordinates of the centroid can be obtained:

$$c\cdot e_k =\dfrac{1}{V}\int_{\partial P}\dfrac{1}{2}\left(x\cdot e_k\right)^2\left(n\cdot e_k\right)=\dfrac{1}{2V}\sum\limits_{i=0}^{N-1}\int_{A_i}\left(x\cdot e_k\right)^2\left(n_i\cdot e_k\right), k=1,2,3$$

It remains to compute that:

$$\int_{A_i}\left(x\cdot e_k\right)^2\left(n_i\cdot e_k\right)=\dfrac{1}{6}{\hat n}\cdot e_k\left(\left[\tfrac{1}{2}\left(a_i+b_i\right)\cdot e_k\right]^2+\left[\tfrac{1}{2}\left(b_i+c_i\right)\cdot e_k\right]^2+\left[\tfrac{1}{2}\left(c_i+a_i\right)\cdot e_k\right]^2\right)$$ where we have observed that the integrand is a quadratic function on $A_i$, so that the standard midpoint sampling quadrature formula for triangles yields the integral exactly.

I am confused: why it is an exact solution due to quadratic integrand?

Update

Per the comments below, my thoughts and confusions:

  1. if this is only a $1$-$D$ quadratic interpolation problem, then the formula should be like: $f(x)=a_1^2\cdot \tfrac{(x-b_1)(x-c_1)}{(a_1-b_1)(a_1-c_1)} +b_1^2\cdot \tfrac{(x-a_1)(x-c_1)}{(b_1-a_1)(b_1-c_1)}+ c_1^2\cdot \tfrac{(x-a_1)(x-b_1)}{(c_1-a_1)(c_1-b_1)}\equiv x^2$

  2. for multiple dimensional interpolation cases, there will be quadratic form like:

$$Q(x,y,z)=(x,y,z,1)\cdot \left[ \begin{array}{cccc} q_{1,1} & q_{1,2} & q_{1,3} & q_{1,4} \\ q_{2,1} & q_{2,2} & q_{2,3} & q_{2,4} \\ q_{3,1} & q_{3,2} & q_{3,3} & q_{3,4} \\ q_{4,1} & q_{4,2} & q_{4,3} & q_{4,4} \\ \end{array} \right]\cdot (x,y,z,1)^T$$ where $q_{i,j}=q_{j,i}$. Then for 3-$D$ interpolation there should be $\sum\limits_{n=1}^{3+1}n=\sum\limits_{n=1}^4n=10$ coefficients to be determined.

Either case to me seems unsolvable and does not lead to the conclusion desired.

What is wrong?

update 2

The area above and below the horizontal line passing through the function value of the midpoint cannot be cancelled out actually...

enter image description here

Mathematica code for reference:

Plot[x^2, {x, 0, 1}, PlotStyle -> Red, 
 Epilog -> {Dashed, Green, Thickness -> 0.0005, 
   Line[{{1, 0}, {1, 1}, {0, 1}}], Blue, Line[{{0, 1/4}, {1, 1/4}}]}, 
 Filling -> 0.25, FillingStyle -> Directive[Blue, Opacity[0.38]], 
 AxesStyle -> Arrowheads[.035], PlotRangePadding -> Scaled[.1], 
 AspectRatio -> 1, 
 AxesLabel -> (Style[#, 15, FontFamily -> "Times New Roman", Italic, 
      Bold] & /@ {"x", "y"})]