# Compute Line Integral $\int_{\Gamma}(x+y)dS$

Given $$\int_{\gamma}(x+y)dS$$ where $\gamma$ is defined as triangle connecting points $(0,0)$, $(0,1)$, $(1,0)$

I'm having some issues transforming this integral to normal Riemann form. My try:
$$\int_{\gamma}(x+y)dS=\int_{0}^{1}(x+0)\sqrt{1+0}dx+\int_{0}^{1}(0+y)\sqrt{0+1}dy+{\color{Red} {2\int_{0}^{0.5}(x-x)dx} } = 1 + {\color{Red} 0 }$$ I marked red the incorrect one (incorrect for me). Maybe a stupid question, but how should I transform it to not get zero? And I'm not looking for geometrical solution, I'm new in line integrals and still want to learn the concept behind it.

• I find your picture confusing: your line integral should be in the $xy$ plane, what's going on in 3 dimensions? – onamoonlessnight Nov 11 '15 at 20:17
• I think you're right, this picture is wrong, I'll better remove it. – shcolf Nov 11 '15 at 20:22

## 1 Answer

A note on notation: it is good taste to write line integrals as $\int f dr$, and reserve the notation $\int f dS$ for surface integrals.

To compute the integral $$\int_{\gamma} (x + y) dr$$ along the triangle with vertices at $(0,0)$, $(0,1)$, $(1,0)$, first draw a picture of $\gamma$: If orientation is not explicitly stated, it is common to assume that the integral goes anticlockwise. The direction of the integral of course matters only up to a sign. Split your integral into the three lines that make up your triangle, $$\int_{\gamma} (x+y) dr = \int_{\rightarrow} (x+y) dr + \int_{\nwarrow} (x+y) dr + \int_{\downarrow} (x+y) dr.$$ The tricky one is the slanting side, so let's do that last. The other two sides are $$\int_{\rightarrow} (x+y) dr = \int_0^1 (x + 0) dx = \left[ \frac{1}{2} x^2 \right]_0^1 = \frac{1}{2}$$ and $$\int_{\downarrow} (x+y) dr = \int_1^0 (0 +y) dy = \left[ -\frac{1}{2} y^2 \right]^1_0 = - \frac{1}{2}.$$ Observe that I didn't need to use any fancy machinery to compute these two - that's because these happen to lie along your coordinate axes. That's why in the first one my element is $dx$, i.e. the integral goes along the x axis (on which $y=0$, so I've set $y=0$ in the integrand), and similarly in the second one my element is $dy$. However here I integrate downwards, and to convey that I have to integrate from 1 to 0, as opposed to from 0 to 1 (recall that we are going anticlockwise).

To deal with the hypotenuse, parametrize it by $$\textbf{r}(t) = \left(x(t), y(t)\right) = \left(1-t, t\right).$$ Then I want to use this parameter $t$ to convert my integral along a line in two dimensions into a familiar integral in one dimension. Recall that by definition, $$\int_{\gamma} f dr = \int_a^b f(\textbf{r}(t))|\textbf{r}'(t)| dt.$$ In our case $a=0$ and $b=1$, and $$\left|\textbf{r}'(t)\right| = \left|\left(-1, 1\right)\right| = \sqrt{2},$$ so $$\int_{\nwarrow} (x+y) dr = \int_0^1 (1-t + t) \sqrt{2} dt = \sqrt{2}.$$ It remains to add the three parts, $$\int_{\gamma} (x+y) dr = \frac{1}{2} - \frac{1}{2} + \sqrt{2} = \sqrt{2}.$$

• Any chance of justifying the sign here - if we went clockwise the final answer should be $-\sqrt 2$ with the entire contribution coming from the diagonal. I'm having a hard time visualizing why upward to the left gives a positive result and downward to the right gives a negative result. – WW1 Nov 11 '15 at 21:44
• It's convention. Along the diagonal $x+y$ always takes the value $1$, so the area under the curve $x+y$ is simply its value times the length of the curve, in this case $\sqrt{2}$. The direction in which we integrate doesn't change the area, of course, but it is useful to have a sense of direction for consistency. – onamoonlessnight Nov 11 '15 at 22:10
• You can compare this to the familiar case of something like $$\int_0^1 x dx = \frac{1}{2}.$$ Obviously the area under the graph of $y(x) = x$ from $0$ to $1$ is $\frac{1}{2}$ in whichever direction we "add the infinitesimal rectangles", if that makes sense. But we need to have a sense of "doubling back on ourselves", so that if I integrate from $0$ to $1$ and then integrate backwards from $1$ to $\frac{1}{2}$, I should end up with an integral from $0$ to $\frac{1}{2}$. So my integration backwards should have a negative contribution; this is the essence behind $$\int_a^b = - \int_b^a.$$ – onamoonlessnight Nov 11 '15 at 22:15
• @onemoonlessnight Perhaps the whole issue of clockwise versus counterclockwise is only relevant when dealing with line integrals of vector functions. Since $f$ is a scalar function we should be taking the absolute values of the integrals yielding an answer of $1+\sqrt 2$, which would accurately reproduce the area of the surface between the triangle and the plane. – WW1 Nov 12 '15 at 2:32