You can use "normal" derivatives as well as grad, div etc. If you want to take the y derivative of the x-component of u the write:
u[0].dx(1)
I.e you can write div(u) in 2D as
div2d = lambda u: u[0].dx(0) + u[1].dx(1)
...
a = div2d(u)*v*dx
You can also take the derivative of a combined expression
(u[0].dx(1) - u[1].dx(0)).dx(1)