Simplify with If and UnitStep
- To: mathgroup at smc.vnet.net
- Subject: [mg31286] Simplify with If and UnitStep
- From: gg at hugo.doemaarwat.nl (Hugo Buddelmeijer)
- Date: Fri, 26 Oct 2001 04:28:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I finally understand how I can create a 'piecewise' function with mathematica with UnitStep, but somewhere further in my calculations it doesn't Simplify it at all. This is what I've got as a result now (I removed the ugly pieces already): If[ 1/(32*t^0.3) > 1 && t^(-0.3) > 32, 62000*UnitStep[-0.1 + 32]*UnitStep[-0.1 + 1/t^0.3], Integrate[M^2.55*UnitStep[M - 0.1, -M + 32], {M, 0.1, 1/t^0.3}]] There are a couple of annoying things here that I can't solve... 1) On the first line there are 2 conditions which are exactly the same only the 32 is on the other site of the >, how can I turn this into just 1 condition? (preferable the latter) 2) On the second line there is a UnitStep[-0.1+32] which is certainly 1. The second UnitStep is also 1 because the last part there is always larger then 32, that's what the If statement implies. How can I get these UnitStep's to be 1? 3) On the 3th and 4th line it Integrate's over M in between 0.1 and a number lower then 32 (as the If statement implies), so the last UnitStep should also be 1. So what I want to see is actualy If[t^(-0.3) > 32, 62000, -0.00007939 + 0.281/t^1.065] Which looks way nicer then the upper statement, but essentially the same. (I rounded the numbers somewhat, but you get the idea.) If anyone can give me a hint about what I should do I will be very gratefull :-) Groetjes, Hugo