Consider the triangle with vertices $(0,0)$, $(1,0)$ and $(0,1)$. Denote the curve by $\gamma(t)$, $t\in [a,b]$. Compute $$ \int_\gamma f dl:=\int_a^b f(\gamma(t))|\gamma'(t)|dt,$$ where $f(x,y)=x+y$.
I got a parameterization for each one of the sides: $\gamma_1(t)=(t,0)$, $\gamma_2(t)=(t,1-t)$ and $\gamma_3(t)=(0,t)$, for $t\in [0,1]$, and I used $$\int_\gamma f dl=\int_{\gamma_1} f dl+\int_{\gamma_2} f dl+\int_{\gamma_3} f dl=1/2+\sqrt{2}+1/2=1+\sqrt{2}.$$ Is this correct? Does the value of the integral depend on whether we move along the curve clockwise or counterclockwise?
The result is correct, but the process isn't entirely correct. If we name the vertices $A=(0,0)$, $B=(1,0)$, and $C=(0,1)$, your path runs from $A$ to $B$ ($\gamma_1$), from $C$ to $B$ $(\gamma_2)$, and then from $A$ to $C$ $(\gamma_3)$. This is not a closed path; we need to reverse one or more of the paths to make it into one. Guessing your intent, I'd reverse $\gamma_2$ to $(1-t,t)$ and $\gamma_3$ to $(0,1-t)$.
This scalar version of the line integral doesn't depend on which direction we traverse the path in, because there's what amounts to an absolute value in the arclength differential $dl$. And that's what saved us; that same direction-independence applies to the subpaths $\gamma_i$ we built this out of, so reversing one of them doesn't change its integral.
A vector-type line integral $\int_{\gamma}\mathbf{f}\cdot \mathbf{dl}$ would depend on the direction; those integrals are generally more useful, but that's not what was asked about in this problem.