Re: Abs[x] function

• To: mathgroup at smc.vnet.net
• Subject: [mg87849] Re: Abs[x] function
• From: dh <dh at metrohm.ch>
• Date: Fri, 18 Apr 2008 07:11:11 -0400 (EDT)
• References: <fu9fn7\$c8d\$1@smc.vnet.net>

```

by default Mathematica uses complex numbers. As Abs is not an analytical

function, it does not have a derivative (the differential quotient

depends on direction). Therefore, the derivative of Abs is not defined.

For your application, you could define the derivative you would like to

have yourself by e.g.:

Unprotect[Abs];

Abs'[x_]:=Which[x<0,-1,x==0,"undefined",x>0,1];

hope this helps, Daniel

> Who can explain the behavior. THe derivative Abs[x] at x=.5 is well

> defined and is equal to 1.

>

> In[1]:= D[Abs[x], x]

>

> Out[1]=

> \!\(\*SuperscriptBox["Abs", "\[Prime]",

> MultilineFunction->None]\)[x]

>

> In[2]:= % /. x -> .5

>

> Out[2]=

> \!\(\*SuperscriptBox["Abs", "\[Prime]",

> MultilineFunction->None]\)[0.5]

>

```

• Prev by Date: Re: Indefinite numbers of arguments in a function
• Next by Date: Re: Re: Re: Reduce and Indeterminate
• Previous by thread: Re: Abs[x] function
• Next by thread: Why isn't Expand[] grouping terms by order?