# Assumptions with D

I want to give assumptions for the D function. Say I want to calculate $\frac{d|x|}{dx}$ for $x>0$, which is 1.

I write D[Abs[x], x, Assumptions -> x > 0] which gives

D::optx: Unknown option Assumptions in D[Abs[x],x,Assumptions->x>0]. >> Why doesn't D take assumptions?

-
Because Assumptions is not a valid option for D[]; see Options[D]. What you want is FullSimplify[D[Abs[x], x], x > 0]. –  Ｊ. Ｍ. Jul 7 '12 at 4:25

Many situations where assumptions play a role in differentiations can be equally or more clearly expressed by going back to the Limit defining the derivative in the first place. And Limit does take assumptions.
So for your example, instead of using D, you could write
Limit[(Abs[x + e] - Abs[x])/e, e -> 0, Assumptions -> x > 0]

Here I've specified the assumption as an option. Another implicit assumption with Limit is that the small parameter e is taken to be real.