Understanding Example of Simpson's Rule

586 Views Asked by At

enter image description here

Using figure 8, let $x_0 = -h, x_1=0, x_2=h$

So the area under the curve is exemplified below: $$\int_{-h}^h(Ax^2+Bx+C)dx=2\int_0^h(Ax^2+C)dx$$ $$=2\left[A\frac{x^3}{3}+Cx\right]_0^h$$ $$=2\left(A\frac{h^3}{3}+Ch\right)=\frac{h}{3}(2Ah^2+6C)$$

But since the parabola passes through $P_0(-h,y_0),P_0(0,y_1),$ and $P_2(h,y_2)$, we have $$y_0=A(-h)^2+B(-h)+c=AH^2-Bh+C$$ $$y_1=C$$ $$y_2=Ah^2+Bh+C$$

and therefore $y_0+4y_1+y_2 = 2Ah^2+6C$

Where does the $4y_1$ come from?

2

There are 2 best solutions below

0
On BEST ANSWER

The rule needs to be accurate for all values of $A,B,C$. It is to make the part proportional to $C$ come out right. We solve for the coefficients $a,b,c$ that will make $ay_0+by_1+cy_2=\frac h3(2Ah^2+6C)$. This gives $$a(Ah^2-Bh+C)+b(C)+c(Ah^2+Bh+C)=\frac h3(2Ah^2+6C)$$ Separating out the terms proportional to $A,B,C$ and solving gives $$a=\frac {h}3\\b=\frac {4h}3\\c=\frac h3$$ To have a constant function come out right the sum of the coefficients needs to be the length of the interval.

2
On

Use the formula $\triangle$ $x/2$ $[f(X0)+f(X1)+f(X2)+f(X3)+f(X4)+.........f(Xn)]$

where Xi = a+i$\triangle $$x$

Hope this helps..