Multivariable calculus

Double Integral of e^(y^2) Over a Triangle

The double integral of e^(y^2) over the triangle with 0 <= x <= y and 0 <= y <= 1 equals (e - 1)/2, about 0.859141. Integrating in x first is the only workable order: it produces y e^(y^2), whose antiderivative is e^(y^2)/2. The other order has no elementary inner integral.

f(x,y)=ey2f(x,y) = e^{y^2}
∫01∫0yey2 dx dy=e−12\int_0^1 \int_0^{y} e^{y^2}\,dx\,dy = \frac{e-1}{2}

Numerically 0.859141, confirmed by quadrature on every build.

Reverse the order, because e^(y^2) has no elementary antiderivative

Written as a type 1 region the triangle is 0≤x≤10 \le x \le 1 with x≤y≤1x \le y \le 1, giving ∫01∫x1ey2 dy dx\int_0^1\int_x^1 e^{y^2}\,dy\,dx. The inner integral is a dead end: ey2e^{y^2} has no antiderivative among the elementary functions, which is exactly why this problem is set.

Describe the same triangle as type 2 instead. For each yy in [0,1][0,1] the horizontal slice runs from x=0x = 0 to x=yx = y.

∫01∫0yey2 dx dy=∫01ey2[x]x=0x=y dy=∫01y ey2 dy\int_0^1 \int_0^{y} e^{y^2}\,dx\,dy = \int_0^1 e^{y^2}\left[x\right]_{x=0}^{x=y}\,dy = \int_0^1 y\,e^{y^2}\,dy

The inner step manufactured a factor of yy, and that factor is precisely what the substitution u=y2u = y^2, du=2y dydu = 2y\,dy requires.

∫01y ey2 dy=[ey22]01=e−12\int_0^1 y\,e^{y^2}\,dy = \left[\frac{e^{y^2}}{2}\right]_0^1 = \frac{e-1}{2}

The mistake: swapping limits without redrawing the region

The mechanical swap turns ∫01∫x1ey2 dy dx\int_0^1\int_x^1 e^{y^2}\,dy\,dx into ∫x1∫01ey2 dx dy\int_x^1\int_0^1 e^{y^2}\,dx\,dy, which is meaningless since outer limits can never contain a variable. The panicked version, ∫01∫01\int_0^1\int_0^1, integrates over the whole unit square and gives a different number.

Reversing the order means re-describing the region, and a sketch is the only reliable route. This triangle has vertices (0,0)(0,0), (0,1)(0,1) and (1,1)(1,1). Read by columns it is x≤y≤1x \le y \le 1; read by rows it is 0≤x≤y0 \le x \le y.

  • Outer limits are always numbers.
  • Inner limits are the two boundaries you meet crossing the region in the inner variable's direction.
  • Check a corner: at y=1y = 1 the row runs from x=0x = 0 to x=1x = 1, the full top edge of the triangle.

A second slip is claiming ey22y\frac{e^{y^2}}{2y} as an antiderivative of ey2e^{y^2}. Differentiating it returns ey2−ey22y2e^{y^2} - \frac{e^{y^2}}{2y^2}, which is not the integrand. Chain rule factors cannot be divided out after the fact.

Why (e-1)/2 is the right size

On this triangle ey2e^{y^2} runs from 11 up to e≈2.718e \approx 2.718, and the triangle has area 12\frac12. So the answer had to land between 12\frac12 and e2≈1.359\frac{e}{2} \approx 1.359.

It lands at 0.8591410.859141. Dividing by the area gives the average value e−1≈1.718e - 1 \approx 1.718, comfortably between the minimum 11 and the maximum ee, as it must be for a continuous function on a connected region.

Frequently asked questions

Is there really no antiderivative for e^(y^2)?

Not among elementary functions. Liouville's theorem settles it: no finite combination of powers, exponentials, logarithms and trigonometric functions differentiates to ey2e^{y^2}. The related ∫e−y2 dy\int e^{-y^2}\,dy is written with the error function for the same reason.

How do I spot an order-reversal problem?

The inner integral has no closed form while the integrand depends on only one variable. Reversing puts that variable on the outside, and the inner step contributes a factor of the other variable, which is usually the missing piece a substitution needs. The classic three are ey2e^{y^2}, sin⁡ ⁣(y2)\sin\!\left(y^2\right) and sin⁡yy\frac{\sin y}{y}.