Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Why these definitions are so slow

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52139] Why these definitions are so slow
  • From: Arturas Acus <acus at itpa.lt>
  • Date: Fri, 12 Nov 2004 02:13:52 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Group,

Could somebody explain why these simple definitions takes so long time
to run?
I also tried to wrap them with HoldPattern[] in various ways, change
blanks, etc., all in vain. 

In[1]=

Integralas[Times[a__, b_?(FreeQ[#, rTilde] &), c___]] :=
b*Integralas[Times[a, c]]

Integralas[Plus[a__, b_?(FreeQ[#, rTilde] &), c___]] := 
  b + Integralas[Plus[a, c]]

Integralas[n_?NumberQ] := n



In[2]=

Integralas[(3*aTilde)/(4*Pi) + (3*aTilde*j)/(2*Pi) +
(3*aTilde*j^2)/(2*Pi) - (9*aTilde*Cos[2*F[rTilde]])/(8*Pi) + 
 (3*aTilde*j*Cos[2*F[rTilde]])/(2*Pi) +
(3*aTilde*j^2*Cos[2*F[rTilde]])/(2*Pi) + 3*rTilde^2*Sin[F[rTilde]]^2 - 
 4*j*rTilde^2*Sin[F[rTilde]]^2 - 4*j^2*rTilde^2*Sin[F[rTilde]]^2 +
3*rTilde^2*Cos[2*F[rTilde]]*Sin[F[rTilde]]^2 - 
 4*j*rTilde^2*Cos[2*F[rTilde]]*Sin[F[rTilde]]^2 -
4*j^2*rTilde^2*Cos[2*F[rTilde]]*Sin[F[rTilde]]^2 - Sin[F[rTilde]]^4 - 
 2*j*Sin[F[rTilde]]^4 - 2*j^2*Sin[F[rTilde]]^4 -
6*rTilde^2*Sin[F[rTilde]]^4 + 8*j*rTilde^2*Sin[F[rTilde]]^4 + 
 8*j^2*rTilde^2*Sin[F[rTilde]]^4 + 3*Cos[2*F[rTilde]]*Sin[F[rTilde]]^4 -
4*j*Cos[2*F[rTilde]]*Sin[F[rTilde]]^4 - 
 4*j^2*Cos[2*F[rTilde]]*Sin[F[rTilde]]^4]

In[4]:=
$Version

Out[4]=
5.0 for Linux (November 18, 2003)


Sincerely, Arturas Acus



  • Prev by Date: Re: nonlinear programming with differential-algebraic constraints (2)
  • Next by Date: Re: Fibonacci based sum that is b-normal on binary numbers
  • Previous by thread: Re: Solve and Reduce
  • Next by thread: Re: Why these definitions are so slow