MathGroup Archive 2001

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

Search the Archive

Re: Simplify with If and UnitStep

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31306] Re: Simplify with If and UnitStep
  • From: bghiggins at ucdavis.edu (Brian Higgins)
  • Date: Sat, 27 Oct 2001 01:08:15 -0400 (EDT)
  • References: <9rb8be$5m9$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hugo,

Have you thought of using the condition function to generate step
functions, e.g.

g[t_ /; 1/t^.3 > 32] := 3200

g[t_ /; 1/t^.3 <= 32] := Integrate[ M^2.55, {M, 0.1, 1/t^.3}]

Thus
In[81]:=g[.000002]

Out[81]=3200

In[82]:=g[.2]

Out[82]=1.5637

This avoids the use of If statements. The drawback is you cannot
differentiate and do other manipulations on g[t].
 
If you must use Unit step functions, perhaps you can provide some
details of how you generate the step functions in the first place as
your If statement seems to contain superfluous information.


Regards,

Brian


  • Prev by Date: Re: (-8)^(1/3)
  • Next by Date: Re: (-8)^(1/3)
  • Previous by thread: Simplify with If and UnitStep
  • Next by thread: Re: Simplify with If and UnitStep