Skip to main content
Physics LibreTexts

2.11: Gaussian Triple Integral Algorithm

  • Page ID
    8728
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    To approximate the integral

    \[I=\int_{a}^{b} \int_{c}^{d} \int_{e}^{f} F(x, y, z) d z d y d x\]

    where it is assumed that the roots R and coefficients C are stored in two-dimensional arrays.

    BEGIN

    h1 = (b – a)/2

    h2 = (b + a)/2

    I = 0

    FOR i = 1, 2,..., m DO

    Ix = 0

    x = h1*R[m][i] + h2

    k1 = (d – c)/2

    k2 = (d + c)/2

    FOR j = 1, 2,..., n DO

    Iy = 0

    y = k1*R[n][i] + k2

    l1 = (f – e)/2

    l2 = (f + e)/2

    FOR k = 1, 2,..., p DO

    z = l1*R[p][k] + l2

    Iy = Iy + C[p][k]*F(x, y, z)

    END FOR { k-loop }

    Ix = Ix + C[n][j]*l1*Iy

    END FOR { j-loop }

    I = I + C[m][i]*k1*Ix

    END FOR { i-loop }

    I = h1*I

    PRINT I

    END

    This algorithm may be generalised further by allowing limits e and f to be functions e(x,y) and f(x,y) and c and d to be functions c(x) and d(x). For our purposes the limits of integration are fixed values.

    Applying this algorithm to equation (28) for the Bond albedo and identifying μ with x, we see that

    \[\frac{A}{2}=\int_{0}^{1} \int_{0}^{2 \pi} \int_{0}^{1} \times f_{r}(x, \mu, \alpha ; \ldots) \mu d \mu d \phi d x\]

    and by further identifying z with μ and y with φ

    \[\mathrm{F}(\mathrm{x}, \mathrm{y}, \mathrm{z})=2 \mathrm{x} \mathrm{z} f_{r}(\mathrm{x}, \mathrm{z}, \alpha ; \ldots)\]

    where a is itself a function of x,y and z [cf. equation (26)]

    \[\alpha=\cos ^{-1}\left[\mathrm{xz}+\sqrt{\left(1-\mathrm{x}^{2}\right)\left(1-\mathrm{z}^{2}\right)} \cos \mathrm{y}\right].\]

    For the phase integral, there is no need to invoke the likes of equation (32) since the intensity I(α) is explicitly expressed in terms of α and one stage of the integration is with respect to α. The parameters, … , are, of course, not variables since they retain their values for the duration of the integration.

    When applying these integrals it is strongly suggested that A, p and q each be calculated independently in order to verify that the relationship A = p q holds. Taking shortcuts may bury insidious bugs, some possibly as simple as a typo., inside a program and result in at least two undetected erroneous results.


    This page titled 2.11: Gaussian Triple Integral Algorithm is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Max Fairbairn & Jeremy Tatum via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.