Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Abs[x] function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87880] Re: [mg87845] Re: Abs[x] function
  • From: "Szabolcs HorvÃt" <szhorvat at gmail.com>
  • Date: Sat, 19 Apr 2008 03:34:51 -0400 (EDT)
  • References: <fu9fn7$c8d$1@smc.vnet.net> <200804181110.HAA18822@smc.vnet.net>

On Fri, Apr 18, 2008 at 2:14 PM, Andrzej Kozlowski <akoz at mimuw.edu.pl> wrote:
>
>  On 18 Apr 2008, at 20:10, Szabolcs wrote:
>
> > On 18 Apr, 08:39, Vladislav <kazimi... at yahoo.co.uk> wrote:
> >
> > > 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]
> > >
> >
> > Hi,
> >
> > Please use "copy as plain text" when pasting Mathematica expressions,
> > so it will be easier to read them.
> >
> > Just use FunctionExpand on the result to get a concrete value.
> >
> >
>
>
>  I never noticed that Function expand deos that and I am not sure that I am
> very happy that it does. In fact:
>
>  FunctionExpand[Derivative[1][Abs][x],
>    Element[x, Reals]]
>   x/Abs[x]
>
>  but that assumes that the derivative is taken along the real line, which is
> not what Mathematica normally assumes. In my opinion this makes it less
> clear exactly what FunctionExpand is really meant to do and what to expect
> of it. I don't think it ought to make additional assumptions beyond what it
> is told.
>
>  I think it would be better to let Derivative have a direction option, just
> as Limit does.

Somewhat related to the topic:

It turns out that Limit understands Abs'[x] (this comes as a surprise to me):

In[1]:= Limit[Abs'[x], x -> 0, Direction -> 1]
Out[1]= -1

In[2]:= Limit[Abs'[x], x -> 0, Direction -> -1]
Out[2]= 1

But it does not work correctly with complex directions:

In[3]:= Limit[Abs'[1 + x], x -> 0, Direction -> I]
Out[3]= 1

The result should have been 0.

Szabolcs


  • Prev by Date: Re: NDSolve and vector functions
  • Next by Date: Re: Re: Re: EdgeRenderingFunction to
  • Previous by thread: Re: Re: Abs[x] function
  • Next by thread: Re: Abs[x] function