# Line Integrals Examples 3

Recall from the Line Integrals page that if $z = f(x, y)$ is a two variable real-valued function and $C$ is a smooth plane curve defined by the parametric equations $x = x(t)$ and $y = y(t)$ then the line integral of $f$ along $C$ is given by:

(1)Similarly if $z = f(x, y, z)$ is a three variable real-valued function and $C$ is a smooth space curve defined by the parametric equations $x = x(t)$, $y = y(t)$ and $z = z(t)$ then the line integral of $f$ along $C$ is given by:

(2)We will now look at some more examples of computing line integrals.

## Example 1

**Evaluate $\int_C x^2 \: ds$ along the line of intersection of $x - y + z = 0$ and $x + y + 2z = 0$ from the point $(0, 0, 0)$ to $(3, 1, -2)$.**

Note that $x - y + z = 0$ and $x + y + 2z = 0$ are both planes and either intersect at a straight line, do not intersect, or coincide. It's not hard to see that these planes in fact intersect at a straight line. We can thus parameterize the line segment from $(0, 0, 0)$ to $(3, 1, -2)$ for $0 ≤ t ≤ 1$ as:

(3)Thus:

(4)