Re: How to disable Integrate[] ?

*To*: mathgroup at smc.vnet.net*Subject*: [mg109503] Re: How to disable Integrate[] ?*From*: "David Park" <djmpark at comcast.net>*Date*: Sat, 1 May 2010 06:51:38 -0400 (EDT)

If you had the Presentations package you would have two approaches. (I have to paste the text box formatting into the email for the output. If you paste this into your notebook it will give the actual 2D formatted expressions.) Needs["Presentations`Master`"] 1) Use the HoldOp command, which evaluates the arguments but holds an explicit enclosing operation. Integrate[x + x, {x, a + a, b + b}] // HoldOp[Integrate] \!\( \*SubsuperscriptBox[\(\[Integral]\), \(2\ a\), \(2\ b\)]\(\(2\ x\) \[DifferentialD]x\)\) 2) Use the Student's Integral integrate command, which allows you to hold the evaluation and then do various manipulations on it before evaluating either by a private integral table, or with the Mathematica Integrate or NIntegrate commands. integrate[x + x, {x, a + a, b + b}] % // BreakoutIntegral % // UseIntegrate[] // Expand \!\( \*SubsuperscriptBox[\(\[Integral]\), \(2\ a\), \(2\ b\)]\(\(2\ x\) \[DifferentialD]x\)\) 2 \!\( \*SubsuperscriptBox[\(\[Integral]\), \(2\ a\), \(2\ b\)]\(x \[DifferentialD]x\)\) -4 a^2 + 4 b^2 Another advantage of integrate and UseIntegrate[assumptions] is that you don't have to feed any assumptions into the integral until evaluation so it always formats nicely as an unevaluated integral. David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: slawek [mailto:slawek at host.pl] U=BFytkownik "Christoph Lhotka" <christoph.lhotka at univie.ac.at> napisa=B3w wiadomo=B6ci grup dyskusyjnych:hrbaas$hon$1 at smc.vnet.net... > Simplifiy[...., ExcludedForms->{Integrate[__,_]}] Nice, but it doesn't work, check yourself: In[1]:= int1 = HoldForm[Integrate[x + x, {x, a + a, b + b}]]; In[2]:= int2 = HoldForm[Integrate[1/(1 + Sin[x]^(1/3)), {x, a + a, b + b}]]; In[3]:= Simplify[int1 // ReleaseHold, ExcludedForms -> {Integrate[_, _ ]}] In[4]:= Simplify[int2 // ReleaseHold, ExcludedForms -> {Integrate[_, _ ]}] > IntegrateH[expr,vars] Yes, it is possible replace Integrate by an dummyIntegrate or similar placeholder. It should be even possible to define some simple rules for dummyInterate, i.e. dummyIntegrate[a_,lst_]+ dummyIntegrate[b_,lst_] -> dummyIntegrate[a+b,lst] and so on. But, I think that it is not the most finesse way. I think that some global switch, like the iteration limit and the recursion limit should work better. Unfortunatelly these limits don't force Mathematica give up simplification but abort calculation with an "Abort" msg. slawek