【高等数学】定积分的应用

64 阅读4分钟

本文已参与「新人创作礼」活动,一起开启掘金创作之路。

 

定积分的几何应用

一、平面图形的面积

1. 直角坐标

  • 由曲线y=f(x)(f(x)0)y=f(x)\quad(f(x)\geq0)及直线x=a,x=b(a<b)x=a,x=b\quad(a<b)xx轴所围成的曲面梯形的面积AA是定积分A=abf(x)dxA=\int^b_af(x)dx

  • 由曲线y=f(x)(f(x)0)y=f(x)\quad(f(x)\leq0)及直线x=a,x=b(a<b)x=a,x=b\quad(a<b)xx轴所围成的曲面梯形的面积AA是定积分A=abf(x)dxA=-\int^b_af(x)dx

  • 由曲线y=f(x),y=g(x)(f(x)g(x))y=f(x),y=g(x)\quad(f(x)\leq g(x))及直线x=a,x=b(a<b)x=a,x=b\quad(a<b)xx轴所围成的曲面梯形的面积AA是定积分A=ab[g(x)f(x)]dxA=\int^b_a[g(x)-f(x)]dx

  • 由曲线y=f(x),y=g(x)(f(x)g(x))y=f(x),y=g(x)\quad(f(x)\geq g(x))及直线x=a,x=b(a<b)x=a,x=b\quad(a<b)xx轴所围成的曲面梯形的面积AA是定积分A=ab[f(x)g(x)]dxA=\int^b_a[f(x)-g(x)]dx

 

例1:计算抛物线:y2=x,y=x2y^2=x,y=x^2所围成图形的面积

一定要画图(本节笔记都有图,其他笔记如有必要会进行展示)

导包以及直角坐标系的通用设置(不同会特别说明)


import numpy as np

import matplotlib.pyplot as plt

plt.rcParams['figure.figsize']=(8,6)

ax=plt.gca()

ax.spines['right'].set_color('none')

ax.spines['top'].set_color('none')

ax.spines['bottom'].set_position(('data', 0))

ax.spines['left'].set_position(('data',0))

ax.set_aspect(1)

 


X=np.arange(-5,5,0.002)

f1=lambda x:x**2

f2=lambda x:x**0.5

f3=lambda x:-x**0.5

s1=pd.Series(f1(X),index=X)

s2=pd.Series(f2(X),index=X)

s3=pd.Series(f3(X),index=X)

s1.plot()

s2.plot(color='orange')

s3.plot(color='orange')

plt.ylim(-2,2)

plt.xlim(-1,2)

在这里插入图片描述

 

dA=(xx2)dxdA=(\sqrt x-x^2)dx

联立{y2=xy=x2\begin{cases}y^2=x\\y=x^2\end{cases}解得{x=0y=0\begin{cases}x=0\\y=0\end{cases}{x=1y=1\begin{cases}x=1\\y=1\end{cases}

A=01(xx2)dx=(23x3213x3)01=13A=\int^1_0(\sqrt x-x^2)dx=(\frac23x^{\frac32}-\frac13x^3)\Big|^1_0=\frac13

例2:计算抛物线y2=2xy^2=2x与直线y=x4y=x-4所围成的图形的面积


X=np.arange(-5,10,0.002)

f1=lambda x:2**0.5*x**0.5

f2=lambda x:-2**0.5*x**0.5

f3=lambda x:x-4

s1=pd.Series(f1(X),index=X)

s2=pd.Series(f2(X),index=X)

s3=pd.Series(f3(X),index=X)

s1.plot(color='orange')

s2.plot(color='orange')

s3.plot()

plt.ylim(-5,5)

在这里插入图片描述

 

联立{y2=2xy=x4\begin{cases}y^2=2x\\y=x-4\end{cases}解得{x=8y=4\begin{cases}x=8\\y=4\end{cases}{x=2y=2\begin{cases}x=2\\y=-2\end{cases}

xx轴积分

dA1=(2x+2x)dx(x(0,2)),dA2=(2xx+4)dx(x(2,8))dA_1=(\sqrt{2x}+\sqrt{2x})dx\quad(x\in(0,2)),dA_2=(\sqrt{2x}-x+4)dx\quad(x\in(2,8))

A=0222xdx+28(2xx+4)dxA=\int^2_02\sqrt{2x}dx+\int^8_2(\sqrt{2x}-x+4)dx

yy轴积分同理

dA=(4+yy22)dydA=(4+y-\frac{y^2}2)dy

A=24(4+yy22)dy=(4y+12y216y3)24=18A=\int^4_{-2}(4+y-\frac{y^2}2)dy=(4y+\frac12y^2-\frac16y^3)|^4_{-2}=18

例3:求椭圆x2a2+y2b2=1\frac{x^2}{a^2}+\frac{y^2}{b^2}=1所围成的图形的面积

此处画图以a=2,b=1a=2,b=1为例,设置轴标签变换的图像。以后凡是涉及参数大都是这种思路


theta=np.arange(0,2*np.pi,0.01)

a=2

b=1

f=lambda theta:a*np.cos(theta),lambda theta:b*np.sin(theta)

plt.plot(f[0](theta),f[1](theta),color='r')

plt.ylim(-1.5,1.5)

plt.xlim(-2.5,2.5)

plt.xticks([-2,2])

plt.yticks([-1,1])

ax.set_xticklabels(['-a','a'],fontsize=30)

ax.set_yticklabels(['-b','b'],fontsize=30)

在这里插入图片描述

 

法1:

由于图像关于x,yx,y轴均对称,因此计算第一象限面积再乘44

参数方程

{x=acosty=bsint\begin{cases}x=a\cos t\\y=b\sin t\end{cases} (0tπ2)\quad(0\leq t\leq\frac\pi2)

dA=4dA1=4ydx=4yd(acost=4bsintd(acost)=4absin2tdtdA=4dA_1=4ydx=4yd(a\cos t=4b\sin td(a\cos t)=-4ab\sin^2t dt

A=4abπ20sin2tde=πabA=-4ab\int^0_{\frac\pi2}\sin^2tde=\pi ab

法2:

dA=4dA1=4y(x)dx=4baa2x2dxdA=4dA_1=4y(x)dx=4\frac ba\sqrt{a^2-x^2}dx

A=4ba0aa2x2dx=dx=acostdtx=asint4ba0π2a2cos2tdt=4ab0π2cos2tdt=πab\begin{aligned}A&=4\frac ba\int^a_0\sqrt{a^2-x^2}dx\\&\overset{\text{令}x=a\sin t}{\underset{dx=a\cos tdt}{=}}4\frac ba\int^{\frac\pi2}_0a^2\cos^2tdt\\&=4ab\int^{\frac\pi2}_0\cos^2tdt\\&=\pi ab\end{aligned}

2. 极坐标

设由曲线ρ=ρ(θ)\rho=\rho(\theta)及射线θ=α,θ=β\theta=\alpha,\theta=\beta围成的一个图形,这个曲边扇形的面积AA是定积分A=αβ12[ρ(θ)]2dθA=\int^\beta_\alpha\frac12[\rho(\theta)]^2d\theta

例1:计算阿基米德螺线ρ=αθ(α>0)\rho=\alpha\theta\quad(\alpha>0)上相应于θ\theta00变到2π2\pi的一段弧与极轴所围成的图形的面积


theta=np.arange(0,2*np.pi,0.02)

a=1# 去α=1

f=lambda theta:a*theta

ax=plt.gca(projection='polar')

plt.plot(theta,f(theta))

在这里插入图片描述

 

dA=12ρ2dθ=12a2θ2dθdA=\frac12\rho^2d\theta=\frac12a^2\theta^2d\theta

A=02π12a2θ2dθ=a22(13θ3)02π=43π3a2A=\int^{2\pi}_0\frac12a^2\theta^2d\theta=\frac{a^2}2(\frac13\theta^3)|^{2\pi}_0=\frac43\pi^3a^2

例5:计算心形线ρ=a(1+cosθ)(a>0)\rho=a(1+\cos\theta)\quad(a>0)所围成图形的面积


theta=np.arange(0,2*np.pi,0.02)

a=5

f=lambda theta:a*(1+np.cos(theta))

ax=plt.gca(projection='polar')

plt.plot(theta,f(theta))

在这里插入图片描述

 

dA=2(12ρ2dθ)=2(12a2(1+cosθ)2)dθdA=2(\frac12\rho^2d\theta)=2(\frac12a^2(1+\cos\theta)^2)d\theta

可选择(0,π)(0,\pi)再乘22,也可直接选择(0,2π)(0,2\pi),二者同理

A=0πa2(1+cosθ)2dθ=a20π(1+2cosθ+cos2θ)dθ(结合图像发现cosθ(0,2π)x轴上下面积相等)=a20πdθ+2a20π2cos2θdθ(结合图像,换到(0,π2)区间上)=32πa2\begin{aligned}A&=\int^\pi_0a^2(1+\cos\theta)^2d\theta\\&=a^2\int^\pi_0(1+2\cos\theta+\cos^2\theta)d\theta\quad\text{(结合图像发现}\cos\theta\text{在}(0,2\pi)\text{上}x\text{轴上下面积相等)}\\&=a^2\int^\pi_0d\theta+2a^2\int^{\frac\pi2}_0\cos^2\theta d\theta\quad\text{(结合图像,换到}(0,\frac\pi2)\text{区间上)}\\&=\frac32\pi a^2\end{aligned}

见到区间长度是π2\frac\pi2的整数倍,积分中含有sin,cos\sin,\cos,结合图像可以缩小区间或者发现积分为00

二、旋转体的体积

设连续曲线y=f(x)y=f(x)、直线x=a,x=bx=a,x=bxx轴所围成的曲边梯形绕xx轴旋转一周所围成的旋转体的体积,体积微元是dV=π[f(x)]2dxdV=\pi[f(x)]^2dx,体积是V=abπ[f(x)]2dxV=\int^b_a\pi[f(x)]^2dx

例6:连接坐标原点OO及点P(h,r)P(h,r)的直线、直线x=hx=hxx轴围成一个直角三角形,将它绕xx轴旋转一周构成一个底面半径为rr、高为hh的圆锥体,计算该圆锥体的体积

dV=πy2(x)dx=π(rhx)2dxdV=\pi y^2(x)dx=\pi(\frac rhx)^2dx

V=π(rh)20hx2dx=πr2h3V=\pi(\frac rh)^2\int^h_0x^2dx=\frac{\pi r^2h}3

例7:计算由摆线x=a(tsint),y=a(1cost)x=a(t-\sin t),y=a(1-\cos t)相应于0t2π0\leq t\leq2\pi的一拱与直线y=0y=0所围成的图形分别绕xx轴与yy轴旋转一周而成的旋转体的体积


theta=np.arange(-1*np.pi,3*np.pi,0.02)

a=1

f=lambda theta:a*(theta-np.sin(theta)),lambda theta:a*(1-np.cos(theta))

plt.plot(f[0](theta),f[1](theta))

plt.xticks([0,2*np.pi])

plt.yticks([2])

ax.set_xticklabels([0,'2πa'])

ax.set_yticklabels(['2a'])

在这里插入图片描述

 

参数方程根据xxyy的极值或零点,确定tt的值,从而确定yyxx的值,最终确定直角坐标系上的坐标

dVx=πy2(x)dx=πy2(t)x(t)dt=πa2(1cost)2a(1cost)dtdV_x=\pi y^2(x)dx=\pi y^2(t)x'(t)dt=\pi a^2(1-\cos t)^2\cdot a(1-\cos t)dt

Vx=02ππa3(1cost)3dt=πa302π(13cost+3cos2tcos3t)dt=5π2a3\begin{aligned}V_x&=\int^{2\pi}_0\pi a^3(1-\cos t)^3dt\\&=\pi a^3\int^{2\pi}_0(1-3\cos t+3\cos^2t-\cos^3t)dt\\&=5\pi^2a^3\end{aligned}

dVy1=πx12(y)dy=π[a(tsint)]2asintdtdV_{y1}=\pi x_1^2(y)dy=\pi[a(t-\sin t)]^2\cdot a\sin tdt

dVy2=πx22(y)dy=π[a(tsint)]2asintdtdV_{y2}=\pi x_2^2(y)dy=\pi[a(t-\sin t)]^2\cdot a\sin tdt

Vy=02aπx12(y)dy02aπx12(y)dy虽然都是02a,但第一个式子是x(πa,2πa)曲线与y轴构成的面,第二个式子是x(0,πa)曲线与y轴构成的面,二者相减得到的结果对于第一个式子的下限0,根据y=a(1cost)t=2π。其余上下限转化同理=π2ππ[a(tsint)]2asintdtπ0π[a(tsint)]2asintdt=π02πa3(tsint)2sintdt=6π3a3\begin{aligned}V_y&=\int^{2a}_0\pi x_1^2(y)dy-\int^{2a}_0\pi x_1^2(y)dy\\&\text{虽然都是}\int^{2a}_0\text{,但第一个式子是}x\in(\pi a,2\pi a)\text{曲线与}y\text{轴构成的面,第二个式子是}x\in(0,\pi a)\text{曲线与}y\text{轴构成的面,二者相减得到的结果}\\&\text{对于第一个式子的下限}0\text{,根据}y=a(1-\cos t)\text{得}t=2\pi\text{。其余上下限转化同理}\\&=\pi\int^\pi_{2\pi}[a(t-\sin t)]^2\cdot a\sin tdt-\pi\int^\pi_0[a(t-\sin t)]^2\cdot a\sin tdt\\&=-\pi\int^{2\pi}_0a^3(t-\sin t)^2\sin tdt\\&=6\pi^3a^3\end{aligned}

三、平面曲线的弧长

1. 直角坐标

当曲线弧由直角坐标方程y=f(x)(axb)y=f(x)\quad(a\leq x\leq b)确定,其中f(x)f(x)在其闭区间[a,b][a,b]上具有一阶连续导数,则曲线弧长为s=ab1+y2(x)dxs=\int^b_a\sqrt{1+y'^2(x)}dx

推导:

(ds)2=(dx)2+(dy)2(ds)^2=(dx)^2+(dy)^2

ds=(dx)2+(dy)2=1+(dydx)2dx=1+y2(x)dxds=\sqrt{(dx)^2+(dy)^2}=\sqrt{1+(\frac{dy}{dx})^2}dx=\sqrt{1+y'^2(x)}dx

2. 参数方程

当曲线弧由参数方程{x=x(t)y=y(t)(αtβ)\begin{cases}x=x(t)\\y=y(t)\end{cases}\quad(\alpha\leq t\leq\beta)确定,其中x=x(t)x=x(t)y=y(t)y=y(t)在闭区间t[α,β]t\in[\alpha,\beta]具有连续导数,所以曲线弧长为s=αβx2(t)+y2(t)dts=\int^\beta_\alpha\sqrt{x'^2(t)+y'^2(t)}dt

推导:

(ds)2=(dx)2+(dy)2(ds)^2=(dx)^2+(dy)^2

ds=(dx)2+(dy)2=(dxdt)2+(dydt)2dt=x2(t)+y2(t)dtds=\sqrt{(dx)^2+(dy)^2}=\sqrt{(\frac{dx}{dt})^2+(\frac{dy}{dt})^2}dt=\sqrt{x'^2(t)+y'^2(t)}dt

3. 极坐标

当曲线弧由极坐标方程ρ=ρ(θ)(αθβ)\rho=\rho(\theta)\quad(\alpha\leq\theta\leq\beta)确定,其中ρ(θ)\rho(\theta)在闭区间[α,β][\alpha,\beta]上具有连续导数,则由直角坐标与极坐标的关系得知{x=x(θ)=ρ(θ)cosθy=y(θ)=ρ(θ)sinθ(αθβ)\begin{cases}x=x(\theta)=\rho(\theta)\cos\theta\\y=y(\theta)=\rho(\theta)\sin\theta\end{cases}\quad(\alpha\leq\theta\leq\beta),极坐标其实就是以极角θ\theta为参数的曲线弧的参数方程,所以曲线弧长为s=αβρ2(θ)+ρ2(θ)dθs=\int^\beta_\alpha\sqrt{\rho^2(\theta)+\rho'^2(\theta)}d\theta

推导:

ds=x2(θ)+y2(θ)dθ=(ρcosθρsinθ)2+(ρsinθ+ρcosθ)2dθ=ρ2(sin2θ+cos2θ)+ρ2(sin2θ+cos2θ)dθ=ρ2(θ)+ρ2(θ)dθ\begin{aligned}ds&=\sqrt{x'^2(\theta)+y'^2(\theta)}d\theta\\&=\sqrt{(\rho'\cos\theta-\rho\sin\theta)^2+(\rho'\sin\theta+\rho\cos\theta)^2}d\theta\\&=\sqrt{\rho^2(\sin^2\theta+\cos^2\theta)+\rho'^2(\sin^2\theta+\cos^2\theta)}d\theta\\&=\sqrt{\rho^2(\theta)+\rho'^2(\theta)}d\theta\end{aligned}

例8:求阿基米德螺线ρ=aθ(a>θ)\rho=a\theta\quad(a>\theta)相应于0θ2π0\leq\theta\leq2\pi的一段弧长

ds=ρ2(θ)+ρ2(θ)dθ=a1+θ2dθds=\sqrt{\rho^2(\theta)+\rho'^2(\theta)}d\theta=a\sqrt{1+\theta^2}d\theta

s=a02π1+θdθ=a[θ21+θ2+12ln(θ+1+θ2)]02π=π1+4π2+12ln(2π+1+4π2)s=a\int^{2\pi}_0\sqrt{1+\theta}d\theta=a[\frac\theta2\sqrt{1+\theta^2}+\frac12\ln(\theta+\sqrt{1+\theta^2})]\Big|^{2\pi}_0=\pi\sqrt{1+4\pi^2}+\frac12\ln{(2\pi+\sqrt{1+4\pi^2})}

这个积分不容易计算,可以先换成不定积分进行计算,不定积分积完后代入上下限。注意,这种方法的前提是,被积函数在积分区间上连续,如不连续,可以分区间再用该种方法

x2+a2dx=dx=asec2udux=atanuasecuasec2udu(1)=a2secudtanu=a2secutanu+a2tan2usecudu=a2secutanu+a2(sec3usecu)du=a2secutanua2lnsecu+tanu+a2sec3udu(2)\begin{aligned}\int\sqrt{x^2+a^2}dx&\overset{x=a\tan u}{\underset{dx=a\sec^2udu}{=}}\int a\sec u\cdot a\sec^2udu\quad\text{(1)}\\&=a^2\int\sec ud\tan u\\&=a^2\sec u\tan u+a^2\int\tan^2 u\sec udu\\&=a^2\sec u\tan u+a^2\int(\sec^3u-\sec u)du\\&=a^2\sec u\tan u-a^2\ln|\sec u+\tan u|+a^2\int\sec^3udu\quad\text{(2)}\end{aligned}

(1)(2)凑成循环积分,因此

x2+a2dx=dx=asec2udux=atanua22tanusecu+a22lnsecu+tanu+C\begin{aligned}\int\sqrt{x^2+a^2}dx\overset{x=a\tan u}{\underset{dx=a\sec^2udu}{=}}\frac{a^2}2\tan u\sec u+\frac {a^2}2\ln|\sec u+\tan u|+C\end{aligned}

代回xx

x2+a2dx=x2x2+a2+12ln(x+x2+a2)+C\begin{aligned}\int\sqrt{x^2+a^2}dx=\frac x2\sqrt{x^2+a^2}+\frac12\ln(x+\sqrt{x^2+a^2})+C\end{aligned}

 

定积分在物理学上的应用

一、变力沿直线做功

公式:W=FsW=F\cdot s

例1:一圆柱形的储水桶高为5m5m,底圆半径为3m3m,桶内盛满了水,试问要把桶内的水全部吸出需做多少功

建系如图

在这里插入图片描述

 

dW=dFs=dmgy=ρdVgy=ρgyπ32dy=9πρgydydW=dF\cdot s=dm\cdot gy=\rho dV\cdot gy=\rho gy\pi3^2dy=9\pi\rho gydy

W=9πρg05ydy=2252πρg(J)W=9\pi\rho g\int^5_0ydy=\frac{225}2\pi\rho g(J)

二、水压力

公式:P=pA=ρghAP=p\cdot A=\rho gh\cdot A

其中水的密度为ρ\rho,重力加速度为gghh为离水面的深度,AA为放置在水深为hh的物体的面积

例2:一个横放着的圆柱形水桶,桶内盛有半桶水,设桶的底半径为RR,水的密度为ρ\rho,计算桶的一个端面(圆面)上所受的压力

在这里插入图片描述

 

dP=pdA=ρgydA=ρgy2x(y)dy=2ρgyR2y2dydP=pdA=\rho gydA=\rho gy\cdot 2x(y)dy=2\rho gy\sqrt{R^2-y^2}dy

P=2ρg0RyR2y2dy=ρg[23(R2y2)32]0R=23ρgR3P=2\rho g\int^R_0y\sqrt{R^2-y^2}dy=-\rho g[\frac23(R^2-y^2)^{\frac32}]\Big|^R_0=\frac23\rho gR^3