       Re: piecewise integration

• To: mathgroup at smc.vnet.net
• Subject: [mg66964] Re: [mg66944] piecewise integration
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Mon, 5 Jun 2006 03:48:29 -0400 (EDT)
• References: <200606040601.CAA14529@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

On 4 Jun 2006, at 15:01, Chris Chiasson wrote:

> The Integrate result seems pretty weak. Is there any way to obtain a
> more explicit exact answer besides manually converting the Piecewise
> function to two UnitStep functions? Can the same be done if the final
> limit of integration is a variable?
>
> in
>
> 0<=x<=3}}]-6*10^3*DiracDelta[x-5]//InputForm
>
> out
>
> -6000*DiracDelta[-5 + x] - 9000*DiracDelta[x] +
> Piecewise[{{(10000*x)/3, 0 <= x <= 3}}, 0]
>
> in
>
>
> out
>
> Integrate[InputForm[-6000*DiracDelta[-5 + x] - 9000*DiracDelta[x] +
> Piecewise[{{(10000*x)/3, 0 <= x <= 3}}, 0]], {x, 0, 5}]
>
> --
> http://chris.chiasson.name/
>

I am sure Maxim does not need my help to advertise his package but
somehow people still keep posting such questions with surprising
frequency. Even if for some reason you do not want to use a third
party package you can always look at the Mathematica code inside,
which should answer questions such as these.

DiracDelta[x] + Piecewise[{{x*10*(10^3/3), 0 <=
x <= 3}}] - 6*10^3*DiracDelta[x - 5];
<< piecewise`

In:=

Out=
0

In:=