Line integral of 3 segments, Green not applicable... Let $\mathcal{C}$ be the 3 segments successively going from $(0,0,0)$ to $(2,4,6)$ to $(3,6,2)$ and to $(0,0,1)$. I need to calculate the work made by the vector field :
$$\vec{F}=(6zx^2e^{x^3}+yz)\vec{i}+(xz+y)\vec{j}+(xy+2e^{x^3})\vec{k}$$
to move a particle along $\mathcal{C}$. So, I need to calculate :
$$W=\int_{\mathcal{C}}{\vec{F}\cdot{d\vec{r}}}$$
We know that $\vec{F}$ is conservative $\iff\vec{F}=\nabla f=
\begin{pmatrix}
\partial f/\partial x\\
\partial f/\partial y\\
\partial f/\partial z\\
\end{pmatrix}$, but that condition isn't met.
We choose to close $\mathcal{C}$ using segment $\mathcal{C_4}$ going from point $(0,0,1)$ to $(0,0,0)$.
Let $\mathcal{C_1}$ be the segment from $(0,0,0)$ to $(2,4,6)$, $\mathcal{C_2}$ the segment from $(2,4,6)$ to $(3,6,2)$ and $\mathcal{C_3}$ the segment from $(3,6,2)$ to $(0,0,1)$, then we have :
$$W=\int_{\mathcal{C_1}\cup\mathcal{C_2}\cup\mathcal{C_3}}{\vec{F}\cdot{d\vec{r}}}+\int_{\mathcal{C_4}}{\vec{F}\cdot{d\vec{r}}}-\int_{\mathcal{C_4}}{\vec{F}\cdot{d\vec{r}}}=\oint_{\mathcal{C_1}\cup\mathcal{C_2}\cup\mathcal{C_3}\cup\mathcal{C_4}}{\vec{F}\cdot{d\vec{r}}}-\int_{\mathcal{C_4}}{\vec{F}\cdot{d\vec{r}}}$$
Parameterizing $\mathcal{C_4}$ :
$$\vec{r_4}(t)=(1-t)
\begin{pmatrix}
0\\
0\\
1\\
\end{pmatrix}+t
\begin{pmatrix}
0\\
0\\
0\\
\end{pmatrix}=
\begin{pmatrix}
0\\
0\\
1-t\\
\end{pmatrix}$$ with $t\in[0,1]$.
Using Green theorem, we have :
$$\oint_{\mathcal{C_1}\cup\mathcal{C_2}\cup\mathcal{C_3}\cup\mathcal{C_4}}{\vec{F}\cdot{d\vec{r}}}=!!!$$
Green's theorem doesn't apply in 3D space !
I'm getting kinda lost here. Anyone would like to share a clue?
Thanks !
 A: Use Stokes' Theorem:
We have $$\tag 1 \int_{\vec C} \vec F\cdot d\vec r=\int _{S}(\nabla \times \vec F)\cdot \vec ndS$$ where $\vec C=\vec C_{1}+\vec C_{2}$ is your closed curve, as you have generated it, and $S$ is the surface bounded by $\vec C$.
You are in luck here because $\nabla \times \vec F=\vec 0$, so you can write 
$\int_{\vec C} \vec F\cdot d\vec r=0$. Then $$\tag 2 \int _{\vec C_{1}}\vec F\cdot d\vec r+\int _{\vec C_{2}}\vec F\cdot d\vec r=0$$ You want $\int _{\vec C_{1}}\vec F\cdot d\vec r$, which is, using $(2)$, $$-\int _{\vec C_{2}}\vec F\cdot d\vec r$$.
On $\vec C_{2}, x=y=0$ and $0\leq z\leq 1$ so $\vec F\cdot d\vec r=2dz$ so that finally, $$-\int _{\vec C_{2}}\vec F\cdot d\vec r=-2\int_{1}^{0}dz=2$$.
A: Stokes' Theorem is the generalization of Green's Theorem in the plane.  Stokes' Theorem states
$$\oint_C \vec A\cdot \vec dr=\int_S \nabla \times \vec A\cdot \hat n \,dS$$
where $C$ is the closed contour that bounds the surface $S$, holds for sufficiently smooth vector fields $\vec A$ and sufficiently regular surface $S$.
Here, we can show that $\nabla \times \vec F=0$ either by direct evaluation (this is straightforward) or by recalling that for any smooth scalar field $\phi$, we have $\nabla \times \nabla \phi=0$ (i.e, the curl of the gradient is zero).  
Here, we find that 
$$\vec F=\nabla \phi$$
where $\phi = 2ze^{x^3}+xyz+\frac12 y^2$ (we may add an arbitrary constant to $\phi$).  Inasmuch as $\vec F =\nabla \phi$, then $\nabla \times \vec F=\nabla \times \nabla \phi =0$.
Therefore, applying Stokes' Theorem reveals that 
$$\oint_C \vec F\cdot \vec dr=\int_S \nabla \times \vec F\cdot \hat n \,dS=0$$
which in turn implies
$$\int_{C_1+C_2+C_3} \vec F\cdot \vec dr=-\int_{C_4} \vec F\cdot \vec dr$$
Can you finish?
