x,c=var('x,c')
f=(x-c)/2
d_f=derivative(f,x) 
# d_f is the first derivative of f 
print "d_f=" ,d_f