Find a potential f for the vector function v = [$ye^x, e^x, z^2$]. Find a potential f for the vector function v =$ [ye^x, e^x, z^2]$
Is the answer to this question f = $[ye^x,0,2z]$ ?
 A: $$
\nabla \phi = \mathbf{F} = 
\left[ \begin{array}{c}
  \partial_{x} \phi \\
  \partial_{y} \phi \\
  \partial_{z} \phi
\end{array} \right]
=
\left[ \begin{array}{c}
  y e^{x} \\
  e^{x} \\
  z^{2}
\end{array} \right]
$$
The potential function is 
$$
\phi (x, y, z) = ye^{x} + \frac{1}{3}z^{3},
$$
modulo some constant.
A: A potential function for a vector field $v$ is any function $f$ such that $\operatorname{grad} f = v$.
In this case, from $\frac{\partial f}{\partial x} = y e^{x}$ you get $f(x,y,z) = y e^x + \text{some function of $y$ and $z$}$. From $\frac{\partial f}{\partial y} = e^x$ you get $f(x,y,z) = ye^x + \text{some function of $x$ and $z$}$. Putting these two together, you get that $f(x, y, z) = y e^{x} + \text{some function of $z$ alone}$. From $\frac{\partial f}{\partial z} = z^2$, finally, you get $f = \frac{1}{3} z^3 + \text{some function of $x$, $y$}$. Putting this all together,
$$ f(x, y, z) = y e^{x} + \frac{z^3}{3} + C$$ where $C$ is a constant.
A: $\operatorname{Curl}f=0$, so the vector field is conservative, which means that a scalar potential $\phi(x,y,z)=\nabla f(x,y,z)$ can be found by computing the line integral $\int_\Gamma f\cdot d\mathbf r$, where $\Gamma$ is any convenient piecewise smooth curve joining the origin to the point $(x,y,z)$. The line segment $\gamma:t\mapsto(xt,yt,zt)$, $t\in[0,1]$ is often a good choice, so we have, up to a constant of integration that represents the value of the potential at the origin, $$\phi(x,y,z)=\int_0^1f(tx,ty,tz)\cdot d\mathbf r=\int_0^1ye^{tx}+txye^{tx}+t^2z^3\,dt=ye^x+\frac13z^3.$$
