Hour Test Three
Pre-test Motto : Think before you calculate
Problem 1
Let $C$ be a parametrization of the line from $(1, 0)$ to $(0, 2)$.
Find a parametrization of the line segment.
Compute the line integral $\int_C \mathbf{F}\cdot\, d\mathbf{s}$ for the vector field: $\mathbf{F}(x,y) = \langle x y, y^2\rangle.$
In[1]:=
ParametricPlot@H1 - tL 81, 0< + t 80, 2<, 8t, - 1, 1.5<D
3
2
1
Out[1]=
-0.5
0.5
1.0
1.5
2.0
-1
-2
In[25]:=
Expand@H1 - tL 81, 0< + t 80, 2<D
c@t_D = H1 - tL 81, 0< + t 80, 2<
Out[25]=
81 - t, 2 t<
Out[26]=
81 - t, 2 t<
In[39]:=
H8x y, y ^ 2< ê. 8x Ø 1 - t, y Ø 2 t<L
c '@tD
H8x y, y ^ 2< ê. 8x Ø 1 - t, y Ø 2 t<L.c '@tD
Integrate@H8x y, y ^ 2< ê. 8x Ø 1 - t, y Ø 2 t<L.c '@tD, tD
Integrate@H8x y, y ^ 2< ê. 8x Ø 1 - t, y Ø 2 t<L.c '@tD, 8t, 0, 1<D
Out[39]=
92 H1 - tL t, 4 t2 =
Out[40]=
8- 1, 2<
Out[41]=
- 2 H1 - tL t + 8 t2
Out[42]=
- t2 +
10 t3
3
7
Out[43]=
3
Problem Two
2
11f58t3Ans.nb
Problem Two
Consider the vector field $\mathbf{F}(x,y,z)=y z\mathbf{i}+x z\mathbf{j}+x y\mathbf{k}$.
Compute the line integral of $\mathbf{F}$ along the twisted cubic, $C(t)=(t,t^2,t^3), 0\le t\le 1$.
Note: F[x,y,z] is the gradient of f[x,y,z] = x y z
By the chain rule for the gradient along a curve the line integral is f[1,1,1] - f[0,0,0] = 1
or
Integrate@H8y z, x z, x y< ê. 8x Ø t, y Ø t ^ 2, z Ø t ^ 3<L.81, 2 t, 3 t ^ 2<, 8t, 0, 1<D
1
Problem Three
Consider the function $f(x,y) = xy^3 - x^2 -2x $.
In[9]:=
Out[9]=
f@x_, y_D = x y ^ 3 - x ^ 2 - 2 x
- 2 x - x2 + x y3
Find the gradient vector field of $f$.
In[8]:=
Out[8]=
8D@f@x, y, zD, xD, D@f@x, y, zD, yD<
9- 2 - 2 x + y3 , 3 x y2 =
Compute, by any method, the line integral of the gradient vector field of $f$ along the straight line segment from (1,0) to (0,1).
Answer: The chain rule along a path for a gradient vector field yield that the line integral is the difference of the potiential
function values at the end points.
In[10]:=
f@0, 1D - f@1, 0D
Out[10]=
3
or, the hard way,
In[55]:=
9- 2 - 2 x + y3 , 3 x y2 = ê. 8x Ø 1 - t, y Ø t<
D@81 - t, t<, tD
I9- 2 - 2 x + y3 , 3 x y2 = ê. 8x Ø 1 - t, y Ø t<M.D@81 - t, t<, tD
Integrate@%, 8t, 0, 1<D
Out[55]=
9- 2 - 2 H1 - tL + t3 , 3 H1 - tL t2 =
Out[56]=
8- 1, 1<
Out[57]=
2 + 2 H1 - tL + 3 H1 - tL t2 - t3
Out[58]=
3
Determine whether or not $\int_C \mathbf{F}\cdot\, d\mathbf{s}$ is \textit{independent of path}. (Give a written justification).
Answer: A gradient vector field is independent of path (e.g. conservative) by using chain rule along a path for a gradient and the
Fundamental Theorem of Calculus to compute the line integral as the difference of the potiential function values at the end points.
11f58t3Ans.nb
3
Determine whether or not $\int_C \mathbf{F}\cdot\, d\mathbf{s}$ is \textit{independent of path}. (Give a written justification).
Answer: A gradient vector field is independent of path (e.g. conservative) by using chain rule along a path for a gradient and the
Fundamental Theorem of Calculus to compute the line integral as the difference of the potiential function values at the end points.
Let $\mathbf{c}(t)= (cos(t), sin(t)), 0\le t\le \pi/2$. Compute, by any method, $\int_C \mathbf{F}\cdot\, d\mathbf{s}$ and
compare with the value computed in part b)?
Answer: The chain rule along a path for a gradient vector field yield that the line integral is the difference of the potiential
function values at the end points.
In[11]:=
f@Cos@Pi ê 2D, Sin@Pi ê 2DD - f@Cos@0D, Sin@0DD
Out[11]=
3
Answer: The value for b) and d) are the same, as it must be for "independence of path." Alternatively:
In[59]:=
9- 2 - 2 x + y3 , 3 x y2 = ê. 8x Ø Cos@tD, y Ø Sin@tD<
%.D@8Cos@tD, Sin@tD<, tD
IntegrateA3 Cos@tD2 Sin@tD2 - Sin@tD I- 2 - 2 Cos@tD + Sin@tD3 M, tE
IntegrateA3 Cos@tD2 Sin@tD2 - Sin@tD I- 2 - 2 Cos@tD + Sin@tD3 M, 8t, 0, Pi ê 2<E
Out[59]=
9- 2 - 2 Cos@tD + Sin@tD3 , 3 Cos@tD Sin@tD2 =
Out[60]=
3 Cos@tD2 Sin@tD2 - Sin@tD I- 2 - 2 Cos@tD + Sin@tD3 M
Out[61]=
- 2 Cos@tD - Cos@tD2 +
Out[62]=
3
1
4
Sin@2 tD -
1
8
Sin@4 tD
Problem Four
Let $\mathbf{F}(x,y,z) = \langle y^3, 3xy^2, 2z\rangle$ be a vector field.
Find a potential function $f$ for $F$.
Integrate@y ^ 3, xD
x y3
Note that Mathematica forgets the constant in x possibility; e.g. the g[y,z] part.
Differentiating: x y^3 + g[y,z] with respect to y, we obtain:
3 x y^2 + partial D[g[y,z],y]
Comparison with the second component of F, partial D[g[y,z],y], hence g is constant in y and is really depends only on z: g[z]
The last step: Differentiating: x y^3 + g[z] with respect to z, we obtain: partial D[g[z],z]
Comparison with the third component of F: 2z, we must anti-differentiate 2z, giving z^2 + Constant
In[2]:=
Out[2]=
f@x_, y_, z_D = x y ^ 3 + z ^ 2 + constant
constant + x y3 + z2
Let $C$ be a parametrization of the line from $(0,0,0)$ to $(2,3,5)$ and find the value of the line integral $\int_C \langle y^3,
3xy^2, 2z\rangle\cdot \, d\mathbf{s}$
Answer: You could parametrize the line and compute the integral. However, you have just found a potential function: the line
integral is the difference of the values of a potential function at the endpoints: f[2,3,5] - f[0,0,0]
4
11f58t3Ans.nb
Answer: You could parametrize the line and compute the integral. However, you have just found a potential function: the line
integral is the difference of the values of a potential function at the endpoints: f[2,3,5] - f[0,0,0]
In[3]:=
f@2, 3, 5D - f@0, 0, 0D
Out[3]=
79
In[15]:=
s@t_D = 82 t, 3 t, 5 t<
8y ^ 3, 3 x y ^ 2, 2 z< ê. 8x Ø 2 t, y Ø 3 t, z Ø 5 t<
Out[15]=
82 t, 3 t, 5 t<
Out[16]=
927 t3 , 54 t3 , 10 t=
In[46]:=
927 t3 , 54 t3 , 10 t=.D@82 t, 3 t, 5 t<, tD
IntegrateA927 t3 , 54 t3 , 10 t=.D@82 t, 3 t, 5 t<, tD, tE
IntegrateA927 t3 , 54 t3 , 10 t=.D@82 t, 3 t, 5 t<, tD, 8t, 0, 1<E
Out[46]=
50 t + 216 t3
Out[47]=
25 t2 + 54 t4
Out[48]=
79
© Copyright 2026 Paperzz