|  1 |    initial version    |  
The code
sage: var('x y z')
(x, y, z)
sage: f = 3*x*y + 2*z + 12
sage: f.diff(x)
3*y
sage: g(x,y,z) = 3*x*y + 2*z + 12
sage: g.diff(x)
(x, y, z) |--> 3*y
 provides two slightly different ways of defining a function involving x, y, and z, then differentiating with respect to x, thus treating y and z as constants. Is this what you want?
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.