So you're trying to find the gradient of f (denoted as ∇f)?
[attachment=13003:z.png]
[attachment=13004:gradient.png]
Then:
[attachment=13005:solved.png]
Also, did your "The slope in the x direction" sentence get cut off?
I'll be honest, I'm not entirely sure what you're after, and it's possible you're after something different than the ∇f, but to be honest your post isn't incredibly clear.