Answer
The potential function is $f\left( {x,y,z} \right) = x\cos z + {y^2} + 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( {\cos z,2y, - x\sin 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
$0=0$, ${\ \ \ }$ $0=0$, ${\ \ \ }$ $ - \sin z = - \sin z$
From these results, we conclude that ${\bf{F}} = \left( {{F_1},{F_2},{F_3}} \right) = \left( {\cos z,2y, - x\sin 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 \cos z{\rm{d}}x = x\cos z + 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 2y{\rm{d}}y = {y^2} + 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 x\sin z{\rm{d}}z = x\cos z + h\left( {x,y} \right)$
Since the three ways of expressing $f\left( {x,y,z} \right)$ must be equal, we get
$x\cos z + j\left( {y,z} \right) = {y^2} + g\left( {x,z} \right) = x\cos z + h\left( {x,y} \right)$
From here, we conclude that the potential function is $f\left( {x,y,z} \right) = x\cos z + {y^2} + C$, where $C$ is a constant.