Multivariable calculus
Double Integral of x/(1+y^2) Over a Triangle
The double integral of x/(1 + y^2) over the triangle with vertices (0,0), (2,0) and (2,1) equals pi - 2, about 1.141593. Integrating in y first gives x arctan(x/2), which then needs integration by parts. Integrating in x first is much shorter.
Numerically 1.141593, confirmed by quadrature on every build.
The inner integral is an arctangent
The slanted edge joins to , so it is the line . For fixed in the vertical slice runs from to , and is a constant throughout that step.
The outer integral needs parts, with and . The derivative you need is .
The mistake: reaching for a logarithm
During the inner step the whole factor is a constant and comes straight out. The wrong move is to see a quotient, assume a logarithm, and write .
These are two different integrals, and the difference is what sits in the numerator.
- Numerator constant in : .
- Numerator proportional to : .
- Both present: split the fraction into two integrals first.
The second common error is the upper limit. The hypotenuse joins to , so it is , not . Using the wrong line turns into and changes the answer completely.
Integrating in x first is easier
As a type 2 region the same triangle is with running from the hypotenuse across to . Now the integral is a power rule and the leftover integral is standard.
No integration by parts at all. When a region is both type 1 and type 2, spend ten seconds choosing the order before you spend ten minutes integrating.
Frequently asked questions
How do I know the hypotenuse is y = x/2?
Two vertices determine it. Through and the slope is , and the line passes through the origin, so . The third vertex lies below it, confirming the region sits between and that line.
Why does pi appear in the answer at all?
It comes from the arctangent. The upper limit makes , and that value enters twice in the final assembly, once from the boundary term of the parts formula and once from the leftover integral.