# Derivative of the Absolute Value Function in Mathematica looks very different from the actual answer

Derivative of the Abs Function in Mathematica looks very different than the actual answer. Why? How to correct this?

For example I entered D[Abs[x - 1], x] and got the output Abs'[-1 + x]. Is there a syntax error in my input?

-
FullSimplify[D[Abs[x - 1], x], x \[Element] Reals && x != 0] Resolve[ForAll[x, x \[Element] Reals && x != 0, Sign[-1 + x] == Piecewise[{{1, x - 1 > 0}, {-1, x - 1 < 0}}]], Reals] – ciao May 1 '14 at 7:29
How do I get the output in this form: (x−1)/|x−1| ? – user14056 May 1 '14 at 7:34
Throw a rule and traditionalform onto end of simplify, /. Sign[z_ - 1] :> (z - 1)/Abs[z - 1] // TraditionalForm or investigate ComplexityFunction and TransformationFunctions for simplify. Bottom line, the form presented is what Mathematica deems the "simplest". If you need/want to transform it, you need to tell it so. – ciao May 1 '14 at 7:41
Thanks! ComplexExpand followed by Simplify helped. – user14056 May 1 '14 at 15:11
You need ComplexExpand probably because you can't take the derivative of Abs in the complexes – Rojo May 1 '14 at 15:17