This can easily be handled like this:
from dolfin import *
mesh = UnitSquareMesh(4,4)
expr = Expression("4*x[0]*x[1]") # Dummy Expression
V = FunctionSpace(mesh, "CG", 1) # Space for function
Q = FunctionSpace(mesh, "DG", 0) # Space for derivative
u = project(expr, V)
udx = project(u.dx(0), Q) # u.dx(1) for y-derivative
plot(u)
plot(udx)
interactive()