Calculate line integral L: $y=sinx$, $y=0$, $0\le x \le \pi$

There is an example to calculate the line integral $$\oint_{L}P(x,y)dx+Q(x,y)dy$$

The contour $$L$$: $$y=\sin x$$, $$y=0$$, $$0\le x \le \pi$$

$$P(x,y)=e^{x}y$$, $$Q(x,y)=e^{x}$$ The calculation has to be checked via Green Theorem. Any hints how to calculate the integral by definition and via Green formula?

Straightforward way with $$C_1(t)=(t,0)~~~,~~~0\leq t\leq\pi$$ $$C_2(t)=(t,\sin(\pi-t))~~~,~~~0\leq t\leq\pi$$ then $$\oint_{L}P(x,y)dx+Q(x,y)dy=\oint_{C_1}+\oint_{C_2}=0+\int_0^\pi e^t(\sin t+\cos t)dt=0$$ With Green $$Q_x-P_y=0$$
I assume $$L$$ is oriented clockwise. We have to break the integral in two parts. Let $$L_1$$ be the graph of $$\sin$$, and $$L_2$$ be the line segment $$0 \leq x \leq \pi$$. Then $$\oint_L P(x,y)\,{\rm d}x+Q(x,y)\,{\rm d}y = \int_{L_1}P(x,y)\,{\rm d}x+Q(x,y)\,{\rm d}y+\int_{L_2} P(x,y)\,{\rm d}x+Q(x,y)\,{\rm d}y.$$For the first part, we may use $$r_1(t) = (t,\sin t)$$, with $$0 \leq t \leq \pi$$, so $${\rm d}x = {\rm d}t$$ and $${\rm d}y = \cos t\,{\rm d}t$$ and $$\int_{L_1} e^xy\,{\rm d}x + e^x\,{\rm d}y = \int_0^\pi e^t \sin t + e^t\cos t\,{\rm d}t.$$This can be computed in several ways, but we'll get zero (check). For the second part, let $$r_2(t) = (\pi-t,0)$$ with $$0 \leq t \leq \pi$$, so that $${\rm d}x = -{\rm d}t$$ and $${\rm d}y=0$$, so that $$\int_{L_2} e^xy\,{\rm d}x + e^x{\rm d}y = \int_{0}^\pi 0\,{\rm d}t = 0.$$
With Green-Stokes, we have $$\oint_L P(x,y)\,{\rm d}x+Q(x,y)\,{\rm d}y = \iint_R \frac{\partial Q}{\partial x}- \frac{\partial P}{\partial y}\,{\rm d}x\,{\rm d}y$$where $$R$$ is the region enclosed by $$L$$, but $$\frac{\partial Q}{\partial x}- \frac{\partial P}{\partial y} = \frac{\partial}{\partial x}(e^x) - \frac{\partial}{\partial y}(e^xy) = e^x -e^x$$and so the result is again zero.
• Switch the sign of the final answer. In this case it doesn't matter since $-0=0$. I even would go as far as to say that the statement of the problem not telling you the orientation of the curve is a hint itself that the result will be zero. – Ivo Terek May 20 at 20:19