Answer
The potential function is $f\left( {x,y,z} \right) = x{y^2} + y{{\rm{e}}^z} + C$, where $C$ is a constant.
Work Step by Step
1. Assuming that ${\bf{F}}$ is a vector field on a simply connected domain ${\cal D}$, we check if ${\bf{F}} = \left( {{F_1},{F_2},{F_3}} \right) = \left( {{y^2},2xy + {{\rm{e}}^z},y{{\rm{e}}^z}} \right)$ satisfies the cross-partials condition:
$\dfrac{{\partial {F_1}}}{{\partial y}} = \dfrac{{\partial {F_2}}}{{\partial x}}$, ${\ \ \ }$ $\dfrac{{\partial {F_2}}}{{\partial z}} = \dfrac{{\partial {F_3}}}{{\partial y}}$, ${\ \ \ }$ $\dfrac{{\partial {F_3}}}{{\partial x}} = \dfrac{{\partial {F_1}}}{{\partial z}}$
We get
$2y=2y$, ${\ \ \ }$ ${{\rm{e}}^z} = {{\rm{e}}^z}$, ${\ \ \ }$ $0=0$
From these results, we conclude that ${\bf{F}} = \left( {{F_1},{F_2},{F_3}} \right) = \left( {{y^2},2xy + {{\rm{e}}^z},y{{\rm{e}}^z}} \right)$ satisfies the cross-partials condition. Therefore, by Theorem 4, there is a potential function for ${\bf{F}}$.
2. Find a potential function for ${\bf{F}}$.
Let the potential function for ${\bf{F}}$ be $f\left( {x,y,z} \right)$ such that ${\bf{F}} = \nabla f = \left( {\dfrac{{\partial f}}{{\partial x}},\dfrac{{\partial f}}{{\partial y}},\dfrac{{\partial f}}{{\partial z}}} \right)$. So,
a. taking the integral of $\dfrac{{\partial f}}{{\partial x}}$ with respect to $x$ gives
$f\left( {x,y,z} \right) = \smallint {y^2}{\rm{d}}x = x{y^2} + j\left( {y,z} \right)$
b. taking the integral of $\dfrac{{\partial f}}{{\partial y}}$ with respect to $y$ gives
$f\left( {x,y,z} \right) = \smallint \left( {2xy + {{\rm{e}}^z}} \right){\rm{d}}y = x{y^2} + y{{\rm{e}}^z} + g\left( {x,z} \right)$
c. taking the integral of $\dfrac{{\partial f}}{{\partial z}}$ with respect to $z$ gives
$f\left( {x,y,z} \right) = \smallint y{{\rm{e}}^z}{\rm{d}}z = y{{\rm{e}}^z} + h\left( {x,y} \right)$
Since the three ways of expressing $f\left( {x,y,z} \right)$ must be equal, we get
$x{y^2} + j\left( {y,z} \right) = x{y^2} + y{{\rm{e}}^z} + g\left( {x,z} \right) = y{{\rm{e}}^z} + h\left( {x,y} \right)$
From here, we conclude that the potential function is $f\left( {x,y,z} \right) = x{y^2} + y{{\rm{e}}^z} + C$, where $C$ is a constant.