Multivariable calculus

Double Integral of 1/(x + y) Over the Square [1,2]

The double integral of 1 over x plus y, over the square from 1 to 2 in both variables, equals 10 ln 2 minus 6 ln 3, about 0.33980. The inner integral gives ln(x + 2) minus ln(x + 1), and integrating a logarithm needs the antiderivative u ln u minus u.

f(x,y)=1x+yf(x,y) = \frac{1}{x + y}
12121x+ydydx=10ln26ln30.33980\int_{1}^{2}\int_{1}^{2} \frac{1}{x+y}\,dy\,dx = 10\ln 2 - 6\ln 3 \approx 0.33980

Numerically 0.339798, confirmed by quadrature on every build.

The inner integral is a logarithm, and then you integrate that

Freeze xx. The inner integrand is 1x+y\frac{1}{x+y} with y(x+y)=1\frac{\partial}{\partial y}(x+y) = 1, so the antiderivative is ln(x+y)\ln(x+y) with no correcting factor.

121x+ydy=[ln(x+y)]y=1y=2=ln(x+2)ln(x+1)\int_{1}^{2} \frac{1}{x+y}\,dy = \left[\ln(x+y)\right]_{y=1}^{y=2} = \ln(x+2) - \ln(x+1)

Now you have to integrate logarithms, which takes the by-parts result lnudu=ulnuu\int \ln u\,du = u\ln u - u with u=x+2u = x+2 and then u=x+1u = x+1.

12ln(x+2)dx=[(x+2)ln(x+2)(x+2)]12=8ln23ln31\int_{1}^{2} \ln(x+2)\,dx = \left[(x+2)\ln(x+2) - (x+2)\right]_{1}^{2} = 8\ln 2 - 3\ln 3 - 1
12ln(x+1)dx=[(x+1)ln(x+1)(x+1)]12=3ln32ln21\int_{1}^{2} \ln(x+1)\,dx = \left[(x+1)\ln(x+1) - (x+1)\right]_{1}^{2} = 3\ln 3 - 2\ln 2 - 1
(8ln23ln31)(3ln32ln21)=10ln26ln3=ln1024729\left(8\ln 2 - 3\ln 3 - 1\right) - \left(3\ln 3 - 2\ln 2 - 1\right) = 10\ln 2 - 6\ln 3 = \ln\frac{1024}{729}

Where this integrand is undefined, and why the region is safe

1x+y\frac{1}{x+y} blows up along the entire line x+y=0x + y = 0. That line runs through the third quadrant, while this square sits in the first with x+yx + y between 2 and 4, so the integrand is continuous and bounded on the region and no absolute value is needed inside the logarithm.

Those bounds give a free check. On the square 141x+y12\frac{1}{4} \le \frac{1}{x+y} \le \frac{1}{2} and the area is 1, so the answer must lie between 0.25 and 0.5. It does, at 0.33980.

Move the square to [0,1][0,1] in both variables and the corner at the origin lands on the bad line. The integral is then improper, though it still converges, to 2ln21.3862\ln 2 \approx 1.386.

The mistake: splitting the fraction

This integrand invites 1x+y=1x+1y\frac{1}{x+y} = \frac{1}{x} + \frac{1}{y}, which is false. That split gives ln2+ln2=2ln21.386\ln 2 + \ln 2 = 2\ln 2 \approx 1.386, about four times the true value, and the bound from the previous section rejects it immediately. That it repeats the 1.386 from the shifted square above is a coincidence between two unrelated calculations, and a reminder that a familiar decimal is not a verification.

  • 1x+y\frac{1}{x+y} is not 1x+1y\frac{1}{x} + \frac{1}{y}, and it is not 1x1y\frac{1}{x}\cdot\frac{1}{y} either, so no shortcut applies.
  • 1x+ydy=ln(x+y)\int \frac{1}{x+y}\,dy = \ln(x+y), never ln(x+y)x+y\frac{\ln(x+y)}{x+y}.
  • Combining the inner answer as lnx+2x+1\ln\frac{x+2}{x+1} is legal but does not help: you still integrate two logarithms.

Symmetry is the last check. Swapping xx and yy leaves the integrand and the square unchanged, so both orders of integration must give the same number, and they do.

Frequently asked questions

Can the answer be written more compactly?

Yes. 10ln26ln3=ln21036=ln10247290.3398010\ln 2 - 6\ln 3 = \ln\frac{2^{10}}{3^{6}} = \ln\frac{1024}{729} \approx 0.33980. The compact form is a good check that the coefficients 10 and 6 came out right.

Do I need absolute values inside the logarithm?

Not on this square. The antiderivative in general is lnx+y\ln\left|x+y\right|, but x+yx + y runs from 2 to 4 here, so it is positive throughout and the bars change nothing.