MathGroup Archive 2009

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

Search the Archive

Integrate[Piecewise] Confusion

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105817] Integrate[Piecewise] Confusion
  • From: Derek Yates <yatesd at mac.com>
  • Date: Sun, 20 Dec 2009 06:54:52 -0500 (EST)

I expected to get the same result from the following two expressions:

(1) Integrate[Piecewise[{{20, 0 < x <= 2}, {40, 2 < x}}], x]
     which results in
     Piecewise[{{0, x <= 0}, {20 x, 0 < x <= 2}}, -40 + 40 x]

(2) Change the 2 to be the variable a, and then replace it in the
subsequent result
     Integrate[Piecewise[{{20, 0 < x <= a}, {40, a < x}}], x] /. a ->
2
     which results in
     Piecewise[{{20 x, x > 0 && 2 - x >= 0}, {40 x, 2 - x < 0}}]

So for the case when x > 2, version (1) gives 40x - 40 (which seems to
be the right answer to me), but version (2) gives 40x.

I presume I have overlooked something obvious here, but would be most
grateful if somebody could enlighten me.


  • Prev by Date: Re: Re: Cannot solve very simple equation.
  • Next by Date: Re: What's up with the order of Eigenvalues
  • Previous by thread: Re: Trick to create vector metafile in Mathematica 7.0 for copy &
  • Next by thread: Re: Integrate[Piecewise] Confusion