Line Integral Preview — Theory
1. What is a line integral?
A line integral adds up values along a curve. The curve is usually written as a parametric path
\(\mathbf r(t)\). In two dimensions,
\[
\mathbf r(t)=\langle x(t),y(t)\rangle,
\qquad
a\le t\le b.
\]
In three dimensions,
\[
\mathbf r(t)=\langle x(t),y(t),z(t)\rangle,
\qquad
a\le t\le b.
\]
2. Scalar line integral
A scalar line integral has the form
\[
\int_C f\,ds.
\]
It accumulates a scalar field \(f\) along the curve \(C\). If the curve is parametrized by
\(\mathbf r(t)\), then
\[
\int_C f\,ds
=
\int_a^b
f(\mathbf r(t))\|\mathbf r'(t)\|\,dt.
\]
The factor \(\|\mathbf r'(t)\|\) converts the parameter change \(dt\) into arc length \(ds\).
3. Vector line integral
A vector line integral has the form
\[
\int_C \mathbf F\cdot d\mathbf r.
\]
If
\[
\mathbf F=\langle P,Q,R\rangle,
\qquad
\mathbf r(t)=\langle x(t),y(t),z(t)\rangle,
\]
then
\[
\int_C \mathbf F\cdot d\mathbf r
=
\int_a^b
\mathbf F(\mathbf r(t))\cdot\mathbf r'(t)\,dt.
\]
In component form,
\[
\mathbf F(\mathbf r(t))\cdot\mathbf r'(t)
=
P\frac{dx}{dt}
+
Q\frac{dy}{dt}
+
R\frac{dz}{dt}.
\]
4. Work interpretation
If \(\mathbf F\) is a force field, then the vector line integral gives work:
\[
W=\int_C \mathbf F\cdot d\mathbf r.
\]
The dot product measures the part of the force that points in the direction of motion.
If the field points with the motion, the work is positive. If it points against the motion,
the work is negative.
5. Orientation matters for vector line integrals
A vector line integral depends on the direction in which the curve is traveled. Reversing the path
changes the sign:
\[
\int_{-C}\mathbf F\cdot d\mathbf r
=
-\int_C\mathbf F\cdot d\mathbf r.
\]
This is different from scalar line integrals. For scalar line integrals, reversing the path does
not change the value:
\[
\int_{-C}f\,ds
=
\int_C f\,ds.
\]
6. Example: vector field around the unit circle
Consider
\[
\mathbf F=\langle y,-x\rangle
\]
along the unit circle
\[
\mathbf r(t)=\langle \cos t,\sin t\rangle,
\qquad
0\le t\le 2\pi.
\]
Differentiate the path:
\[
\mathbf r'(t)=\langle -\sin t,\cos t\rangle.
\]
Substitute into the field:
\[
\mathbf F(\mathbf r(t))
=
\langle \sin t,-\cos t\rangle.
\]
Now compute the dot product:
\[
\mathbf F(\mathbf r(t))\cdot\mathbf r'(t)
=
\sin t(-\sin t)+(-\cos t)(\cos t)
=
-1.
\]
Therefore,
\[
\int_C\mathbf F\cdot d\mathbf r
=
\int_0^{2\pi}-1\,dt
=
-2\pi.
\]
7. Example: scalar line integral around the unit circle
Let
\[
f(x,y)=x^2+y^2
\]
and use the same unit circle
\[
\mathbf r(t)=\langle \cos t,\sin t\rangle.
\]
Along the circle,
\[
f(\mathbf r(t))
=
\cos^2 t+\sin^2 t
=
1.
\]
Also,
\[
\|\mathbf r'(t)\|
=
\sqrt{(-\sin t)^2+(\cos t)^2}
=
1.
\]
So
\[
\int_C f\,ds
=
\int_0^{2\pi}1\,dt
=
2\pi.
\]
9. Numerical integration
Many line integrals are difficult to compute exactly. A calculator can approximate them by
evaluating the integrand at many points and applying a numerical rule.
Composite Simpson rule is often accurate for smooth functions:
\[
\int_a^b g(t)\,dt
\approx
\frac{h}{3}
\left[
g(t_0)
+
4g(t_1)
+
2g(t_2)
+
\cdots
+
4g(t_{n-1})
+
g(t_n)
\right],
\]
where \(n\) is even and \(h=(b-a)/n\).
10. Conservative fields
If a vector field is conservative, then \(\mathbf F=\nabla \phi\) for some potential function
\(\phi\). In that case, the line integral depends only on the endpoints:
\[
\int_C \nabla \phi\cdot d\mathbf r
=
\phi(\mathbf r(b))-\phi(\mathbf r(a)).
\]
For non-conservative fields, the path itself matters.
11. Common mistakes
- Confusing scalar and vector line integrals: scalar mode uses \(f\,ds\), while vector mode uses \(\mathbf F\cdot d\mathbf r\).
- Forgetting the speed factor: scalar line integrals require \(\|\mathbf r'(t)\|\).
- Forgetting the dot product: vector line integrals require \(\mathbf F(\mathbf r(t))\cdot\mathbf r'(t)\).
- Ignoring orientation: reversing a vector line integral changes its sign.
- Using the wrong parameter interval: the interval controls which part of the path is traveled.
- Assuming every field is conservative: only conservative fields allow endpoint-only evaluation.
- Using too few panels: sharp curves or rapidly changing fields need more panels for a stable numerical answer.