Simpson’s rule

Simpson’s rule is a numerical method that uses quadratic functions to approximate definite integrals.

With reference to the diagram above, \(\int_{-h}^hf(x)dx\) is the area under the cubic curve demarcated by two equal intervals, each of magnitude h. The area is estimated using 3 points on the quadratic function \(P(x)=Ax^2+Bx+C\), where

\(\int_{-h}^hf(x)dx\approx \int_{-h}^hP(x)dx=\frac{h}{3}(2Ah^2+6C)\;\;\;\;\;\;\;\;(23)\)

Substituting \(P(0)=y_1\), \(P(-h)=y_0\) and \(P(h)=y_2\) into \(P(x)\) gives \(C=y_1\),\(Ah^2-Bh+C=y_0\) and \(Ah^2+Bh+C=y_2\). Combining the last two equations gives \(2Ah^2+2C=y_0+y_2\). Substituting this equation and \(C=y_1\) into eq23 yields

\(\int_{-h}^hf(x)dx\approx\frac{h}{3}(y_0+4y_1+y_2)\)

Similarly, if we consider the domain from h to h‘ (see above diagram),

\(\int_{h}^{h^{\prime}}f(x)dx\approx\frac{h}{3}(y_2+4y_3+y_4)\)

Therefore, using 5 points on \(f(x)\) results in:

\(\int_{-h}^{h^{\prime}}f(x)dx\approx\frac{h}{3}(y_0+4y_1+2y_2+4y_3+y_4)\)

Extending the logic for n points on \(f(x)\),

\(\int_{a}^{b}f(x)dx\approx\frac{h}{3}\{f(a)+4[f(x_1)+f(x_3)+\cdots+f(x_{n-1})]\)
\(+2[f(x_2)+f(x_4)+\cdots+f(x_{n-2})]+f(b)\}\;\;\;\;\;\;\;\;(24)\)

where \(a=x_0\) and \(b=x_n\).

This implies that there must be an even number of equal intervals for the rule to work, i.e. n must be odd.

 

Question

Evaluate
$$DI=\int_0^\infty\phi_i(x_i)\left(\int_0^\infty f(x_i,x_j)dx_j\right)\phi_i(x_i)dx_i$$

Answer

Substituting eq24 into the above equation yields:

\(DI=\int_0^{\infty}\phi_i^2(x_i)\frac{h}{3}\{f(x_i,x_0)+4[f(x_i,x_1)+f(x_i,x_3)+\cdots+f(x_i,x_{\infty-1})]\) \(+2[f(x_i,x_2)+f(x_i,x_4)+\cdots+f(x_i,x_{\infty-2})]+f(x_i,x_{\infty})\}dx_i\)

So,

\(DI=\frac{h}{3}[A+B+C+\cdots+D]\;\;\;\;\;\;\;\;(25)\)

where (form 1)

\(A=\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_0)dx_i=\frac{h}{3}[\phi_0^2(x_0)f(x_0,x_0)+4\phi_1^2(x_1)f(x_1,x_0)\) \(+2\phi_2^2(x_2)f(x_2,x_0)+\cdots+\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_0)]\)

\(B=4\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_1)dx_i=\frac{4h}{3}[\phi_0^2(x_0)f(x_0,x_1)+4\phi_1^2(x_1)f(x_1,x_1)\) \(+2\phi_2^2(x_2)f(x_2,x_1)+\cdots+\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_1)]\)

\(C=2\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_2)dx_i=\frac{2h}{3}[\phi_0^2(x_0)f(x_0,x_2)+4\phi_1^2(x_1)f(x_1,x_2)\) \(+2\phi_2^2(x_2)f(x_2,x_2)+\cdots+\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_2)]\)

\(D=\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_{\infty})dx_i=\frac{h}{3}[\phi_0^2(x_0)f(x_0,x_{\infty})+4\phi_1^2(x_1)f(x_1,x_{\infty})\) \(+2\phi_2^2(x_2)f(x_2,x_{\infty})+\cdots+\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_{\infty})]\)

or equivalently (form 2),

\(A=\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_0)dx_i=\frac{h}{3}[\phi_0^2(x_0)f(x_0,x_0)+4\phi_0^2(x_0)f(x_0,x_1)\) \(+2\phi_0^2(x_0)f(x_0,x_2)+\cdots+\phi_0^2(x_0)f(x_0,x_{\infty})]\)

\(B=4\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_1)dx_i=\frac{4h}{3}[\phi_1^2(x_1)f(x_1,x_0)+4\phi_1^2(x_1)f(x_1,x_1)\) \(+2\phi_1^2(x_1)f(x_1,x_2)+\cdots+\phi_1^2(x_1)f(x_1,x_{\infty}]\)

\(C=2\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_2)dx_i=\frac{2h}{3}[\phi_2^2(x_2)f(x_2,x_0)+4\phi_2^2(x_2)f(x_2,x_1)\) \(+2\phi_2^2(x_2)f(x_2,x_2)+\cdots+\phi_2^2(x_2)f(x_2,x_{\infty})]\)

\(D=\int_0^{\infty}\phi_i^2(x_i)f(x_i,x_{\infty})dx_i=\frac{h}{3}[\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_0)+4\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_1)\)\(+2\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_2)+\cdots+\phi_{\infty}^2(x_{\infty})f(x_{\infty},x_{\infty})]\)

These integrals are useful for computing the numerical solution of the Hartree self-consistent field method for helium.

 

Next article: Slater-type orbitals
Previous article: Proof of the Hartree equations
Content page of computational chemistry
Content page of advanced chemistry
Main content page

Leave a Reply

Your email address will not be published. Required fields are marked *

Mono Quiz