MathGroup Archive 2000

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

Search the Archive

Re: Thx for your help

  • To: mathgroup at
  • Subject: [mg23752] Re: [mg23712] Thx for your help
  • From: Andrzej Kozlowski <andrzej at>
  • Date: Mon, 5 Jun 2000 01:09:47 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

on 5/30/00 11:05 AM, Jos\151 Mar\155a Lasso at jml at wrote:

> Hi,
> Thx for the answers to my last post, but I have a new question, similar to
> the last one, when I try: Integrate[Abs[x],x], there is no result, just the
> original input, what I am doing wrong?, I need some advice about a good
> book about Mathematica for beginers.Thx again.Best regards
> Jose M Lasso
What do you think the answer should be?  If you are considering only
functions in the real plane you probably expect to get the function x^2/2
for x>0 and -x^2/2 for x<=0. This can be written more neatly in the form
 x Abs[x]/2 . However,  Mathematica always gives answers valid in the
complex plane, so there would have  to be a function, analytic in an open
subset of the complex plane, whose (complex) derivative is Abs. Since there
is no such function you do not get anything.

However, Mathematica can find definite integrals involving Abs, e.g.

Integrate[Abs[x], {x, -1, 1}]

Mathematica can also compute path integrals in the complex plane so you can
define a function:

f[z_] := Integrate[Abs[x], {x, 0, z}]

Because Abs is not an analytic function the answer depends on the path taken
(Mahtematica always uses streight line segments), but you can consider f[z]
as a kind of "answer" to your question:

1             2        2
- z Sqrt[Im[z]  + Re[z] ]

This is of course not really an "antiderivative" of Abs[z] since if you
differentiate it you won't get Abs[z] (it isn't even differentiable).
However, for real z you can get the answer which I presume you expected if
you now use Simplify with the assumption that z is a Real variable:

Simplify[f[z], Element[z, Reals]]
- z Abs[z]

There are lots of good books about Mathematica  but I do not think there is
any that would have answered this question  directly.  The answer however
follows from this fundamental principle: Mathematica generally (when it is
sensible) assumes that variables take values in the complex plane.

Andrzej Kozlowski
Toyama International University

  • Prev by Date: RE: Re: parametricplot
  • Next by Date: DeleteRepetitons and "functions" with memory
  • Previous by thread: Fwd: Thx for your help
  • Next by thread: Re: Re: Thx for your help