Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 157
Image: ubuntu2204
Kernel: SageMath 10.1

Double Integrals

Double integrals over rectangular regions

The function f(x,y)f(x,y) is defined on a rectangular region RR R: axb, cyd.R:~a\leq x\leq b,~c\leq y\leq d.

We divide the region into small grids, and for each grid, we pick a point (xk,yk)(x_k,y_k) and use f(xk,yk)ΔAkf(x_k,y_k)\Delta A_k to approximate the intergal over this small rectangular. Let Sn=k=1nf(xk,yk)ΔAk=k=1nf(xk,yk)ΔxkΔyk.S_n=\sum_{k=1}^nf(x_k,y_k)\Delta A_k=\sum_{k=1}^nf(x_k,y_k)\Delta x_k \Delta y_k. If limnSn\lim\limits_{n\rightarrow\infty}S_n does not change no matter what choices are made, we say ff is integral, and the limit is called the double integral of ff over RR, written as Rf(x,y)dA,or Rf(x,y)dxdy.\iint_Rf(x,y)dA,\qquad\mbox{or }\qquad \iint_Rf(x,y)dxdy.

Which function is integrable

▶ A continuous function is integrable;

▶ A function that is discontinuous only on a finite number of points or smooth curves is also integrable.

Double integrals as volumes

Volume=limnSn=Rf(x,y)dA\mbox{Volume}=\lim_{n\rightarrow\infty}S_n=\iint_Rf(x,y)dA

Fubini’s theorem for calculating double integrals

Calculate the volume under the plane z=4xyz = 4 - x - y over the rectangular region R:0x2, 0y1R: 0 \leq x \leq 2,~0 \leq y \leq 1 in the xyxy-plane.

Volume=y=0y=1A(y)dy=0102(4xy)dxdy.\mbox{Volume}=\int_{y=0}^{y=1}A(y)dy=\int_0^1\int_0^2(4-x-y)dxdy.
reset() region1=line3d([(0,0,0), (0,0,0)]) var('x, y, z, u, v') f(x,y) = 4-x-y def g(x, y, z): if z <= 4-x-y: return 1 - 0 x0 = 1 base = plot3d(0, (x,0,2), (y,0,1), color="red") surface = plot3d(f(x,y), (x,0,2), (y,0,1), color="red") cut = implicit_plot3d(g(x,y,z)==1, (x, 0, 2), (y, 0, 1), (z,0,4)) (base + surface).show() #cut.show()

Fubini's Theorem

Theorem (Theorem 1)

If f(x,y)f(x, y) is continuous throughout the region R:axb,cydR: a \leq x \leq b, c \leq y \leq d, then Rf(x,y)dA=cdabf(x,y)dxdy=abcdf(x,y)dydx.\iint_Rf(x,y)dA=\int_c^d\int_a^bf(x,y)dxdy=\int_a^b\int_c^df(x,y)dydx.

Example: 0211(1006x2y)dydx=1102(1006x2y)dxdy\int_0^2\int_{-1}^1(100-6x^2y)dydx=\int_{-1}^1\int_0^2(100-6x^2y)dxdy

Example:

Find the volume of the region bounded above by the elliptical paraboloid z=10+x2+3y2z = 10 + x^2 + 3y^2 and below by the rectangle R:0x1,0y2R: 0\leq x \leq 1, 0\leq y \leq 2.

Solution:

Volume=0102(10+x2+3y2)dydx=0201(10+x2+3y2)dxdy=863\text{Volume}=\int_0^1\int_0^2(10+x^2+3y^2)dydx=\int_0^2\int_0^1(10+x^2+3y^2)dxdy={86\over3}
var('u x y v') f(x,y)=x+y surface = plot3d(f(x,y), (x, 0, 3.2), (y, 0, 12.3), color = 'blue', opacity=0.3) domain = parametric_plot3d([3*u, 4*(3*u)*v,0], (u, 0, 1), (v, 0,1), color = 'green', opacity = 0.75) image = parametric_plot3d([3*u, 4*(3*u)*v, f(3*u, 12*u*v)], (u, 0, 1), (v, 0,1), color = 'green', opacity = 1.00) surface+domain+image
reset() region1=line3d([(0,0,0), (0,0,0)]) var('x,y,z') region = plot3d(0, (x,0,1), (y,0,2), color="red") region += plot3d(10+x^2+3*y^2, (0,1), (0,2), color="red") region.show()
Graphics3d Object

Double integrals over bounded, nonrectangular regions

V=Rf(x,y)dAV=\iint_Rf(x,y)dA

Double Integrals as Volumes

V=abA(x)dx=abg1(x)g2(x)f(x,y)dydxV=\int_a^b A(x)dx=\int_a^b\int_{g_1(x)}^{g_2(x)}f(x,y)dydx

Fubini’s theorem (stronger Form)

Let f(x,y)f(x, y) be continuous over a region RR.

▶ If RR is defined by axba\leq x\leq b, g1(x)yg2(x)g_1(x)\leq y\leq g_2(x) with g1g_1 and g2g_2 continuous on [a,b][a,b], then Rf(x,y)dA=abg1(x)g2(x)f(x,y)dydx.\iint_Rf(x,y)dA=\int_a^b\int_{g_1(x)}^{g_2(x)}f(x,y)dydx.

▶ If RR is defined by cydc\leq y\leq d, h1(y)xh2(y)h_1(y)\leq x\leq h_2(y) with h1h_1 and h2h_2 continuous on [c,d][c,d], then Rf(x,y)dA=cdh1(y)h2(y)f(x,y)dxdy.\iint_Rf(x,y)dA=\int_c^d\int_{h_1(y)}^{h_2(y)}f(x,y)dxdy.

Example: Find the volume of the prism whose base is in the xyxy-plane bounded by y=0y=0, y=xy = x, and x=1x = 1 and whose top lies in the plane z=3xyz=3-x-y.

Volume=Rf(x,y)dA=010x(3xy)dydx.\text{Volume}=\iint_Rf(x,y)dA=\int_0^1\int_0^x(3-x-y)dydx.
reset() var('x, y') region_plot(y <= x, (x, 0, 1), (y, 0, 1),aspect_ratio=1)
Image in a Jupyter notebook
reset() var('x y') f(x, y) = 3 - x - y f(x,y).integral(y, 0, x).integral(x, 0, 1)
1

Example

Calculate

RsinxxdA\iint_R{\sin x\over x}dA

where RR is bounded by y=0y=0, y=xy=x, and x=1x=1.

Volume=RsinxxdA=010xsinxxdydx=1cos1\text{Volume}=\iint_R{\sin x\over x}dA=\int_0^1\int_0^x{\sin x\over x}dydx=1-\cos1
reset() var('x y z') f(x, y) = sin(x)/x f(x,y).integral(y, 0, x).integral(x, 0, 1)
-cos(1) + 1

Find limits of integration

Using vertical cross-sections

▶ Sketch the region of integration

▶ Find the y-limits of integration

▶ Find the x-limits of integration

x=0x=1y=1xy=1x2f(x,y)dydx,011y1y2f(x,y)dxdy\int_{x=0}^{x=1}\int_{y=1-x}^{y=\sqrt{1-x^2}}f(x,y)dydx,\quad \int_{0}^{1}\int_{1-y}^{\sqrt{1-y^2}}f(x,y)dxdy

Example: Sketch the region of integration for the integral

02x22x(4x+2)dydx\int_0^2\int_{x^2}^{2x}(4x+2)dydx

and write an equivalent integral with the order of integration reversed.

Solution: 02x22x(4x+2)dydx=04y/2y(4x+2)dxdy\int_0^2\int_{x^2}^{2x}(4x+2)dydx=\int_0^4\int_{y/2}^{\sqrt y}(4x+2)dxdy

reset() var('t') f1(t) = 2*t f2(t) = t^2 region = parametric_plot((t,f1(t)), (t,0,2)) region += parametric_plot((t,f2(t)),(t,0,2)) x0 = 1.3 region += line([(x0, f2(x0)), (x0, f1(x0))]) region.show() f(x,y) = 4*x + 2 print('The integral is ', f(x,y).integral(x, y/2, y^(1/2)).integral(y, 0, 4))
Image in a Jupyter notebook
The integral is 8

Properties of double integrals

If ƒ(x,y)ƒ(x, y) and g(x,y)g(x, y) are continuous on the bounded region RR, then the following properties hold.

  1. Constant Multiple: Rcf(x,y)dA=cRf(x,y)dA\iint_Rcf(x,y)dA=c\iint_Rf(x,y)dA (any number cc)

  2. Sum and Difference: R(f(x,y)±g(x,y))dA=Rf(x,y)dA±Rg(x,y)dA\iint_R(f(x,y) \pm g(x,y))dA=\iint_Rf(x,y)dA \pm \iint_Rg(x,y)dA

  3. Domination:

    (a) Rf(x,y)dA0\iint_Rf(x,y)dA \geq 0 if f(x,y)0f(x,y) \geq 0 on RR

    (b) Rf(x,y)dARg(x,y)dA\iint_Rf(x,y)dA \geq \iint_Rg(x,y)dA if f(x,y)g(x,y)f(x,y) \geq g(x,y) on RR

  4. Additivity: Rf(x,y)dA=R1f(x,y)dA+R2f(x,y)dA\iint_Rf(x,y)dA=\iint_{R_1}f(x,y)dA+\iint_{R_2}f(x,y)dA if RR is the union of two nonoverlapping regions R1R_1 and R2R_2.

Example:

Find the volume of the wedgelike solid that lies beneath z=16x2y2z=16-x^2-y^2 and above the region RR bounded by the curve y=2xy = 2\sqrt{x}, the line y=4x2y = 4x - 2, and the xx-axis.

Solution: Volume=02y2/4(y+2)/4(16x2y2)dxdy=208031680\text{Volume}=\int_0^2\int_{y^2/4}^{(y+2)/4}(16-x^2-y^2)dxdy={20803\over1680}

reset() var('x, y') domain = region_plot([y <= 2*x^(1/2), y>=4*x-2], (x, 0, 1), (y, 0, 2),aspect_ratio=1) domain.show() f(x,y)=16-x^2-y^2 print('The integral is', f(x,y).integrate(x,(y^2)/4,(y+2)/4).integrate(y,0,2))
Image in a Jupyter notebook
The integral is 20803/1680

Area by double integration (f(x,y)=1f(x,y)=1)

definition The area of a closed bounded plane region RR is A=RdAA=\iint_RdA

Example: Find the area of the region RR bounded by the parabola y=x2y=x^2 and the line y=x+2y=x+2

solution: Area=RdA=12x2x+2dydx=92\text{Area}=\iint_RdA=\int_{-1}^{2}\int_{x^2}^{x+2}dydx={9\over2}

reset() var('x, y') domain = region_plot([y <= x+2, y>=x^2], (x, -1, 2), (y, 0, 4),aspect_ratio=1) domain.show() f(x,y) = 1 print('The integral is', f(x,y).integral(y, x^2,x+2).integral(x, -1, 2))
Image in a Jupyter notebook
The integral is 9/2

Example: Find the area of the playing field described by R: 2x2, 14x2y1+4x2,R:~-2\leq x\leq 2,~-1-\sqrt{4-x^2}\leq y\leq 1+\sqrt{4-x^2}, using (a) Fubini's theorem, (b) simple geometry.

Solution:

(a) Area=2214x21+4x2dydx=4π+8\text{Area}=\int_{-2}^{2}\int_{-1-\sqrt{4-x^2}}^{1+\sqrt{4-x^2}}dydx=4\pi+8

(b) Area=Area(two semicircles)+Area(rectangle)=22×π+4×2=4π+8\text{Area}=Area(two\ semicircles)+Area(rectangle)=2^2\times \pi+4\times 2=4\pi+8

reset() var('x, y') domain = region_plot([y <= 1+(4-x^2)^(1/2), y>=-1-(4-x^2)^(1/2)], (x, -2, 2), (y, -4, 4),aspect_ratio=1) domain.show() f(x,y) = 1 print('The integral is', f(x,y).integral(y, -1-(4-x^2)^(1/2),1+(4-x^2)^(1/2)).integral(x, -2, 2))
Image in a Jupyter notebook
The integral is 4*pi + 8

Average Value

Average value of f over R=1area of RRfdA\mbox{Average value of }f\mbox{ over }R={1\over\mbox{area of }R}\iint_RfdA

Example: Find the average value of f(x,y)=xcosxyf(x,y)=x\cos xy over the rectangle R:0xπ, 0y1R:0\leq x\le \pi,~0\leq y\leq 1.

Solution: RfdA=0π01xcos(xy)dydx=2\iint_RfdA=\int_0^\pi\int_0^1x\cos(xy)dydx=2

Average value=1area of RRfdA=2π\text{Average\ value}={1\over\mbox{area of }R}\iint_RfdA={2\over\pi}
reset() var('x, y') domain = region_plot([x^2>0], (x, 0, pi), (y, 0, 1),aspect_ratio=1) domain.show() f(x,y) = x g(x,y) = 1 print('The average value is', f(x,y).integral(y, 0, 1).integral(x, 0, pi)/g(x,y).integral(y, 0, 1).integral(x, 0, pi))
Image in a Jupyter notebook
The average value is 1/2*pi

Double integrals in the Polar form

Rf(r,θ)dA=αβr=g1(θ)r=g2(θ)f(r,θ)rdrdθ.\iint_Rf(r,\theta)dA=\int_{\alpha}^{\beta}\int_{r=g_1(\theta)}^{r=g_2(\theta)}f(r,\theta)rdrd\theta.

Finding limits of integration

▶ Sketch the region of integration

▶ Find the r-limits of integration

▶ Find the θ-limits of integration

Rf(r,θ)dA=π/4π/22cscθ2f(r,θ)rdrdθ\iint_Rf(r,\theta)dA=\int_{\pi/4}^{\pi/2}\int_{\sqrt{2}\csc\theta}^{2}f(r,\theta)rdrd\theta

Example: Find the limits of integration for integrating f(r,u)f(r, u) over the region RR that lies inside the cardioid r=1+cosθr = 1 + \cos \theta and outside the circle r=1r = 1. Rf(r,θ)dA=π/2π/211+cosθf(r,θ)rdrdθ\iint_Rf(r,\theta)dA=\int_{-\pi/2}^{\pi/2}\int_{1}^{1+cos\theta}f(r,\theta)rdrd\theta

reset() t = var('t') region = polar_plot(0,(t,0,2*pi)) region += polar_plot(1, (t, 0, 2*pi),color='black', thickness=2) region += polar_plot(cos(t) + 1, (t, 0, 2*pi),color='black', thickness=2) t=-pi/2 while(t<=pi/2): r1=1 r2=cos(t)+1 x1=r1*cos(t) y1=r1*sin(t) x2=r2*cos(t) y2=r2*sin(t) region+=line([(x1,y1),(x2,y2)]) t+=0.2 region.show()
Image in a Jupyter notebook

Area in polar coordinates (f=1f=1)

Rrdrdθ\iint_R rdrd\theta

Example: Find the area enclosed by the lemniscate r2=4cos2θr^2=4\cos2\theta. Solution: Rrdrdθ=4×0π/402cos2θrdrdθ=4\iint_R rdrd\theta=4\times \int_0^{\pi/4}\int_{0}^{2\sqrt{cos2\theta}}rdrd\theta=4

reset() var('t, r') region = polar_plot(0,(t,0,2*pi)) region += polar_plot(2*sqrt(cos(2*t)), (t, -pi/4, pi/4),color='black', thickness=2) region += polar_plot(2*sqrt(cos(2*t)), (t, 3*pi/4, 5*pi/4),color='black', thickness=2) t=-pi/4 while(t<=pi/4): r1=2*sqrt(cos(2*t)) x1=0 y1=0 x2=r1*cos(t) y2=r1*sin(t) region+=line([(x1,y1),(x2,y2)]) t+=0.2 t=3*pi/4 while(t<=5*pi/4): r1=2*sqrt(cos(2*t)) x1=0 y1=0 x2=r1*cos(t) y2=r1*sin(t) region+=line([(x1,y1),(x2,y2)]) t+=0.2 region.show() f(r, t) = r print('The area is ', 4*f(r,t).integral(r, 0, 2*sqrt(cos(2*t))).integral(t, 0,pi/4))
Image in a Jupyter notebook
The area is 4

Changing cartesian integral to polar integral

Rf(x,y)dydx=Gf(rcosθ,rsinθ)rdrdθ\iint_Rf(x,y)dydx=\iint_Gf(r\cos\theta,r\sin\theta)rdrd\theta

Example: Evaluate Rex2+y2dydx\iint_Re^{x^2+y^2}dydx where RR is the semicircular region bounded by the xx-axis and the curve y=1x2y=\sqrt{1-x^2}.

Solution: Rex2+y2dydx=0π01er2rdrdθ=(e1)π2\iint_Re^{x^2+y^2}dydx=\int_0^{\pi}\int_{0}^{1}e^{r^2}rdrd\theta={(e-1)\pi\over2}

reset() var('x, y, r, t') domain = region_plot([y<sqrt(1-x^2)], (x, -1, 1), (y, 0, 1),aspect_ratio=1) domain.show() f(x,y) = e^(x^2+y^2) g(r,t) = e^(r^2)*r print('The integral is', f(x,y).integral(y, 0, sqrt(1-x^2)).integral(x, -1, 1)) print('The integral is', g(r,t).integral(r, 0, 1).integral(t, 0, pi))
Image in a Jupyter notebook
The integral is -1/2*I*sqrt(pi)*integrate(erf(I*sqrt(-x^2 + 1))*e^(x^2), x, -1, 1) The integral is 1/2*pi*(e - 1)

Example: Evaluate the integral 0101x2(x2+y2)dydx.\int_0^1\int_0^{\sqrt{1-x^2}}(x^2+y^2)dydx.

Solution: R(x2+y2)dydx=0π/201(r2)rdrdθ=π/8\iint_R(x^2+y^2)dydx=\int_0^{\pi/2}\int_{0}^{1}(r^2)rdrd\theta={\pi/8}

reset() var('x, y, r, t') domain = region_plot([y<sqrt(1-x^2)], (x, 0, 1), (y, 0, 1),aspect_ratio=1) domain.show() f(x,y) = x^2+y^2 g(r,t) = r^2*r print('The integral is', f(x,y).integral(y, 0, sqrt(1-x^2)).integral(x, 0, 1)) print('The integral is', g(r,t).integral(r, 0, 1).integral(t, 0, pi/2))
Image in a Jupyter notebook
The integral is 1/8*pi The integral is 1/8*pi

Example3:

Find the volume of the solid region bounded above by the paraboloid z=9x2y2z = 9 - x^2 - y^2 and below by the unit circle in the xyxy-plane

Solution: R(9x2y2)dydx=02π01(9r2)rdrdθ=17π/2\iint_R(9-x^2-y^2)dydx=\int_0^{2\pi}\int_{0}^{1}(9-r^2)rdrd\theta={17\pi/2}

reset() var('x, y, r, t') f(x,y) = 9-x^2-y^2 g(r,t) = (9-r^2)*r print('The integral is', g(r,t).integral(r, 0, 1).integral(t, 0, 2*pi))
The integral is 17/2*pi