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: 31
Image: ubuntu2204
Kernel: SageMath 10.3

Line Integrals

Definition If ff is a function defined on a curve CC that is parametrized by r(t)=g(t)i+h(t)j+k(t)k\vec r(t)=g(t)\vec i+h(t)\vec j+k(t)\vec k, atba\leq t\leq b, then the line integral of ff over CC is Cf(x,y,z)ds=limnk=1nf(xk,yk,zk)Δsk\int_Cf(x,y,z)ds=\lim_{n\rightarrow\infty}\sum_{k=1}^nf(x_k,y_k,z_k)\Delta s_k provided this limit exists.

Line integrals in the 2D plane

Let f(x,y)0f(x,y)\geq 0 for (x,y)C(x,y)\in C (the function value is nonnegative over the line). The line integral Cfds\int_Cfds is the area of the portion of the cylindrical surface or ''wall'' beneath the function f(x,y)f(x,y).

How to evaluate a line integral with curve r(t)\vec{r}(t)

Recall that we can define the variable s(t)s(t) as s(t)=atv(τ)dτ,v(t)=drdt(t).s(t)=\int_a^t|\vec v(\tau)|d\tau, \qquad \vec v(t)={d\vec r\over dt}(t).

Then we have ds=v(t)dtds=|\vec v(t)|dt and the change of variable gives Cf(x,y,z)ds=abf(g(t),h(t),k(t))v(t)dt.\int_Cf(x,y,z)ds=\int_a^bf(g(t),h(t),k(t)){\color{red}|\vec v(t)|}dt.

Steps to integrate a continuous function f(x,y,z)f(x, y, z) over a curve CC:

  1. Find a smooth parametrization of CC, r(t)=g(t)i+h(t)j+k(t)k,atb.\vec r(t) = g(t)\vec i + h(t)\vec j + k(t)\vec k,\qquad a \leq t \leq b.

  2. Evaluate the integral as Cf(x,y,z)ds=abf(g(t),h(t),k(t))v(t)dt.\int_Cf(x,y,z)ds=\int_a^bf(g(t),h(t),k(t))|\vec v(t)|dt.

Example: Integrate f(x,y,z)=x3y2+zf(x, y, z) = x - 3y^2 + z over the line segment CC joining the origin to the point (1,1,1)(1, 1, 1).

Solution: Let r(t)=ti+tj+tk\vec r(t)=t\vec i+t\vec j+t\vec k for t[0,1]t\in[0,1] be the line segment CC, and we have Cf(x,y,z)ds=01(t3t2+t)3dt=0.\int_Cf(x,y,z)ds=\int_0^1 (t-3t^2+t)\sqrt{3}dt=0.

reset() show('Integrate f(x,y,z)=x-3y^2+z over the line sagement C joining the origin to the point (1,1,1).') var('t') r = vector((t, t, t)) show('r(t) =', r, 'for 0 <= t <= 1') f(t) = r[0] - 3*r[1]^2 + r[2] # Note that the index starts at 0. show('f(t) =', f(t)) print('The line integral is', integral(f(t)*diff(r,t).norm(), t, 0, 1))

Integrate f(x,y,z)=x-3y^2+z over the line sagement C joining the origin to the point (1,1,1).\displaystyle \verb|Integrate|\verb| |\verb|f(x,y,z)=x-3y^2+z|\verb| |\verb|over|\verb| |\verb|the|\verb| |\verb|line|\verb| |\verb|sagement|\verb| |\verb|C|\verb| |\verb|joining|\verb| |\verb|the|\verb| |\verb|origin|\verb| |\verb|to|\verb| |\verb|the|\verb| |\verb|point|\verb| |\verb|(1,1,1).|

r(t) =(t,t,t)for 0 <= t <= 1\displaystyle \verb|r(t)|\verb| |\verb|=| \left(t,\,t,\,t\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|1|

f(t) =3t2+2t\displaystyle \verb|f(t)|\verb| |\verb|=| -3 \, t^{2} + 2 \, t

The line integral is 0

Additivity

For a piecewise smooth curve CC made by joining C1,C2,,CnC_1,C_2,\cdots,C_n, we have Cƒds=C1fds+C2fds++Cnfds.\int_C ƒ ds = \int_{C_1}f ds + \int_{C_2}fds + \cdots+\int_{C_n}fds. That is, we sum the line integrals over all disjoint subcurves to get the line integral over the curve CC.

Example: Integrate f(x,y,z)=x3y2+zf(x, y, z) = x - 3y^2 + z over CC which goes from the origin directly to the point (1,1,0)(1, 1, 0), and from (1,1,0)(1,1,0) to (1,1,1)(1,1,1).

Solution:

For C1:(0,0,0)(1,1,0)C_1:(0,0,0)\rightarrow(1,1,0): let r(t)=ti+tj+0k\vec r(t)=t\vec i+t\vec j+0\vec k, we have Cf(x,y,z)ds=01(t3t2)2dt=22.\int_Cf(x,y,z)ds=\int_0^1(t-3t^2)\sqrt{2}dt=-{\sqrt{2}\over 2}. For C2:(1,1,0)(1,1,1)C_2:(1,1,0)\rightarrow (1,1,1): let r(t)=i+j+tk\vec r(t)=\vec i+\vec j+t\vec k, we have Cf(x,y,z)ds=01(13+t)1dt=32.\int_Cf(x,y,z)ds=\int_0^1(1-3+t)\sqrt{1}dt=-{3\over 2}. The line integral is the sum of the two values: 2232.-{\sqrt{2}\over2}-{3\over2}.

reset() show('Integrate f(x, y, z) = x - 3y^2 + z over C which goes from the origin directly to the point (1, 1, 0), and then from (1,1,0) to (1,1,1).') var('t') r = vector((t, t, 0)) show('r(t) =', r, 'for 0 <= t <= 1') f(t) = r[0] - 3*r[1]^2 + r[2] # Note that the index starts at 0. show('f(t) =', f(t)) res1 = integral(f(t)*diff(r,t).norm(), t, 0, 1) print('The first line integral is', res1) r = vector((1, 1, t)) show('r(t) =', r, 'for 0 <= t <= 1') f(t) = r[0] - 3*r[1]^2 + r[2] # Note that the index starts at 0. show('f(t) =', f(t)) res2 = integral(f(t)*diff(r,t).norm(), t, 0, 1) print('The second line integral is ', res2, '\nAnd the total line integral over C is ', res1+res2)

Integrate f(x, y, z) = x - 3y^2 + z over C which goes from the origin directly to the point (1, 1, 0), and then from (1,1,0) to (1,1,1).\displaystyle \verb|Integrate|\verb| |\verb|f(x,|\verb| |\verb|y,|\verb| |\verb|z)|\verb| |\verb|=|\verb| |\verb|x|\verb| |\verb|-|\verb| |\verb|3y^2|\verb| |\verb|+|\verb| |\verb|z|\verb| |\verb|over|\verb| |\verb|C|\verb| |\verb|which|\verb| |\verb|goes|\verb| |\verb|from|\verb| |\verb|the|\verb| |\verb|origin|\verb| |\verb|directly|\verb| |\verb|to|\verb| |\verb|the|\verb| |\verb|point|\verb| |\verb|(1,|\verb| |\verb|1,|\verb| |\verb|0),|\verb| |\verb|and|\verb| |\verb|then|\verb| |\verb|from|\verb| |\verb|(1,1,0)|\verb| |\verb|to|\verb| |\verb|(1,1,1).|

r(t) =(t,t,0)for 0 <= t <= 1\displaystyle \verb|r(t)|\verb| |\verb|=| \left(t,\,t,\,0\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|1|

f(t) =3t2+t\displaystyle \verb|f(t)|\verb| |\verb|=| -3 \, t^{2} + t

The first line integral is -1/2*sqrt(2)

r(t) =(1,1,t)for 0 <= t <= 1\displaystyle \verb|r(t)|\verb| |\verb|=| \left(1,\,1,\,t\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|1|

f(t) =t2\displaystyle \verb|f(t)|\verb| |\verb|=| t - 2

The second line integral is -3/2 And the total line integral over C is -1/2*sqrt(2) - 3/2

Example: Find the line integral of f(x,y,z)=2xy+zf(x,y,z)=2xy+\sqrt{z} over the helix r(t)=costi+sintj+tk\vec r(t)=\cos t\vec i+\sin t\vec j +t\vec k, 0tπ0\leq t\leq \pi.

Solution: 0π(2costsint+t)(sint)2+(cost)2+1dt=223π3/2.\int_0^\pi (2\cos t\sin t +\sqrt{t} )\sqrt{(-\sin t)^2+(\cos t)^2+1}dt={2\sqrt{2}\over 3}{\pi}^{3/2}.

reset() var('t') r = vector((cos(t), sin(t), t)) show('r(t) =', r, 'for 0 <= t <= pi') f(t) = 2*r[0]*r[1] + sqrt(r[2]) # Note that the index starts at 0. show('f(t) =', f(t)) res = integral(f(t)*diff(r,t).norm(), t, 0, pi) print('The line integral over C is', res.full_simplify())

r(t) =(cos(t),sin(t),t)for 0 <= t <= pi\displaystyle \verb|r(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,\sin\left(t\right),\,t\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|pi|

f(t) =2cos(t)sin(t)+t\displaystyle \verb|f(t)|\verb| |\verb|=| 2 \, \cos\left(t\right) \sin\left(t\right) + \sqrt{t}

The line integral over C is 2/3*sqrt(2)*pi^(3/2)

Mass and moment formulas for coil springs, wires, and thin rods lying along a smooth curve CC in space

  • Mass: M=Cδds,δ=δ(x,y,z) is the density at (x,y,z)M=\int_C\delta ds,\quad \delta=\delta(x,y,z)\text{ is the density at }(x,y,z)

  • First moments about the coordinate planes: Myz=Cxδds,Mxz=Cyδds,Mxy=CzδdsM_{yz}=\int_Cx\delta ds,\quad M_{xz}=\int_Cy\delta ds,\quad M_{xy}=\int_Cz\delta ds

  • Coordinates of the center of mass: xˉ=Myz/M,yˉ=Mxz/M,zˉ=Mxy/M\bar x=M_{yz}/M,\quad \bar y=M_{xz}/M,\quad \bar z=M_{xy}/M

  • Moments of inertia about axes and other straight lines Ix=C(y2+z2)δds,Iy=C(x2+z2)δds,Iz=C(x2+y2)δdsI_x=\int_C(y^2+z^2)\delta ds,\quad I_y=\int_C(x^2+z^2)\delta ds,\quad I_z=\int_C(x^2+y^2)\delta ds IL=Cr2δds,r(x,y,z)=distance from the point (x,y,z) to line LI_L=\int_Cr^2\delta ds,\quad r(x,y,z)=\text{distance from the point }(x,y,z)\text{ to line }L

Example: A slender metal arch, denser at the bottom than at the top, lies along the semicircle y2+z2=1y^2 + z^2 = 1, z0z \geq0, in the yzyz-plane. Find the center of the arch's mass if the density on the arch is δ(x,y,z)=2z\delta(x, y, z) = 2 - z.

Solution:

Let r(t)=0i+costj+sintj\vec r(t)=0\vec i+ \cos t\vec j+ \sin t\vec j for 0tπ0\leq t\leq \pi. Then the total mass is M=0π(2sint)dt=2π2M=\int_0^\pi (2-\sin t)dt=2\pi-2 The first moment is Mxy=0πsint(2sint)dt=8π2Mxz=0πcost(2sint)dt=0\begin{align*}M_{xy}=\int_0^\pi \sin t(2-\sin t)dt=&{8-\pi\over 2}\\ M_{xz}=\int_0^\pi \cos t(2-\sin t)dt=&{0} \end{align*} So, the center is xˉ=Myz/M=0,yˉ=Mxz/M=0,zˉ=Mxy/M=8π4π4.\bar x= M_{yz}/M=0,\quad \bar y= M_{xz}/M=0,\quad \bar z= M_{xy}/M={8-\pi\over 4\pi -4}.

reset() var('x, y, z, t') f = y^2+z^2-1 region = implicit_plot3d(f, (x,0,1), (y,-1,1), (z,0,1), plot_points = 100, region=lambda x,y,z: z>=0 and x<=0.05 and x>=0) region.show() r = vector((0, cos(t), sin(t))) show('r(t) =', r, 'for 0 <= t <= pi') f(t) = 2 - r[2] # Note that the index starts at 0. show('delta(t) =', f(t)) M = integral(f(t)*diff(r,t).norm(), t, 0, pi) print('The total mass is', M.full_simplify()) Center = vector((integral(f(t)*r[0]*diff(r,t).norm(), t, 0, pi),integral(f(t)*r[1]*diff(r,t).norm(), t, 0, pi),integral(f(t)*r[2]*diff(r,t).norm(), t, 0, pi)))/M print('The center is ', Center)

r(t) =(0,cos(t),sin(t))for 0 <= t <= pi\displaystyle \verb|r(t)|\verb| |\verb|=| \left(0,\,\cos\left(t\right),\,\sin\left(t\right)\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|pi|

delta(t) =sin(t)+2\displaystyle \verb|delta(t)|\verb| |\verb|=| -\sin\left(t\right) + 2

The total mass is 2*pi - 2 The center is (0, 0, -1/4*(pi - 8)/(pi - 1))

Vector Fields

A vector field is a function that assigns a vector to each point in its domain. A vector field on a 3D domain might have a formula like F(x,y,z)=M(x,y,z)i+N(x,y,z)j+P(x,y,z)k.\vec F(x, y, z) = M(x, y, z)\vec i + N(x, y, z)\vec j + P(x, y, z)\vec k.

  • A field is continuous if its component functions MM, NN, and PP are continuous;

  • A field is differentiable if its component functions are differentiable.

  • Example: tangent vector T\vec T and normal vector N\vec{N} of a curve.

Special vector fields: gradient fields

We define the gradient field of a differentiable function f(x,y,z)f(x, y, z) to be the field of gradient vectors f=fxi+fyj+fzk.\nabla f={\partial f\over\partial x}\vec i+{\partial f\over\partial y}\vec j+{\partial f\over\partial z}\vec k.

  • At (x,y,z)(x, y, z), the gradient field gives a vector pointing toward the greatest increase of ff.

  • Its magnitude is the directional derivative in the direction of the greatest increase of ff.

Find the vector field F\vec F

Suppose that the temperature TT at (x,y,z)(x, y, z) in a region of space is given by T=100x2y2z2,T=100-x^2-y^2-z^2, and that F(x,y,z)\vec F(x,y,z) is the gradient of TT.

F=T=2xi2yj2zk\vec F=\nabla T=-2x\vec i-2y\vec j-2z\vec k
reset() var('x, y, z') T = 100-x^2-y^2-z^2 show('The gradient field is', T.gradient())

The gradient field is(2x,2y,2z)\displaystyle \verb|The|\verb| |\verb|gradient|\verb| |\verb|field|\verb| |\verb|is| \left(-2 \, x,\,-2 \, y,\,-2 \, z\right)

Line integrals of vector fields

Work done by a force over a curve

Let the tangent vector T=dr/ds\vec T=d\vec r/ds, a unit vector tangent to the path. The work done along the subarc from Pk1P_{k-1} to PkP_k shown below is approximately F(xk,yk,zk)T(xk,yk,zk)the portion contributesΔsk.\underbrace{\vec{F}(x_k,y_k,z_k)\cdot \vec{T}(x_k,y_k,z_k)}_{\text{the portion contributes}}\Delta s_k.

Definition Let CC be a smooth curve parametrized by r(t)\vec r(t), atba \leq t \leq b, and F\vec F be a continuous force field over a region containing CC. Then, the work done in moving an object from the point A=r(a)A = \vec r(a) to the point B=r(b)B = \vec r(b) along CC is W=CFTds=C(Fdrds)ds=abF(r(t))drdtdt.W=\int_C\vec F\cdot\vec T ds=\int_C\left(\vec F\cdot{d\vec r\over ds}\right)ds=\int_a^b\vec F(\vec r(t))\cdot{d\vec r\over dt}dt.

Definition Let F\vec F be a vector field with continuous components defined along a smooth curve CC parametrized by r(t)\vec r(t), atba \leq t \leq b. The line integral of FF along C is CFTds=C(Fdrds)ds=CFdr.\int_C\vec F\cdot \vec T ds= \int_C\left(\vec F\cdot{d\vec r\over ds}\right)ds=\int_C\vec F\cdot d\vec r.

Line integrals of vector fields

Evaluate the integral of F=Mi+Nj+Pk\vec F=M\vec i+N\vec j+P\vec k along C:r(t)=g(t)i+h(t)j+k(t)kC: \vec r(t ) = g (t )\vec i + h(t )\vec j + k(t )\vec k in the following steps

  • Express the vector field F\vec F as F(r(t))\vec F(\vec r(t))

  • Find the derivative vector dr/dtd\vec r/dt.

  • Evaluate the line integral CFdr=abF(r(t))drdtdt.\int_C\vec F\cdot d\vec r=\int_a^b\vec F(\vec r(t))\cdot {d\vec r\over dt}dt.

Example: Let F(x,y,z)=zi+xyjy2k\vec F(x,y,z)=z\vec i+xy\vec j-y^2\vec k and C:r(t)=t2i+tj+tkC:\vec r(t)=t^2\vec i+t\vec j+\sqrt{t}\vec k, 0t10\leq t\leq 1.

Solution: CFdr=01t,t3,t22t,1,12tdt=012t3/2+t312t3/2dt=1720.\int_C\vec F\cdot d\vec r=\int_0^1\langle \sqrt{t},t^3,-t^2\rangle\cdot\langle 2t,1,{1\over2\sqrt{t}}\rangle dt=\int_0^12t^{3/2}+t^3-{1\over2}t^{3/2}dt={17\over 20}.

reset() var('x, y, z, t') r = vector((t^2, t, sqrt(t))) show('r(t) =', r, 'for 0 <= t <= 1') F(t) = vector((r[2], r[0]*r[1], -r[1]^2)) # Note that the index starts at 0. show('F(t) =', F(t)) res = integral(F(t).dot_product(diff(r,t)), t, 0, 1) print('The line integral over C is', res.full_simplify())

r(t) =(t2,t,t)for 0 <= t <= 1\displaystyle \verb|r(t)|\verb| |\verb|=| \left(t^{2},\,t,\,\sqrt{t}\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|1|

F(t) =(t,t3,t2)\displaystyle \verb|F(t)|\verb| |\verb|=| \left(\sqrt{t},\,t^{3},\,-t^{2}\right)

The line integral over C is 17/20

Scalar differential form

line integral with respect to dxdx, dydy, or dzdz

Let F=Mi+Nj+Pk\vec F=M\vec i+N\vec j+P\vec k and C:r(t)=g(t)i+h(t)j+k(t)kC: \vec r(t ) = g (t )\vec i + h(t )\vec j + k(t )\vec k CMidr=CM(x,y,z)dx=abM(g(t),h(t),k(t))g(t)dtCNjdr=CN(x,y,z)dy=abN(g(t),h(t),k(t))h(t)dtCPkdr=CP(x,y,z)dz=abP(g(t),h(t),k(t))k(t)dt\begin{align*} \int_C M\vec{i}\cdot d\vec{r} &=\int_CM(x,y,z)dx=\int_a^bM(g(t),h(t),k(t))g'(t)dt\\ \int_C N\vec{j}\cdot d\vec{r} &=\int_CN(x,y,z)dy=\int_a^bN(g(t),h(t),k(t))h'(t)dt\\ \int_C P\vec{k}\cdot d\vec{r} &=\int_CP(x,y,z)dz=\int_a^bP(g(t),h(t),k(t))k'(t)dt \end{align*} CMdx+Ndy+Pdz=CFdr\int_CMdx+Ndy+Pdz=\int_C\vec{F}\cdot d\vec{r}

Different ways to write the work integral

Different ways to write the work integral for FMi+Nj+Pk\vec{F}-M\vec{i}+N\vec{j}+P\vec{k} over the curve C:t=g(t)i+h(t)j+k(t)k, atb.C:\vec{t}=g(t)\vec{i}+h(t)\vec{j}+k(t)\vec{k},~a\leq t\leq b.

W=CFTdsThe definition=CFdrVector differential form=abFdrdtdtParametric vector evaluation=ab(Mg(t)+Nh(t)+Pk(t))dtParametric scalar evaluation=abMdx+Ndy+PdzScalar differential form\begin{align*} W = & \int_C\vec{F}\cdot\vec{T}ds& \text{The definition}\\ =&\int_C\vec{F}\cdot d\vec{r}& \text{Vector differential form}\\ =&\int_a^b\vec{F}\cdot {d\vec{r}\over dt}dt& \text{Parametric vector evaluation}\\ =&\int_a^b(Mg'(t)+Nh'(t)+Pk'(t))dt& \text{Parametric scalar evaluation}\\ =&\int_a^b Mdx + N dy +Pdz &\text{Scalar differential form} \end{align*}

Example: Evaluate Cydx+zdy+2xdz\int_C-ydx+zdy+2xdz, where CC is the helix r(t)=costi+sintj+tk\vec r(t)=\cos t\vec i+\sin t \vec j+t\vec k, 0t2π0\leq t\leq 2\pi

Solution:

02π(sint)(sint)+tcost+2costdt=12(tsin(2t)2)+(tsint+cost)+2sint02π=π\begin{align*}&\int_0^{2\pi}(-\sin t)(-\sin t)+t\cos t+2\cos t dt\\ =&{1\over 2}\left(t-{\sin(2t)\over 2}\right)+(t\sin t+\cos t)+2\sin t\Big|_{0}^{2\pi}\\ =&\pi\end{align*}
reset() var('x, y, z, t') r = vector((cos(t), sin(t), t)) show('r(t) =', r, 'for 0 <= t <= 2*pi') F(t) = vector((-r[1], r[2], 2*r[0])) # Note that the index starts at 0. show('F(t) =', F(t)) res = integral(F(t).dot_product(diff(r,t)), t, 0, 2*pi) print('The line integral over C is', res.full_simplify())

r(t) =(cos(t),sin(t),t)for 0 <= t <= 2*pi\displaystyle \verb|r(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,\sin\left(t\right),\,t\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|2*pi|

F(t) =(sin(t),t,2cos(t))\displaystyle \verb|F(t)|\verb| |\verb|=| \left(-\sin\left(t\right),\,t,\,2 \, \cos\left(t\right)\right)

The line integral over C is pi

Example: Find the work done by the force field F=(yx2)i+(zy2)j+(xz2)k\vec F = (y - x^2)\vec i + (z - y^2)\vec j + (x - z^2)\vec k along the curve r(t)=ti+t2j+t3k\vec r(t) = t \vec i + t^2\vec j + t^3\vec k, 0t10\leq t \leq 1, from (0,0,0)(0, 0, 0) to (1,1,1)(1, 1, 1).

Solution: 01(t2t2)+(t3t4)2t+(tt6)3t2dt=012t42t5+3t33t8dt=2526+3439=2960\begin{align*} &\int_0^1 (t^2-t^2)+(t^3-t^4)2t+(t-t^6)3t^2dt\\ =&\int_0^1 2t^4-2t^5+3t^3-3t^8dt\\ =& {2\over 5}-{2\over 6}+{3\over 4}-{3\over 9}\\ =&{29\over 60} \end{align*}

reset() var('x, y, z, t') r = vector((t, t^2, t^3)) show('r(t) =', r, 'for 0 <= t <= 1') F(t) = vector((r[1]-r[0]^2, r[2]-r[1]^2, r[0]-r[2]^2)) # Note that the index starts at 0. show('F(t) =', F(t)) res = integral(F(t).dot_product(diff(r,t)), t, 0, 1) print('The work done is', res.full_simplify())

r(t) =(t,t2,t3)for 0 <= t <= 1\displaystyle \verb|r(t)|\verb| |\verb|=| \left(t,\,t^{2},\,t^{3}\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|1|

F(t) =(0,t4+t3,t6+t)\displaystyle \verb|F(t)|\verb| |\verb|=| \left(0,\,-t^{4} + t^{3},\,-t^{6} + t\right)

The work done is 29/60

Flow integrals and circulation for velocity fields

Definition If r(t)\vec r(t) parametrizes a smooth curve CC in the domain of a continuous velocity field F\vec F, the flow along the curve from A=r(a)A = \vec r(a) to B=r(b)B = \vec r(b) is Flow=CFTds=CFdr.\mbox{Flow} = \int_C \vec F\cdot \vec T ds=\int_C \vec F\cdot d\vec{r}. The integral is called a flow integral. If the curve starts and ends at the same point, so that A=BA = B, the flow is called the circulation around the curve.

Example: A fluid's velocity field is F=xi+zj+yk\vec F=x\vec i+z\vec j+y\vec k. Find the flow along the helix r(t)=costi+sintj+tk\vec r(t)=\cos t\vec i+\sin t \vec j+t\vec k, 0tπ/20\leq t\leq \pi/2.

Solution:

0π/2cost(sint)+t(cost)+sintdt=14cos(2t)+tsint0π/2=π/21/41/4=π12\begin{align*} & \int_0^{\pi/2} \cos t(-\sin t)+ t(\cos t)+\sin tdt\\=&{1\over 4}\cos(2t)+t\sin t\Big|_0^{\pi/2}\\=&{\pi/2}-{1/4}-{1/4}\\=&{\pi-1}\over{2} \end{align*}
reset() var('x, y, z, t') r = vector((cos(t), sin(t), t)) show('r(t) =', r, 'for 0 <= t <= pi/2') F(t) = vector((r[0], r[2], r[1])) # Note that the index starts at 0. show('F(t) =', F(t)) res = integral(F(t).dot_product(diff(r,t)), t, 0, pi/2) print('The work done is', res.full_simplify())

r(t) =(cos(t),sin(t),t)for 0 <= t <= pi/2\displaystyle \verb|r(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,\sin\left(t\right),\,t\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|pi/2|

F(t) =(cos(t),t,sin(t))\displaystyle \verb|F(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,t,\,\sin\left(t\right)\right)

The work done is 1/2*pi - 1/2

Example: Find the circulation of the field F=(xy)i+xj\vec F = (x - y)\vec i + x \vec j around the circle r(t)=(cost)i+(sint)j, 0t2π\vec r(t) = (\cos t)\vec i + (\sin t)\vec j,~0 \leq t \leq 2\pi.

Solution: 02π(costsint)(sint)+cost(cost)dt=14cos(2t)+t02π=2π\begin{align*} & \int_0^{2\pi} (\cos t-\sin t)(-\sin t)+ \cos t(\cos t)dt\\=&{1\over 4}\cos(2t)+t\Big|_0^{2\pi}\\=&2\pi \end{align*}

reset() var('x, y, t') r = vector((cos(t), sin(t))) show('r(t) =', r, 'for 0 <= t <= 2*pi') F(t) = vector((r[0]-r[1], r[0])) # Note that the index starts at 0. show('F(t) =', F(t)) res = integral(F(t).dot_product(diff(r,t)), t, 0, 2*pi) print('The work done is', res.full_simplify())

r(t) =(cos(t),sin(t))for 0 <= t <= 2*pi\displaystyle \verb|r(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,\sin\left(t\right)\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|2*pi|

F(t) =(cos(t)sin(t),cos(t))\displaystyle \verb|F(t)|\verb| |\verb|=| \left(\cos\left(t\right) - \sin\left(t\right),\,\cos\left(t\right)\right)

The work done is 2*pi

Flux across a simple closed-plane curve

Definition A curve in the xyxy-plane is simple if it does not cross itself. When a curve starts and ends at the same point, it is a closed curve or loop.

Definition If CC is a smooth, simple closed curve in the domain of a continuous vector field F=M(x,y)i+N(x,y)j\vec F = M(x, y)\vec i + N(x, y)\vec j, and if n\vec n is the outward-pointing unit normal vector on CC, the flux of F\vec F across CC is Flux of F across C=CFnds.\mbox{Flux of }\vec F \mbox{ across }C=\int_C\vec F\cdot\vec n ds.

How to evaluate the flux

The n\vec n is orthogonal to T\vec T. Note that there are two unit vectors orthogonal to the vector T\vec T, and they are in the opposite direction.

  • If the curve is clockwise, then the vector n\vec n is to the left of the curve while a particle is moving on the curve, so the angle of the vector n\vec n is obtained by adding π/2\pi/2 to the angle of the vector T\vec T. That is cos(θ+π/2)=sinθ, sin(θ+π/2)=cosθ\cos(\theta+\pi/2)=-\sin\theta, ~\sin(\theta+\pi/2)=\cos\theta

  • If the curve is counterclockwise, then the vector n\vec n is to the right of the curve while a particle is moving on the curve, so the angle of the vector n\vec n is obtained by subtractinging π/2\pi/2 from the angle of the vector T\vec T. That is cos(θπ/2)=sinθ, sin(θπ/2)=cosθ\cos(\theta-\pi/2)={\sin\theta}, ~\sin(\theta-\pi/2)={-\cos\theta}

Remind that we have T=dxdsi+dydsj=cosθi+sinθj.\vec T = {dx\over ds}\vec i + {dy\over ds}\vec j=\cos \theta \vec i+\sin\theta\vec j. Therefore for the counterclockwise case, we have n=dydsidxdsj.\vec n={dy\over ds}\vec i-{dx\over ds}\vec j.

So we have CFnds=C(MdydsNdxds)ds=CMdyNdx.\begin{align*} \oint_C\vec F\cdot\vec n ds=&\oint_C\left(M{dy\over ds}-N{dx\over ds}\right)ds\\ =&\oint_CMdy-Ndx. \end{align*}

Example: Find the flux of F=(xy)i+xj\vec F=(x-y)\vec i+x\vec j across the circle x2+y2=1x^2+y^2=1.

Solution: Let r(t)=costi+sintj\vec r(t) = \cos t \vec i+\sin t \vec j, then n=(cost,sint)\vec n=(\cos t, \sin t) 02π(costsint)(cost)+costsintdt=14(2t+sin2t)02π=π\begin{align*} & \int_0^{2\pi} (\cos t-\sin t)(\cos t)+ \cos t\sin tdt\\=&{1\over 4}(2t+{\sin 2t})\Big|_0^{2\pi}\\=&{\pi} \end{align*}

reset() var('x, y, t') r = vector((cos(t), sin(t))) show('r(t) =', r, 'for 0 <= t <= 2*pi') F(t) = vector((r[0]-r[1], r[0])) # Note that the index starts at 0. show('F(t) =', F(t)) (dx,dy) = diff(r,t) nds = vector((dy,-dx)) #Get the normal vector by swapping the order and changing the sign. res = integral(F(t).dot_product(nds), t, 0, 2*pi) print('The work done is', res.full_simplify())

r(t) =(cos(t),sin(t))for 0 <= t <= 2*pi\displaystyle \verb|r(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,\sin\left(t\right)\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|2*pi|

F(t) =(cos(t)sin(t),cos(t))\displaystyle \verb|F(t)|\verb| |\verb|=| \left(\cos\left(t\right) - \sin\left(t\right),\,\cos\left(t\right)\right)

The work done is pi

Line integrals in conservative fields

If AA and BB are two points in an open region DD, the line integral of a field F\vec F, defined on DD, along CC from AA to BB, usually depends on the path CC. For some fields, however, the integral's value is the same for all paths from AA to BB.

Definition If F\vec F is a vector field defined on DD and F=f\vec F = \nabla f for some scalar function ff on DD, then ff is called a potential function for F\vec F.

Let the path CC from AA to BB be r(t)\vec r(t) for atba\leq t\leq b.

CFdr=Cfdr=abf(r(t))r(t)dt=f(r(b))f(r(a))=f(B)f(A).\begin{align*} \int_C\vec F\cdot d\vec r=&\int_C\nabla f\cdot d\vec r=\int_a^b\nabla f(\vec r(t))\cdot \vec r'(t) dt\\ =&f(\vec r(b))-f(\vec r(a))=f(B)-f(A). \end{align*}

Theorem (Theorem 1)

Let CC be a smooth curve joining the point AA to the point BB in the plane or space and parametrized by r(t)\vec r(t). Let ff be a differentiable function with a continuous gradient vector F=f\vec F = \nabla f on a domain DD containing CC. Then CFdr=f(B)f(A).\int_C\vec F\cdot d\vec r=f(B)-f(A).

Example: Suppose the force field F=f\vec F = \nabla f is the gradient of the function

f(x,y,z)=1x2+y2+z2.f(x,y,z)=-{1\over x^2+y^2+z^2}.

Find the work done by F\vec F in moving an object along a smooth curve CC joining (1,0,0)(1, 0, 0) to (0,0,2)(0, 0, 2) that does not pass through the origin.

Solution: The work done is CFdr=f(0,0,2)f(1,0,0)=14(1)=34.\int_C\vec F\cdot d\vec r = f(0,0,2)-f(1,0,0)=-{1\over 4}-(-1)={3\over 4}.

Path independence

Definition Let F\vec F be a vector field defined on an open region DD, and suppose that for any two points AA and BB in DD, the line integral CFdr\int_C \vec F \cdot d \vec r along a path CC from AA to BB is the same over all paths from AA to BB. Then the integral CFdr\int_C \vec F \cdot d\vec r is path independent in DD and the field F\vec F is conservative on DD.

To make sure that the following computations and results are valid, we assume:

  • the curves are piecewise smooth.

  • the vector fields F\vec F have continuous first partial derivatives.

  • the domains DD are connected (a smooth curve connects any two points). Some results require DD to be simply connected (every loop in DD can be contracted to a point in DD).

Note that

  • A donut is connected but not simply connected.

  • The set of two disjoint cubics is simply connected but not connected.

Conservative fields are gradient fields

Theorem (Theorem 2)

Let F=Mi+Nj+Pk\vec F = M \vec i + N \vec j + P \vec k be a vector field with continuous components throughout an open connected region DD in space. Then F\vec F is conservative if and only if F\vec F is a gradient field f\nabla f for a differentiable function ff.

The theorem is prove by constructing the function f\color{red}{f}.

Example: Find the work done by the conservative field F=yzi+xzj+xyk=f, where f(x,y,z)=xyz.\vec F=yz\vec i+xz\vec j+xy\vec k=\nabla f, \mbox{ where }f(x,y,z)=xyz.along any smooth curve CC joining the point A(1,3,9)A(-1, 3, 9) to B(1,6,4)B(1, 6, -4).

Solution: The work done is CFdr=f(1,6,4)f(1,3,9)=24(27)=3.\int_C\vec F\cdot d\vec r = f(1,6,-4)-f(-1,3,9)=-24-(-27)=3.

Loop property of conservative fields

We let \oint denote the integration around a closed path.

Theorem

The following statements are equivalent:

  • CFdr=0\oint_C\vec F\cdot d\vec r = 0 around every loop (that is, closed curve CC) in DD.

  • The field F\vec F is conservative on DD.

Summary F=f on DF conservative on DCFdr=0 over any loop in D\begin{align*} \vec F=\nabla f\mbox{ on }D \Leftrightarrow \vec F\mbox{ conservative on }D\Leftrightarrow \oint_C\vec F\cdot d\vec r=0\mbox{ over any loop in }D \end{align*}

How do we find the function ff?

Finding potentials for conservative fields

Let F=M(x,y,z)i+N(x,y,z)j+P(x,y,z)k\vec F = M(x, y, z)\vec i + N(x, y, z)\vec j + P(x, y, z)\vec k be a field on an open simply connected domain whose component functions have continuous first partial derivatives. Then, F\vec F is conservative if and only if Py=Nz, Mz=Px, Nx=My{\partial P\over\partial y}={\partial N\over\partial z},~{\partial M\over\partial z}={\partial P\over\partial x},~{\partial N\over\partial x}={\partial M\over\partial y}

Example: Show that F=(excosy+yz)i+(xzexsiny)j+(xy+z)k\vec F = (e^x \cos y + yz)\vec i + (xz - e^x \sin y)\vec j + (xy + z)\vec k is conservative over its natural domain and find a potential function for it.

Solution:

f(x,y,z)=excosy+yzdx=excosy+yzx+g(y,z)fy(x,y,z)=exsiny+xz+gy(y,z)=xzexsinygy(y,z)=0g(y,z)=h(z)fz(x,y,z)=xy+h(z)=xy+zh(z)=12z2+Cf(x,y,z)=excosy+yzx+12z2+C\begin{align*} f(x,y,z)=\int e^x\cos y+yzdx=e^x\cos y+yzx+g(y,z)\\ f_y(x,y,z)=-e^x\sin y+xz+ g_y(y,z)=xz-e^x\sin y\\ \Rightarrow g_y(y,z)=0\Rightarrow g(y,z)=h(z) \\ f_z(x,y,z)=xy+h'(z)=xy+z\\ \Rightarrow h(z)={1\over 2}z^2+C\\ f(x,y,z)=e^x\cos y+yzx+{1\over 2}z^2+C \end{align*}

Example: Show that F=(2x3)izj+(cosz)k\vec F = (2x - 3)\vec i - z \vec j + (\cos z)\vec k is not conservative.

Solution: Nz=10=Py\begin{align*} {\partial N\over \partial z}=-1 \neq 0 = {\partial P\over \partial y} \end{align*}

Example: Show that the vector field F=yx2+y2i+xx2+y2j+0k\vec F={-y\over x^2+y^2}\vec i+{x\over x^2+y^2}\vec j+0\vec ksatisfies the equations in the component test but is not conservative over its natural domain. Explain why this is possible.

Solution: Let r(t)=costi+sintj+0k\vec r(t)=\cos t\vec i+\sin t \vec j+0\vec k for 0t2π0\leq t\leq 2\pi, then we have CFdr=02πsint(sint)+costcostdt=2π.\begin{align*} \int_C\vec F\cdot d\vec r=\int_0^{2\pi}{-\sin t}\cdot (-\sin t)+{\cos t}\cdot \cos t dt=2\pi. \end{align*} f(x,y,z)=tan1(x/y)f(x,y,z)=\tan^{-1}(x/y)

reset() var('x, y, z, t') r = vector((cos(t), sin(t), 0)) show('r(t) =', r, 'for 0 <= t <= 2*pi') F(t) = vector((-r[1]/(r[0]^2+r[1]^2), r[0]/(r[0]^2+r[1]^2), 0)) # Note that the index starts at 0. show('F(t) =', F(t)) res = integral(F(t).dot_product(diff(r,t)), t, 0, 2*pi) print('The work done is', res.full_simplify())

r(t) =(cos(t),sin(t),0)for 0 <= t <= 2*pi\displaystyle \verb|r(t)|\verb| |\verb|=| \left(\cos\left(t\right),\,\sin\left(t\right),\,0\right) \verb|for|\verb| |\verb|0|\verb| |\verb|<=|\verb| |\verb|t|\verb| |\verb|<=|\verb| |\verb|2*pi|

F(t) =(sin(t)cos(t)2+sin(t)2,cos(t)cos(t)2+sin(t)2,0)\displaystyle \verb|F(t)|\verb| |\verb|=| \left(-\frac{\sin\left(t\right)}{\cos\left(t\right)^{2} + \sin\left(t\right)^{2}},\,\frac{\cos\left(t\right)}{\cos\left(t\right)^{2} + \sin\left(t\right)^{2}},\,0\right)

The work done is 2*pi

Exact differential forms

Definition Any expression M(x,y,z)dx+N(x,y,z)dy+P(x,y,z)dzM(x, y, z) dx + N(x, y, z) dy + P(x, y, z) dz is a differential form. A differential form is exact on a domain DD in space if Mdx+Ndy+Pdz=fxdx+fydy+fzdz=dfM dx + N dy + P dz = {\partial f\over\partial x}dx+{\partial f\over\partial y}dy+{\partial f\over\partial z}dz=df for some scalar function ff throughout DD.

The differential form Mdx+Ndy+PdzMdx+Ndy+Pdz is exact if and only if F=Mi+Nj+Pk\vec F=M\vec i+N\vec j+P\vec k is conservative.

Example: Show that ydx+xdy+4dzydx+xdy+4dz is exact and evaluate the integral

(1,1,1)(2,3,1)ydx+xdy+4dz\int_{(1,1,1)}^{(2,3,-1)}ydx+xdy+4dz

over any path from (1,1,1)(1,1,1) to (2,3,1)(2,3,-1).

Solution: f(x,y,z)=xy+g(y,z),gy(y,z)=0,g(y,z)=h(z)h(z)=4z+C,f(x,y,z)=xy+4z+C\begin{align*} f(x,y,z)=xy+g(y,z),\quad g_y(y,z)=0,\quad g(y,z)=h(z)\\ h(z)=4z+C,\quad f(x,y,z)=xy+4z+C \end{align*}