how do I find a scalar function on problem 4?
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:
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 :
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:
which is clearly a contradiction.