find coefficients of a numerical integration formula

249 Views Asked by At

we have this formula for calculating integral $\int_{0}^{h} xf(x) dx = (h)^2 [A_0 f(0) + A_1f(h) + A_2f(2h)] + R \\$
the goal is to find $A_0,A_1, A_2$ and $R$, when $f^{\prime\prime\prime}$ is constant.

I tried to get to this formula by taking integral of Taylor Expansion of $xf(x)$ but it didn't work, or I messed up in it.

1

There are 1 best solutions below

2
On BEST ANSWER

The third derivative $f$ being constant means that $f$ is a cubic, so let $f(x)=ax^3+b^2x+cx+d$. Plug that into your equation. The result needs to be true for all $a,b,c,d$. You will get simultaneous equations for $A_0,A_1,A_2$. Note that $f(x)=0$ tells us that $R=0$. It will fail because you have four equations in three unknowns.