Context
In[855]:= D[Abs[x], x] /. x -> 1
Out[855]= Derivative[1][Abs][1]
In[856]:= D[x, x] /. x -> 1
Out[856]= 1
Question
Why is Derivative[1][Abs][x]
not simplifed to 1 when x -> 1
?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityIn[855]:= D[Abs[x], x] /. x -> 1
Out[855]= Derivative[1][Abs][1]
In[856]:= D[x, x] /. x -> 1
Out[856]= 1
Why is Derivative[1][Abs][x]
not simplifed to 1 when x -> 1
?
$\mathrm{abs}(z)$ defined on the set of complex numbers $\mathbb{C}$ is not a holomorphic function because it violates the Cauchy-Riemann conditions, and the derivative is not well defined. $\mathrm{abs}(x)$ defined on the set of real numbers $\mathbb{R}$ is differentiable everywhere except at $x=0$.
Mathematica treats Abs[x]
as a function defined on complex numbers and so will not simplify Abs'[x]
when it occurs in expressions. However, you can force it to simplify by explicitly stating that the argument is real as follows:
FullSimplify[Abs'[x], x ∈ Reals]
(* Sign[x] *)
Also see this question for a very closely related problem.
FunctionExpand
will resolve this (I think FullSimplify
also calls FunctionExpand
in the background):
FunctionExpand[Abs'[x], x \[Element] Reals]
(* ==> Sign[x] *)
Abs'[1] // FunctionExpand
(* ==> 1 *)
Abs[x]
. $\endgroup$ – Simon Jul 12 '12 at 10:04