Re: Constant function Integrate Assumption
- To: mathgroup at smc.vnet.net
- Subject: [mg47222] Re: Constant function Integrate Assumption
- From: astanoff_otez_ceci at yahoo.fr (astanoff)
- Date: Wed, 31 Mar 2004 02:57:57 -0500 (EST)
- References: <c4bdnf$6tr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Daryl Reece wrote: > I am trying to use units within an Integration and would like > Mathematica to understand that the units (Month) are not a function of > the integration variable, but I have not had any luck with my > attempts. > Specifically > Integrate[UnitStep[t Months], t] > should yield > t UnitStep[t] my solution : In[1]:=Unprotect[UnitStep]; UnitStep[t_*unit_ /; MemberQ[Attributes[unit],Constant]]:=UnitStep[t]; Protect[UnitStep]; In[2]:=SetAttributes[Months,Constant]; In[3]:=Integrate[UnitStep[t Months],t] Out[3]=t UnitStep[t] hth -- 0% de pub! Que du bonheur et des vrais adhérents ! Vous aussi inscrivez-vous sans plus tarder!! Message posté à partir de http://www.gyptis.org, BBS actif depuis 1995.