Multivariable calculus

Double Integral of xy e^(-x^2) Over [0,1] by [0,2]

The double integral of x times y times e to the minus x squared, over x from 0 to 1 and y from 0 to 2, equals 1 minus 1 over e, about 0.63212. The integrand factors, and the x integral is the substitution u = x squared whose du the loose x supplies, giving half of 1 minus 1 over e, times 2.

f(x,y)=xyex2f(x,y) = xy\,e^{-x^2}
0102xyex2dydx=11e0.63212\int_{0}^{1}\int_{0}^{2} xy\,e^{-x^2}\,dy\,dx = 1 - \frac{1}{e} \approx 0.63212

Numerically 0.632121, confirmed by quadrature on every build.

Factor, then substitute in x

The integrand is (xex2)\left(x e^{-x^2}\right) times yy, so it factors, and the interesting half is the xx integral.

0102xyex2dydx=(01xex2dx)(02ydy)\int_{0}^{1}\int_{0}^{2} xy\,e^{-x^2}\,dy\,dx = \left(\int_{0}^{1} x e^{-x^2}\,dx\right)\left(\int_{0}^{2} y\,dy\right)

Substitute u=x2u = x^2, so du=2xdxdu = 2x\,dx and xdx=du2x\,dx = \frac{du}{2}. The limits move from x=0,1x = 0, 1 to u=0,1u = 0, 1.

01xex2dx=1201eudu=12(11e)\int_{0}^{1} x e^{-x^2}\,dx = \frac{1}{2}\int_{0}^{1} e^{-u}\,du = \frac{1}{2}\left(1 - \frac{1}{e}\right)
[12(11e)](2)=11e0.63212\left[\frac{1}{2}\left(1 - \frac{1}{e}\right)\right](2) = 1 - \frac{1}{e} \approx 0.63212

The iterated version, if you prefer to see the layers

Freeze xx. Everything except yy is a constant multiplier, so the inner integral is a one line power rule.

02xyex2dy=xex2[y22]02=2xex2\int_{0}^{2} xy\,e^{-x^2}\,dy = x e^{-x^2}\left[\frac{y^2}{2}\right]_{0}^{2} = 2x e^{-x^2}
012xex2dx=[ex2]01=11e\int_{0}^{1} 2x e^{-x^2}\,dx = \left[-e^{-x^2}\right]_{0}^{1} = 1 - \frac{1}{e}

The factor 2 from the yy integral is exactly what the substitution wanted, so the outer antiderivative comes out with no fractions at all.

The mistake: assuming e to the minus x squared can be integrated on its own

The loose xx is doing all the work. Remove it and 01ex2dx\int_{0}^{1} e^{-x^2}\,dx has no elementary antiderivative at all: it is the error function, and no substitution will produce one.

  • xex2dx=12ex2\int x e^{-x^2}\,dx = -\frac{1}{2}e^{-x^2}, because xdxx\,dx is half of d(x2)d\left(x^2\right).
  • ex2dx\int e^{-x^2}\,dx is not elementary, so a problem that asks for it in closed form has a typo.
  • Writing ex22x-\frac{e^{-x^2}}{2x} is the other frequent slip: differentiate it and the product rule leaves an extra term.

Check the size before you move on. On this rectangle the integrand peaks at about 0.858, at x=12x = \frac{1}{\sqrt{2}} and y=2y = 2, and the area is 2, so the answer must sit between 0 and about 1.72. The value 0.632 fits.

Frequently asked questions

Why does the substitution need the x in front?

Because u=x2u = x^2 forces du=2xdxdu = 2x\,dx. The integrand must supply that xx, or the substitution leaves a leftover 1x\frac{1}{x} that cannot be written in terms of uu. That is the difference between an easy integral and a non-elementary one.

What is the value if y runs only from 0 to 1?

The yy integral becomes 12\frac{1}{2} instead of 2, so the answer is 14(11e)0.158\frac{1}{4}\left(1 - \frac{1}{e}\right) \approx 0.158. Shrinking one side scales the whole answer by the ratio of the two yy integrals.