how do I find a scalar function on problem 4?
I'm not sure the OP will get the right idea from this.
IF a scalar function f exists such that $\displaystyle F = \nabla f$ then a solution to the following simultaneous partial differential equations will exist:
$\displaystyle \frac{\partial f}{\partial x} = 2z^2$ .... (1)
$\displaystyle \frac{\partial f}{\partial y} = e^z \cos y + x^3$ .... (2)
$\displaystyle \frac{\partial f}{\partial z} = e^z \sin y - 5z$ .... (3)
$\displaystyle \nabla f = F $
Now... nabla f is given by:
$\displaystyle \frac{d f}{dx}\vec{i}+\frac{d f}{dy}\vec{j}+ \frac{d f}{dz}\vec{k} $
And you know that $\displaystyle F = 2z^2\vec{i} + (e^z cos(y) + x^3)\vec{j} + (e^z sin(y) -5z)\vec{k} $
So, in essence, you have to find a scalar function f that satisfies these equations:
$\displaystyle \frac{d f}{dx}=2z^2$
$\displaystyle \frac{d f}{dy}=(e^z cos(y) + x^3)$
$\displaystyle \frac{d f}{dz}=(e^z sin(y) -5z)$
A little integration is needed...
I'll try to redeem myself here. I'd argue that no such function exists because:
Suppose such a function did exist. Look at the partial derivative wrt y:
$\displaystyle \frac{\partial f}{\partial y}=e^zcosy+x^3$
$\displaystyle f(x,y,z)=e^zsiny+x^3y+h(x,z)$ (2)
Here, h(x,z) is a function that depends only on x and z (which if derived wrt y becomes zero). Now if we take the partial derivative wrt x we should get $\displaystyle 2z^2$:
$\displaystyle \frac{\partial f}{\partial x}=3x^2y+\frac{\partial h(x,z)}{\partial x}=2z^2$
$\displaystyle \frac{\partial h(x,z)}{\partial x}=2z^2-3x^2y$
$\displaystyle h(x,z)=2xz^2-x^3y+g(z)$
But this is a contradiction because we have a term with y in a function that can only contain x and z. Thus no such function exists.
Another, maybe simpler, way to look at it is to argue that if such a function existed then:
$\displaystyle \frac{\partial ^2f}{\partial y \partial x}=\frac{\partial ^2f}{\partial x \partial y}$
$\displaystyle \frac{\partial }{\partial y}(2z^2)=\frac{\partial }{\partial x}(e^zcosy+x^3)$
$\displaystyle 0=3x^2$ which is clearly a contradiction.