Let C be the curve defined parametrically with C= \vec s(t) =\lt 3 \cos (t),\, 3 \sin (t),\, 4t \gt, t \in [0,2\pi ].
Problem 1. Find the length of the curve C. YouTube Video
Problem 2. Find the line integral of the function f(x,y,z)=\frac{1}{x^2+y^2+z^2} over C. YouTube Video
Other Sage pages for Line Integral of Function: SOLVER Example 2
Formula Sheet Arc Length is: L=\int_C \, ds and Line Integral is: I=\int_C \, f \, ds.
Formula for 1: L=\int_C \, ds = \int_{t_1}^{t_2}\, \sqrt{{\dot{x}}^2 + {\dot{y}}^2 + {\dot{z}}^2} \, dt That is, f=1. See also: Arc Length of Curve in 3D
Formula for 2: I=\int_C \, \frac{ds}{x^2+y^2+z^2} = \int_{t_1}^{t_2}\, \frac{1}{ [x(t)]^2+[y(t)]^2+[z(t)]^2} \cdot \sqrt{{\dot{x}}^2 + {\dot{y}}^2 + {\dot{z}}^2} \, dt
Preparation for using the SOLVER. The curve C is already parameterized and we have the interval for t. Visualization below. Click and drag to see!
|
|
This is called a helix. Click and drag the graph so that you see the projection onto x0y is a circle. This is because the coefficients of x(t) and y(t) are equal r=3. If they were different, the helix would be eliptical. The coefficient h=4 on z(t) determines the height (stretch) of the helix.
For fun, we draw points on the curve that are evenly spaced with respect to t.
Notice that they appear to be evenly spaced on the helix itself. If so, then ds=constant ·dt
|
|
SOLVER: Our program follows the hand solution method. Everything in red requires something particular to your problem!
\newcommand{\Bold}[1]{\mathbf{#1}}t \newcommand{\Bold}[1]{\mathbf{#1}}\left(x, y, z\right) \newcommand{\Bold}[1]{\mathbf{#1}}t \newcommand{\Bold}[1]{\mathbf{#1}}\left(x, y, z\right) |
|
|
Step 2: The program finds the vector function with the derivatives: d \vec s(t)=\lt {\dot{x}},\, {\dot{y}},\, {\dot{z}} \gt
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-3 \, \sin\left(t\right),\,3 \, \cos\left(t\right),\,4\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-3 \, \sin\left(t\right),\,3 \, \cos\left(t\right),\,4\right)
|
Step 3: The program calculates the magnitude of the vector function ds(t): \left\| {ds} \right\| = norm of ds = nds= \sqrt{{\dot{x}}^2 + {\dot{y}}^2 + {\dot{z}}^2}
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}
|
Our problem - look carefully at this: nds=\sqrt{9 \sin^2(t)+9 \cos^2(t)+16}=\sqrt{9+16}=\sqrt{9+16}=5 is a CONSTANT as we predicted from the "evenly spaced" points on the helix.
Step 4: The program defines a standard sage function for "change of variables" for a 1-variable parametrization (surface).
The program changes the variables of f from a function of (x,y,z) to a function of t using s(t).
|
|
\newcommand{\Bold}[1]{\mathbf{#1}}1
\newcommand{\Bold}[1]{\mathbf{#1}}1
|
Step 5: Then program finds the product of f and ds (the magnitude from step 3).
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}
|
Step 6: The program computes the integral.
\newcommand{\Bold}[1]{\mathbf{#1}}10 \, \pi
\newcommand{\Bold}[1]{\mathbf{#1}}10 \, \pi
|
\newcommand{\Bold}[1]{\mathbf{#1}}31.4159265358979
\newcommand{\Bold}[1]{\mathbf{#1}}31.4159265358979
|
Answer: The length of the curve C is: L=10 \pi ≈ 31.42
Notice the height of the vertical lines is constant = 5. This is nds.
There are lots of fun things to think about here. How does the radius of the helix (r=3) and the height of the helix (h=4) affect the length of the helix? What if the helix was elliptical?
We graph the integral. The length of the curve is the "area" captured by the vertical lines (divided by the vector scale).
Here the vector scale = vs = 1. Since f=1, height of the lines is the "rate of curve per unit t".
We saw above nds=5 and here below that the curve curves at a constant "rate" of 5. Multiplied by the length of the interval 2\pi, which is the length of the curve.
|
|
|
|
SOLVER: Problem 2 Find line integral of the function f(x,y,z)=\frac{1}{x^2+y^2+z^2} over C.
So that SAGE does not get confused we concat a "1" to every variable name (even the ones that don't change).
Step 1: We define C as s(t), input our interval on t and define f(x,y,z). Changes with problem; you must input your parametrization in C as s(t), your interval for t and your function of f(x,y,z).
|
|
Step 2: The program finds the vector function with the partial derivatives: ds(t)=\lt {\dot{x}},\, {\dot{y}},\, {\dot{z}} \gt
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-3 \, \sin\left(t\right),\,3 \, \cos\left(t\right),\,4\right)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(-3 \, \sin\left(t\right),\,3 \, \cos\left(t\right),\,4\right)
|
Step 3: The program calculates the magnitude of the vector function Cprime: \left\| {ds} \right\| = norm of ds = nds= \sqrt{{\dot{x}}^2 + {\dot{y}}^2 + {\dot{z}}^2}
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}
\newcommand{\Bold}[1]{\mathbf{#1}}\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}
|
As above - for this problem, nds=\sqrt{9 \sin^2(t)+9 \cos^2(t)+16}=\sqrt{9+16}=\sqrt{9+16}=5 is a CONSTANT.
Step 4: The program defines a standard sage function for "change of variables" for a 1-variable parametrization (surface).
The program changes the variables of f from a function of (x,y,z) to a function of t using s(t).
|
|
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{16 \, t^{2} + 9 \, \sin\left(t\right)^{2} + 9 \, \cos\left(t\right)^{2}}
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{16 \, t^{2} + 9 \, \sin\left(t\right)^{2} + 9 \, \cos\left(t\right)^{2}}
|
Step 5: Then program finds the product of f and ds (the magnitude from step 3).
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}}{16 \, t^{2} + 9 \, \sin\left(t\right)^{2} + 9 \, \cos\left(t\right)^{2}}
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{\sqrt{{\left| -3 \, \sin\left(t\right) \right|}^{2} + {\left| 3 \, \cos\left(t\right) \right|}^{2} + 16}}{16 \, t^{2} + 9 \, \sin\left(t\right)^{2} + 9 \, \cos\left(t\right)^{2}}
|
\newcommand{\Bold}[1]{\mathbf{#1}}\int_{0}^{2 \, \pi} \frac{\sqrt{9 \, {\left| \sin\left(t\right) \right|}^{2} + 9 \, {\left| \cos\left(t\right) \right|}^{2} + 16}}{16 \, t^{2} + 9 \, \sin\left(t\right)^{2} + 9 \, \cos\left(t\right)^{2}}\,{d t}
\newcommand{\Bold}[1]{\mathbf{#1}}\int_{0}^{2 \, \pi} \frac{\sqrt{9 \, {\left| \sin\left(t\right) \right|}^{2} + 9 \, {\left| \cos\left(t\right) \right|}^{2} + 16}}{16 \, t^{2} + 9 \, \sin\left(t\right)^{2} + 9 \, \cos\left(t\right)^{2}}\,{d t}
|
\newcommand{\Bold}[1]{\mathbf{#1}}0.604996767986
\newcommand{\Bold}[1]{\mathbf{#1}}0.604996767986
|
Answer: I=\int_C \, \frac{ds}{x^2+y^2+z^2} \approx 0.60
BTW: This is actually an elementary integral. I=\int_0^{2 \pi} \, \frac{dt}{16t^2+9}=\frac{5}{12} \cdot \arctan ({\frac{8 \pi}{3}})
Thinking: If the function f describes the "thickness" of the helix, how would you describe what is happening?
We graph the integral. The value of the line integral is the "area" captured by the vertical lines (divided by the vector scale).
Here the vector scale = vs = 1. However f \ne 1. We know that the curve curves at a constant "amount" of 5.
Divide the heights of the lines by this 5 and you get the value of f at that point on the curve.
|
|
Think of f as giving the "thickness" of the curve (however f can be negative so this is not always a good analogy - see next example).
Then the line integral \int_C \,f\,ds is the amount of 2d area of a piece of paper whose height is f and curled along curve.
For fun, we draw a "sort of" representation of this by mapping f vertically. (Notice that we have exagerated this thickness x10 with the vector_scale.)
|
|
|
|
|
|