Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

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

Search the Archive

Re: How to Integrate[Abs[x]]?

  • To: mathgroup at
  • Subject: [mg91644] Re: [mg91624] How to Integrate[Abs[x]]?
  • From: Murray Eisenberg <murray at>
  • Date: Sat, 30 Aug 2008 01:53:11 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <>
  • Reply-to: murray at

You could use either of the following:

   Integrate[Abs[x], x, Assumptions -> x \[Element] Reals] // InputForm
Piecewise[{{-x^2/2, x <= 0}}, x^2/2]

   Integrate[g[x],x] // InputForm
Piecewise[{{-x^2/2, x <= 0}}, x^2/2]

(In both cases I used InputForm for the answer since it's awkward to 
reproduce the 2D  Piecewise output in linear e-mail text.)

Of course if you have a definite integral, there's no difficulty using 
Abs[x] directly, e.g.:


Thomas Dybdahl Ahle wrote:
> On my Ti calculater |x| is easily integrated to |x|*x/2, but when I type Integrate[Abs[x],x] in mathematica, it seams like it can't find the solution.
> Is there anything I'll have to do, to make mathematica find the solution?

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: How to parse equations
  • Next by Date: Re: Normal Probability plot
  • Previous by thread: RE: How to Integrate[Abs[x]]?
  • Next by thread: Re: How to Integrate[Abs[x]]?