Re: Piecewise functions
- To: mathgroup at smc.vnet.net
- Subject: [mg23145] Re: [mg23119] Piecewise functions
- From: Jack Goldberg <jackgold at math.lsa.umich.edu>
- Date: Thu, 20 Apr 2000 03:21:05 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
The "best" solution is to construct piecewise functions using UnitStep[]. I well-known device for doing this is to observe that f[x](UnitStep[x-a]-UnitStep[x-b]) gives zero for x<a and x>b and give f[x] in a<x<b. If you are using the Integrate function, then the definition of UnitStep[x] at x = 0 is irrelevent so you need not worry about what happens at x=a or x=b. Jack On Wed, 19 Apr 2000, An Le wrote: > Can someone send me some notebook and package files to do piecewise > functions? I can't seem to be able to do it with mathematica. > > The only thing i get close to is using the Which[] function, but I can't > integrate with that function. > > Thanks... > >