Calculus 3 Integration Just wondering if anyone could help me sort out this old exam question:
$\ \vec F (x,y,z) = xe^{x^2+y^2} \vec i + ye^{x^2+y^2} \vec j +e^z \vec k $
(A) Let C denote the path 
$\ (1 + cost, 2 + sin t, 3), 0 ≤ t ≤ 4π. $
Evaluate
$$\ \int_C \vec F . \vec {dr} $$
Justify your answer
(B) Find a function $\ ϕ : R^
3 → R $ such that $\ \vec F = ∇ϕ. $
(C) Evaluate
$$\ \int_Γ \vec F . \vec {dr} $$
Justify your answer
where Γ is the path
$\ (1 + cost, 2 + sin t, 3), 0 ≤ t ≤ π^2 $

I tried parameterization and ended up with this nasty yoke: 
$$\ \int_0^{4 \pi} ((1+cos(t)) e^{(1+cos(t))^2+(2+sin(t))^2}) \vec i +(2+sin(t)) e^{(1+cos(t))^2+(2+sin(t))^2}) \vec j +e^3 \vec k )(-sin(t) \vec i +cos(t) \vec j + 0 \vec k $$
Which couldn't possible?
I was thinking if I substituted $\  (1+cos(t))^2+(2+sin(t))^2 $ for u but I have no idea what to do (I'm only new at cal 3 so I'm still at the basics)
Any help would be hugely appreciated!
 A: If 
$$\vec{F} (x,y,z) = xe^{x^2+y^2}\vec{e}_x + ye^{x^2+y^2}\vec{e}_x+e^z\vec{e}_x $$
The vector $\vec{F}$ is a gradient, as we can show in 
B) $\vec{F}=\nabla \phi$, where $\phi=\frac{1}{2}e^{x^2+y^2}+e^{z}$. You can check this by calculating the gradtient of $\phi$.
If a vector is a gradient the integral along the path $\gamma$ is pathindependent and you can calculate the integral using the following equation.
$$\int_{\gamma}\vec{F}d\vec{r}=\phi|_{\gamma(t=t_0)}^{\gamma(t=t_1)}$$
Where $\gamma(t=t_0)$ denotes the point where your path starts and $\gamma(t=t_1)$ denotes the point where your path ends.
For A) $\gamma(t=t_0)=(2,2,3)^T$ and $\gamma(t=t_1)=(2,2,3)^T$.
$$\int_{C}\vec{F}d\vec{r}=\phi(\gamma(t=t_1))-\phi(\gamma(t=t_0))$$
$$=\phi((2,2,3)^T)-\phi((2,2,3)^T)=0$$
For C) $\gamma(t=t_0)=(2,2,3)^T$ and $\gamma(t=t_1)=(1+\cos(\pi^2),2+\sin(\pi^2),3)^T$.
$$\int_{C}\vec{F}d\vec{r}=\phi(\gamma(t=t_1))-\phi(\gamma(t=t_0))$$
$$=\phi((1+\cos(\pi^2),2+\sin(\pi^2),3)^T)-\phi((2,2,3)^T)$$
$$=\frac{1}{2}e^{(1+\cos(\pi^2))^2+(2+\sin(\pi^2))^2}+e^{3}-(\frac{1}{2}e^{(2)^2+(2)^2}+e^{3})$$
A: It pays to treat $(B)$ first. If $\vec F=\nabla\phi$ for some scalar function $\phi\>{\mathbb R}^3\to{\mathbb R}$ then
$$\phi_x=xe^{x^2+y^2},\quad\phi_y=ye^{x^2+y^2},\quad\phi_z=e^z\ .$$
This shows that the first two components $(\phi_x,\phi_y)$ make up  the $(x,y)$-gradient of the function $(x,y)\mapsto{1\over2}e^{x^2+y^2}$, and the third component $\phi_z$ is independent of $x$ and $y$. This leads to the conjecture that the function
$$\phi(x,y,z)={1\over2}e^{x^2+y^2}+e^z$$
does the job, and it is easy to verify that for this $\phi$ one indeed has $\nabla\phi=\vec F$.
Now to (C): It is a basic fact of vector analysis that for a gradient field $\vec F=\nabla\phi$ one has
$$\int_\Gamma \vec F\cdot d\vec r=\phi(q)-\phi(p)$$
for any curve beginning at $p$ and ending at $q$. It follows that your integral ha the value
$$\phi(1+\cos\pi^2,2+\sin\pi^2,3)-\phi(2,2,3)=\ldots\quad.$$
Finally $(A)$: The curve $\gamma$ in question is a circle in space drawn twice. The principle alluded to above then immediately implies that the integral in question is $0$.
A: The other answers have covered the solution quite well, but I’ll give you a slightly different take on it.  
When you’re asked to integrate a messy-looking vector function like this, it pays to see if it represents a conservative vector field. You can do this without first finding a scalar potential by checking to see if $\nabla\times F=0$ (equivalently, that the matrix $d\vec F$ is symmetric). We know that this must be the case, anyway, because part B asks us to find this potential, but it doesn’t hurt to double-check.  
Now that you know that $\vec F$ is conservative, i.e., that $\vec F = \nabla\phi$ for some real-valued $\phi$, part A becomes trivial: the integral is independent of the path, and $\int_\Gamma \vec F\cdot d\vec r = \phi(b)-\phi(a)$, where $a$ and $b$ are the start and end points of the path $\Gamma$, respectively. In part A, the endpoints coincide, so you know without doing anything else that the value of the path integral is zero. You also know from this that the answer to part C is going to be $(\phi\circ\Gamma)(\pi^2)-(\phi\circ\Gamma)(0)$.  
There are a few ways to find a suitable scalar potential $\phi$. The usual method involves integrating the components of $\vec F$ individually and matching them up to eliminate the “constants” of integration. You can also find an antiderivative of $\vec F$ by evaluating a single integral, which I’ll demonstrate here. Let $\vec F=A(x,y,z)\,\vec i+B(x,y,z)\,\vec j+C(x,y,z)\,\vec k$. Then $$\phi(x,y,z) = \int_0^1 xA(tx,ty,tz)+yB(tx,ty,tz)+zC(tx,ty,tz)\,dt$$ satisfies $\nabla\phi = \vec F$. (Note that this requires that $\vec F$ be defined in a star-shaped region about the origin.) If you work through this integral for the given $\vec F$, you end up with $$\phi(x,y,z) = \frac12 e^{x^2+y^2}+e^z-\frac32,$$ which differs from the function in the other answers by a constant of integration that you can drop because it’ll cancel when you subtract the values of $\phi$ at two points from each other.  
For the curve $\Gamma$ of part C, $z$ is constant, so the $e^z$ term, too, will cancel. This leaves evaluating $\frac12 e^{x^2+y^2}$ at the end points of $\Gamma$. Converting to cylindrical coordinates at this point might be fruitful.
