Calculus · real student question

Evaluate the double integral of the absolute value of (xy - 1/4) over the unit square 0 <= x <= 1, 0 <= y <= 1.

Question

Evaluate

I=0101xy14dxdyI=\int_0^1\int_0^1\left|xy-\frac14\right|\,dx\,dy

Step-by-step solution

  1. Locate the curve where the absolute value switches sign. The integrand changes sign exactly on xy=14xy=\tfrac14, i.e. y=14xy=\dfrac{1}{4x}. Inside the unit square this branch is only visible when 14x1\dfrac{1}{4x}\le1, that is when x14x\ge\tfrac14. For x<14x<\tfrac14 the whole vertical slice satisfies xyx<14xy\le x<\tfrac14, so no split is needed there.

  2. Handle the easy strip 0x140\le x\le\tfrac14. Here xy14=14xy\left|xy-\tfrac14\right|=\tfrac14-xy, so

    01(14xy)dy=14x2\int_0^1\left(\frac14-xy\right)dy=\frac14-\frac{x}{2}

    I1=01/4(14x2)dx=116164=364I_1=\int_0^{1/4}\left(\frac14-\frac{x}{2}\right)dx=\frac{1}{16}-\frac{1}{64}=\frac{3}{64}

  3. Split each slice for 14x1\tfrac14\le x\le1 at a=14xa=\dfrac{1}{4x}. Below aa the integrand is 14xy\tfrac14-xy, above it is xy14xy-\tfrac14. Using a4=116x\dfrac{a}{4}=\dfrac{1}{16x} and xa22=132x\dfrac{xa^2}{2}=\dfrac{1}{32x}, the two pieces are 132x\dfrac{1}{32x} and x214+132x\dfrac{x}{2}-\dfrac14+\dfrac{1}{32x}, so each slice contributes

    x214+116x\frac{x}{2}-\frac14+\frac{1}{16x}

  4. Integrate the slice contribution over xx.

    I2=1/41(x214+116x)dx=1564316+ln416=364+ln416I_2=\int_{1/4}^{1}\left(\frac{x}{2}-\frac14+\frac{1}{16x}\right)dx=\frac{15}{64}-\frac{3}{16}+\frac{\ln4}{16}=\frac{3}{64}+\frac{\ln4}{16}

    The 116x\dfrac{1}{16x} term is the sole source of the logarithm — it is the signature of integrating across a hyperbolic boundary.

  5. Add the pieces and verify numerically.

    I=364+364+ln416=332+ln28I=\frac{3}{64}+\frac{3}{64}+\frac{\ln4}{16}=\frac{3}{32}+\frac{\ln2}{8}

    Numerically this is 0.09375+0.0866434=0.18039339760.09375+0.0866434=0.1803933976. A 3000×30003000\times3000 midpoint grid over the unit square gives 0.18039338890.1803933889 — agreement to seven decimal places, the expected accuracy for a grid method on a kinked integrand ✓.

Answer

332+ln280.1803934\frac{3}{32}+\frac{\ln 2}{8}\approx0.1803934

Need to solve a different problem like this? Open the solver →