Exercise: double integral with Gauss-Legendre

Transforming a rectangle to [-1,1]×[-1,1] and solving a double integral with n=m=3.

Product of weights

ExampleIntegral of ln(x+2y)

Compute ∫_{1.4}^{2}∫_{1}^{1.5} ln(x+2y) dy dx with Gauss-Legendre and n=m=3.

  1. The changes of variables are:

    x=0.3u+1.7,y=0.25v+1.25x=0.3u+1.7,\qquad y=0.25v+1.25
  2. The product of Jacobians is 0.30.25=0.0750.3\cdot 0.25=0.075:

    I=0.0751111ln(0.3u+0.5v+4.2)dvduI=0.075\int_{-1}^{1}\int_{-1}^{1}\ln(0.3u+0.5v+4.2)\,dv\,du
  3. With nodes 0, ±0.774597 and weights 0.888889, 0.555556, 0.555556:

    I0.075i=13j=13cicjln(0.3ui+0.5vj+4.2)I\approx0.075\sum_{i=1}^{3}\sum_{j=1}^{3}c_i c_j\ln(0.3u_i+0.5v_j+4.2)

The numerical result is 0.429554959579526.

I=0.429554959579526I=0.429554959579526