Introduction
On a rectangle, a double integral of an exponential or trigonometric function can often be evaluated by integrating with respect to one coordinate and then the other. The main care is to keep the fixed bounds and the dependence on each variable straight: a factor that is constant with respect to the inner variable still remains in the calculation.
Some integrands are products of a function of \(x\) and a function of \(y\). These can be treated especially efficiently: the double integral factors into two ordinary definite integrals. Other integrands are sums of such products, which can be handled term by term using linearity.
Rectangular bounds and iterated integrals
Let \(R=[a,b]\times[c,d]\), where \(a\le b\) and \(c\le d\). The rectangle has fixed \(x\)-bounds \(a\) and \(b\), and fixed \(y\)-bounds \(c\) and \(d\). If \(f\) is continuous on \(R\), Fubini’s theorem allows us to compute its double integral as either of the iterated integrals below:
Here \(dA\) denotes area. In the first order, integrate with respect to \(y\) first, treating \(x\) as fixed; then integrate the resulting expression with respect to \(x\). The bounds for the inner integral are constants because the domain is a rectangle.
Exponential and trigonometric functions are continuous, as are their finite sums and products. Thus, when an integrand is built from these functions on a closed bounded rectangle, it is continuous there and Fubini’s theorem applies.
Antiderivatives used in these integrals
The basic antiderivatives needed here follow from differentiating exponentials and trigonometric functions. For a nonzero constant \(k\), the relevant formulas include:
For example, differentiating \(e^{kx}/k\) gives \(e^{kx}\), while differentiating \(-\cos(kx)/k\) gives \(\sin(kx)\). Definite integrals are evaluated by substituting the upper and lower bounds into an antiderivative and subtracting the lower value from the upper value. In particular, the factor \(1/k\) matters whenever the argument is \(kx\).
Products that separate by coordinate
A particularly useful case is an integrand of the form \(f(x,y)=g(x)h(y)\), where \(g\) depends only on \(x\) and \(h\) depends only on \(y\). If \(g\) and \(h\) are continuous on their respective intervals, the double integral factors into the product of two one-variable integrals.
To see why the formula works, integrate with respect to \(y\) first. Since \(g(x)\) is constant during that inner integration, it can be taken outside. The remaining integral of \(h(y)\) is a number independent of \(x\), so it can also be taken outside the outer integral. The calculation is complete because the variables have been separated and each one-variable integral has fixed bounds.
This proof uses the constancy of \(g(x)\) with respect to \(y\), and the fact that the \(y\)-bounds \(c,d\) do not depend on \(x\). For a sum of separable products, linearity of the integral lets us apply the same reasoning to each term.
Worked Example: A product of an exponential and a cosine
Worked Example: A product of an exponential and a cosine
Evaluate \(\displaystyle \int_0^1\int_0^{\pi/3} e^{2x}\cos y\,dy\,dx\). The integrand separates as \(e^{2x}\cos y\), with one factor depending on each coordinate.
Integrate with respect to \(y\) first. Since \(e^{2x}\) is constant with respect to \(y\), take it outside the inner integral. An antiderivative of \(\cos y\) is \(\sin y\), so
Since an antiderivative of \(e^{2x}\) is \(e^{2x}/2\), the remaining integral is
Check the antiderivatives: \(\frac{d}{dy}\sin y=\cos y\), and \(\frac{d}{dx}(e^{2x}/2)=e^{2x}\). The boundary substitutions give \(\sin(\pi/3)-\sin(0)=\sqrt{3}/2\) and \((e^2-1)/2\). Their product is exactly \(\sqrt{3}(e^2-1)/4\), as also predicted by the product rule for separated integrands.
Evaluating sums one term at a time
Not every integrand is a single product \(g(x)h(y)\). If it is a sum of such products, integrate each term separately. This follows from linearity: the integral of a sum is the sum of the integrals, provided the terms are integrable. The inner calculation still needs to be accurate for every term, especially when a factor depends on the variable being integrated.
Worked Example: A sum of two separated terms
Worked Example: A sum of two separated terms
Evaluate \(\displaystyle \int_0^{\pi/2}\int_0^{\ln 2}\left(e^x\cos y+\frac12 e^y\sin(2x)\right)dy\,dx\). Both summands separate into a function of \(x\) times a function of \(y\).
Integrate the two terms with respect to \(y\). In the first term \(e^x\) is constant with respect to \(y\), but the integral of \(\cos y\) is \(\sin y\); its upper-bound value is \(\sin(\ln 2)\). In the second term \(\sin(2x)\) is constant with respect to \(y\), and an antiderivative of \(e^y\) is \(e^y\). Therefore,
Now evaluate each outer integral. An antiderivative of \(e^x\) is \(e^x\), and an antiderivative of \(\sin(2x)\) is \(-\cos(2x)/2\). Hence
For a check, \([\sin y]_0^{\ln 2}=\sin(\ln 2)-0\), while \([e^y]_0^{\ln 2}=2-1=1\). Also, \(\int_0^{\pi/2}\sin(2x)\,dx=1\), so the coefficient \(1/2\) contributes \(1/2\). Differentiating the antiderivatives used above returns \(e^x\) and \(\sin(2x)\), respectively. Thus the result is \((e^{\pi/2}-1)\sin(\ln 2)+1/2\).
Worked Example: Reversing which coordinate is integrated first
Worked Example: Reversing which coordinate is integrated first
Evaluate \(\displaystyle \int_0^{\ln 3}\int_0^{\pi/6}\sin(3x)e^{2y}\,dx\,dy\). Here \(x\) is integrated first. Because the rectangle has constant bounds, the result can also be obtained by factoring the two one-variable integrals.
For the inner integral, \(e^{2y}\) is constant with respect to \(x\). An antiderivative of \(\sin(3x)\) is \(-\cos(3x)/3\). Thus
An antiderivative of \(e^{2y}\) is \(e^{2y}/2\), so
Check the substitutions: \(\cos(\pi/2)=0\), \(\cos 0=1\), and \(e^{2\ln 3}=9\). Differentiating \(-\cos(3x)/3\) gives \(\sin(3x)\), and differentiating \(e^{2y}/2\) gives \(e^{2y}\). The result agrees with the separated product \(\left(\int_0^{\pi/6}\sin(3x)\,dx\right)\left(\int_0^{\ln 3}e^{2y}\,dy\right)=(1/3)(4)=4/3\).
A common mistake: evaluating the wrong inner antiderivative
A frequent error is to replace an inner definite integral by a familiar-looking constant without evaluating its antiderivative at the actual bounds. For example, on \(0\le y\le\ln 2\), the integral of \(\cos y\) is not \(1\): the antiderivative is \(\sin y\), so the boundary difference is \(\sin(\ln 2)-\sin 0=\sin(\ln 2)\).
Replacing this factor by \(1\) changes the value of every outer integral that contains it. The correction is not to alter the outer integration; it is to compute the inner antiderivative and substitute both of its bounds before proceeding. Similarly, when integrating \(e^{2x}\) or \(\sin(2x)\), retain the factor \(1/2\) required by the chain rule.
A reliable calculation process
For these integrands, a short sequence of checks helps prevent errors while keeping the calculation organized.
Read off the constant bounds and note which variable is integrated first.
Keep any such factor if it depends on the outer variable.
Use an antiderivative appropriate to the actual argument, including any constant chain-rule factor.
Only after the inner integral is complete should the remaining variable be integrated.
Differentiate the antiderivatives and verify each upper-minus-lower substitution.
Why the separation rule is useful
When a product separates, factoring the double integral reduces a two-variable calculation to two one-variable calculations. It also gives a practical check: integrating in the other order on the same rectangle must produce the same product of definite integrals. This is a consequence of Fubini’s theorem for the continuous integrands considered here, not a license to change bounds in a way that changes the domain.
For sums, separating each term can make the arithmetic simpler and makes it easier to locate an error. Keep the terms distinct through the inner evaluation, then combine them using linearity. In particular, do not replace a trigonometric boundary value such as \(\sin(\ln 2)\) with a guessed number; retain the exact expression unless a numerical approximation is explicitly needed.
Check Your Understanding
Use fixed rectangular bounds, evaluate each inner integral first, and check the antiderivatives and boundary substitutions.
- Evaluate \(\displaystyle \int_0^1\int_0^{\pi/2} e^x\sin y\,dy\,dx\).
- Write \(\displaystyle \iint_{[a,b]\times[c,d]}g(x)h(y)\,dA\) as a product of one-variable integrals, stating the continuity conditions.
- In \(\displaystyle \int_0^{\ln 2}\cos y\,dy\), what is the correct upper-minus-lower boundary expression?
- Evaluate \(\displaystyle \int_0^{\pi/4}\int_0^1 e^y\cos(2x)\,dy\,dx\).
- Why can a factor depending only on \(x\) be taken outside an inner integral with respect to \(y\), but not discarded from the full double integral?