MathGroup Archive 1997

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

Search the Archive

RE: (Newbie) More confusion with integral of absolute vals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9385] RE: [mg9367] (Newbie) More confusion with integral of absolute vals
  • From: jmthomas <jmthomas at cybercable.tm.fr>
  • Date: Sun, 2 Nov 1997 01:02:18 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Your question has been rather disappointing me and I'm not sure my 
answer can help you in any way:
I tried Integrate[Abs[x],{x,a,b}] and, as you did, had to abort the 
evaluation after some ten minutes.
I must admit that, if Mathematica cannot answer properly, it should at 
least answer quickly. I tried to submit your integral to "The 
integrator" on Wolfram Research site, the answer was: Mathematica was
not able to do the integral you requested. If you think = the integral
can in fact be done, please send mail to = webmaster at integrals.com so
it can be analyzed by our mathematical = development group.
Beside the fact "the integrator" performs indefinite integrals only, I 
leave you submit your case to them.

Anyway, this could help:
As far as Abs is a general function for real AND complex numbers, it 
certainly dizzles the kernel. So I wrote:
absoluteValue[x_]:=3DIf[x>=3D0,x,-x] which defines Abs[x] for real
only. And then f[a_,b_]:=3DIntegrate[absoluteValue[x],{x,a,b}] Please
notice the fact that this definition is a delayed definition. Then,
giving values to a and b returns a correct numerical result, which 
might be what you are looking for.
Hope this helps.

----------------------------------------------- Jean-Marie THOMAS
Conseil et Audit en Ing=E9nierie de Calcul jmthomas at cybercable.tm.fr
www.cybercable.tm.fr/~jmthomas

-----Message d'origine-----
De:	L. Dwynn Lafleur [SMTP:lafleur at usl.edu] Date:	samedi 1 novembre 1997
09:34
=C0:	mathgroup at smc.vnet.net
Objet:	[mg9367] (Newbie) More confusion with integral of absolute vals

Suppose I want to integrate the absolute value of x over the range a->b.
It's simple enough in Maple V Release 4:

> ii:=3Dint(abs(x),x=3Da..b);

                         2                  2
              ii :=3D 1/2 b  signum(b) - 1/2 a  signum(a)

> assume(0<a,a<b);
> ii;

                                2         2
                          1/2 b~  - 1/2 a~

where the tildes (~) indicate there are assumed properties for a and b.

If I try the same thing in Mathematica 3.01, I get

In[1]:=3D ii=3DIntegrate[Abs[x],{x,a,b}] Out[1]=3D $Aborted

In other words, Mathematica cannot perform the integral and I must abort
the evaluation.  Even if I try to place Assumptions in the Integrate
function, the integration is not performed.  What am I missing here?
Can't the integration be performed as easily in Mathematica as it is in
Maple?

--

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D L. Dwynn Lafleur
Professor of Physics
The University of Southwestern Louisiana Lafayette, Louisiana  (USA)
lafleur at usl.edu              
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D




  • Prev by Date: Re: Integrate[ ] returns If[ ] function; how to say it's True?
  • Next by Date: RE: Integrate[ ] returns If[ ] function; how to say it's True?
  • Previous by thread: Re: (Newbie) More confusion with integral of absolute vals
  • Next by thread: Re: (Newbie) More confusion with integral of absolute vals