Suppose we chop a curve into tiny pieces and form the sum $\displaystyle\sum f(x_i^*, y_i^*)\,\Delta_i x$. As the partition gets finer, this converges to the line integral $\int_C f\,dx$. Drag the slider to watch it happen.

We defined line integrals as limits of sums. But how do we actually compute them? It turns out there's a clean reduction to ordinary integrals - parametrize the curve and substitute.

Parametrize, Then Integrate

Here's the key idea, and it's surprisingly simple. We have a curve $C$ given by $x = \phi(t),\; y = \psi(t),\; h \le t \le k$, and we want $\int_C f(x,y)\,dx$.

Look at one piece of the Riemann sum. The $i$-th increment in $x$ is

$\Delta_i x = x_i - x_{i-1} = \phi(t_i) - \phi(t_{i-1}) \approx \phi'(t_i^*)\,\Delta t$

by the Mean Value Theorem. So each term $f(x_i^*, y_i^*)\,\Delta_i x$ becomes $f(\phi(t_i^*), \psi(t_i^*))\,\phi'(t_i^*)\,\Delta t$ - and that's just a Riemann sum for an ordinary single-variable integral!

$$\int_C f(x,y)\,dx = \int_h^k f[\phi(t), \psi(t)]\,\phi'(t)\,dt$$

Similarly, replacing $\Delta_i x$ with $\Delta_i y$ gives us $\psi'(t)$ instead of $\phi'(t)$:

$$\int_C f(x,y)\,dy = \int_h^k f[\phi(t), \psi(t)]\,\psi'(t)\,dt$$

The parametrization converts curve geometry into calculus you already know. No new integration techniques - just substitution.

Concrete example

Let $C$ be the line segment $y = x$ from $(0,0)$ to $(1,1)$. Compute $\int_C y^2\,dx$.

Parametrize: $x = t,\; y = t,\; 0 \le t \le 1$. Then $dx = dt$, and

$\displaystyle\int_C y^2\,dx = \int_0^1 t^2\,dt = \frac{1}{3}$

Clean and verifiable. Let's also try it on the parabola $y = x^2$ from $(0,0)$ to $(1,1)$: $x = t,\; y = t^2,\; 0 \le t \le 1$, so $dx = dt$ and $y^2 = t^4$.

$\displaystyle\int_C y^2\,dx = \int_0^1 t^4\,dt = \frac{1}{5}$

Different curve, different answer. The path matters.

Direction Matters

What happens if we traverse the same curve backwards?

Reversing the direction swaps the integration limits: $\int_h^k$ becomes $\int_k^h$. That's a sign flip. So:

$$\int_{-C} P\,dx + Q\,dy \;=\; -\int_C P\,dx + Q\,dy$$

Try it. Below is a quarter-circle with $P(x,y) = y^2,\; Q = 0$. Toggle the direction and watch the component integral flip sign, while the arc-length integral $\int_C y^2\,ds$ stays put.

$\int P\,dx + Q\,dy$
$\int f\,ds$

The trap: This is a common source of sign errors. Component integrals ($\int P\,dx$, $\int Q\,dy$) flip sign when you reverse direction. Arc-length integrals ($\int f\,ds$) don't - because $|r'(t)|$ absorbs the sign. Know which one you're computing.

Closed Curves and the Circle Integral

A simple closed curve starts and ends at the same point without crossing itself. For such curves, there's no "start" or "end" - only a direction.

We pick counterclockwise as positive (the interior is on your left as you walk). The notation is $\oint_C P\,dx + Q\,dy$.

A revealing example

Let $C$ be the unit circle, traversed counterclockwise. Compute $\oint_C (-y\,dx + x\,dy)$.

Parametrize: $x = \cos t,\; y = \sin t,\; 0 \le t \le 2\pi$. Then $dx = -\sin t\,dt,\; dy = \cos t\,dt$.

$\displaystyle\oint_C (-y\,dx + x\,dy) = \int_0^{2\pi} \bigl(\sin^2 t + \cos^2 t\bigr)\,dt = \int_0^{2\pi} 1\,dt = 2\pi$

That's exactly the area enclosed by the circle. Coincidence? Not at all - this is a preview of Green's theorem (§5.5).

Piecewise Paths

Real paths are often piecewise: line segments and arcs joined together. The rule is simple - just add the integrals along each piece.

Example: Broken line vs. parabola

Compute $\int_C y^2\,dx + x^2\,dy$ along two different paths from $(0,0)$ to $(1,1)$.

Path 1: Broken line $(0,0) \to (1,0) \to (1,1)$.

Path 2: Parabola $y = x^2$ from $(0,0)$ to $(1,1)$.

Different paths, different answers: $1$ vs. $7/10$. The value depends on the path - unless very special conditions hold (§5.6, exactness).

Broken line: integral = 1
Parabola: integral = 7/10

Exact Differentials on a Triangular Path

So far our piecewise example gave different answers on different paths. But what if the integrand has a special structure? Let's try $y\,dx + x\,dy$ on a closed triangular path and predict the answer before computing.

The problem: Compute $\displaystyle\int_C y\,dx + x\,dy$ around the triangle $(0,0) \to (1,0) \to (1,1) \to (0,0)$.

Prediction: Notice that $y\,dx + x\,dy = d(xy)$. If this is an exact differential, the integral around any closed path should be... zero. Let's verify segment by segment.

Segment 1: $(0,0) \to (1,0)$

Along the $x$-axis: $y = 0$, $dy = 0$. Both terms vanish.

$\displaystyle\int_{\text{Seg 1}} y\,dx + x\,dy = 0$

Segment 2: $(1,0) \to (1,1)$

Vertical line: $x = 1$, $dx = 0$. The $y\,dx$ term vanishes and $x\,dy = 1 \cdot dy$.

$\displaystyle\int_{\text{Seg 2}} y\,dx + x\,dy = \int_0^1 1\,dy = 1$

Segment 3: $(1,1) \to (0,0)$

Parametrize: $x = 1-t,\; y = 1-t,\; 0 \le t \le 1$. Then $dx = -dt,\; dy = -dt$.

$\displaystyle\int_{\text{Seg 3}} y\,dx + x\,dy = \int_0^1 \bigl[(1-t)(-1) + (1-t)(-1)\bigr]\,dt = -2\int_0^1 (1-t)\,dt = -2 \cdot \frac{1}{2} = -1$

Total

$$\oint_C y\,dx + x\,dy = 0 + 1 + (-1) = 0 \quad\checkmark$$

Zero. Exactly as predicted. An exact differential integrates to zero around any closed path. We'll formalize this in §5.6, but the pattern is already clear: if your integrand is $d(\text{something})$, the closed-loop integral depends only on the endpoints - which for a closed path are the same point.

Trap: On piecewise paths, orientation matters. Reversing a segment flips its sign. And at corners, the parametrization changes but continuity of the curve must hold - each segment's endpoint must match the next segment's start.

Straight-Line Evaluation

Straight-line paths are the simplest to parametrize, and they come up constantly. Let's do a clean example from scratch.

Problem: Evaluate $\displaystyle\int_C (x + y)\,dx$ from $(0,0)$ to $(1,2)$ along the straight line connecting them.

Parametrize: The line from $(0,0)$ to $(1,2)$ is $x = t,\; y = 2t,\; 0 \le t \le 1$. So $dx = dt$.

Substitute:

$\displaystyle\int_C (x + y)\,dx = \int_0^1 (t + 2t)\,dt = \int_0^1 3t\,dt = \frac{3t^2}{2}\Bigg|_0^1 = \frac{3}{2}$

$$\int_C (x+y)\,dx = \frac{3}{2}$$

Three steps: parametrize, substitute, evaluate. On a straight line, the parametrization is always linear, so the integrand reduces to a polynomial in $t$.

Practice Problems - §5.2

From Kaplan, problems after §5.3

2(a) $\displaystyle\int_C y^2\,dx + x^2\,dy$,  $C$: semicircle $x = \sqrt{1 - y^2}$ from $(1,0)$ to $(0,1)$
Evaluate $\displaystyle\int_C y^2\,dx + x^2\,dy$ where $C$ is the right semicircle $x = \sqrt{1 - y^2}$ from $(1,0)$ to $(0,1)$.
Step 1: Parametrize.
Use $x = \cos t,\; y = \sin t,\; 0 \le t \le \pi/2$. Then $dx = -\sin t\,dt,\; dy = \cos t\,dt$.
Step 2: Substitute.
$\displaystyle\int_0^{\pi/2} \bigl[\sin^2 t(-\sin t) + \cos^2 t(\cos t)\bigr]\,dt = \int_0^{\pi/2} (-\sin^3 t + \cos^3 t)\,dt$.
Step 3: Evaluate each piece.
$\displaystyle\int_0^{\pi/2} \cos^3 t\,dt = \int_0^{\pi/2}(1-\sin^2 t)\cos t\,dt = \Bigl[\sin t - \frac{\sin^3 t}{3}\Bigr]_0^{\pi/2} = 1 - \frac{1}{3} = \frac{2}{3}$.
$\displaystyle\int_0^{\pi/2} \sin^3 t\,dt = \int_0^{\pi/2}(1-\cos^2 t)\sin t\,dt = \Bigl[-\cos t + \frac{\cos^3 t}{3}\Bigr]_0^{\pi/2} = (0+0)-(-1+\tfrac{1}{3}) = \frac{2}{3}$.
Result: $-\dfrac{2}{3} + \dfrac{2}{3} = 0$.
2(b) $\displaystyle\int_C y\,dx + x\,dy$,  $C$: parabola $y = x^2$ from $(0,0)$ to $(1,1)$
Evaluate $\displaystyle\int_C y\,dx + x\,dy$ where $C$ is the parabola $y = x^2$ from $(0,0)$ to $(1,1)$.
Step 1: Parametrize.
Use $x$ as parameter: $y = x^2,\; dy = 2x\,dx,\; 0 \le x \le 1$.
Step 2: Substitute.
$\displaystyle\int_0^1 (x^2\,dx + x \cdot 2x\,dx) = \int_0^1 3x^2\,dx = \bigl[x^3\bigr]_0^1 = 1$.
Step 3: Spot the pattern.
Notice that $y\,dx + x\,dy = d(xy)$. So the integral is $[xy]_{(0,0)}^{(1,1)} = 1 \cdot 1 - 0 = 1$. Path-independent! We'll understand why in §5.6: the integrand is an exact differential.
3(a) $\displaystyle\oint_C y^2\,dx + xy\,dy$,  $C$: square with vertices $(\pm 1, \pm 1)$, CCW
Evaluate $\displaystyle\oint_C y^2\,dx + xy\,dy$ where $C$ is the square with vertices $(1,1),(-1,1),(-1,-1),(1,-1)$ traversed counterclockwise.
Step 1: Side 1 (bottom). $y = -1$ from $x = -1$ to $x = 1$. $dy = 0$.
$\displaystyle\int_{-1}^{1} (-1)^2\,dx = \int_{-1}^{1} dx = 2$.
Step 2: Side 2 (right). $x = 1$ from $y = -1$ to $y = 1$. $dx = 0$.
$\displaystyle\int_{-1}^{1} (1)y\,dy = \Bigl[\frac{y^2}{2}\Bigr]_{-1}^{1} = \tfrac{1}{2} - \tfrac{1}{2} = 0$.
Step 3: Side 3 (top). $y = 1$ from $x = 1$ to $x = -1$. $dy = 0$.
$\displaystyle\int_{1}^{-1} 1\,dx = -2$.
Step 4: Side 4 (left). $x = -1$ from $y = 1$ to $y = -1$. $dx = 0$.
$\displaystyle\int_1^{-1} (-1)y\,dy = -\Bigl[\frac{y^2}{2}\Bigr]_1^{-1} = -({\tfrac{1}{2}} - {\tfrac{1}{2}}) = 0$.
Result: $2 + 0 + (-2) + 0 = 0$.