MathGroup Archive 2007

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

Search the Archive

general

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78108] general
  • From: dimitris <dimmechan at yahoo.com>
  • Date: Sat, 23 Jun 2007 07:05:38 -0400 (EDT)

For newbies maybe the use of "stored cache results"
will appear confusing here is one example of this
phenomenon.

In[1]:=
f[x_, a_, b_, c_, d_] = x^(c - 1)*(Exp[-(x/d)]/(1 + Exp[(-a)*x - b]))

Out[1]=
x^(-1 + c)/(E^(x/d)*(1 + E^(-b - a*x)))

In[2]:=
ex = Thread[{a, b, c, d} -> {3, 2, 1, 4}]

Out[2]=
{a -> 3, b -> 2, c -> 1, d -> 4}

In[3]:=
Integrate[f[x, a, b, c, d] /. ex, {x, 0, Infinity}]

Out[3]=
(1/3)*(-1)^(1/12)*E^(1/6)*((-1)^(5/6)*Log[-(-1)^(1/12) + E^(1/6)] -
(-1)^(5/6)*Log[(-1)^(1/12) + E^(1/6)] +
   (-1)^(2/3)*Log[-(-1)^(1/4) + E^(1/6)] - (-1)^(2/3)*Log[(-1)^(1/4) +
E^(1/6)] + I*Log[-(-1)^(5/12) + E^(1/6)] -
   I*Log[(-1)^(5/12) + E^(1/6)] + (-1)^(1/3)*Log[-(-1)^(7/12) +
E^(1/6)] - (-1)^(1/3)*Log[(-1)^(7/12) + E^(1/6)] +
   (-1)^(1/6)*Log[-(-1)^(3/4) + E^(1/6)] - (-1)^(1/6)*Log[(-1)^(3/4) +
E^(1/6)] + Log[-(-1)^(11/12) + E^(1/6)] -
   Log[(-1)^(11/12) + E^(1/6)])

In[4]:=
FullSimplify[%]

Out[4]=
(1/3)*(-1)^(1/12)*E^(1/6)*Log[((1 + 2/(-1 +
(-1)^(1/4)*E^(1/6)))^(-1)^(1/6)*(1 + 2/(-1 +
(-1)^(5/12)*E^(1/6)))^(-1)^(1/3)*
     (1 + 2/(-1 + (-1)^(7/12)*E^(1/6)))^I*(1 + 2/(-1 +
(-1)^(3/4)*E^(1/6)))^(-1)^(2/3)*
     (1 + 2/(-1 + (-1)^(11/12)*E^(1/6)))^(-1)^(5/6)*(-(-1)^(11/12) +
E^(1/6)))/((-1)^(11/12) + E^(1/6))]

Now evaluate again the integral

In[5]:=
Integrate[f[x, a, b, c, d] /. ex, {x, 0, Infinity}]

Out[5]=
(1/3)*(-1)^(1/12)*E^(1/6)*Log[((1 + 2/(-1 +
(-1)^(1/4)*E^(1/6)))^(-1)^(1/6)*(1 + 2/(-1 +
(-1)^(5/12)*E^(1/6)))^(-1)^(1/3)*
     (1 + 2/(-1 + (-1)^(7/12)*E^(1/6)))^I*(1 + 2/(-1 +
(-1)^(3/4)*E^(1/6)))^(-1)^(2/3)*
     (1 + 2/(-1 + (-1)^(11/12)*E^(1/6)))^(-1)^(5/6)*(-(-1)^(11/12) +
E^(1/6)))/((-1)^(11/12) + E^(1/6))]

Dimitris



  • Prev by Date: Re: Re: bad performance of Reduce (5.2)
  • Next by Date: Re: Where is the Mathematica Book in
  • Previous by thread: Re: general
  • Next by thread: simple question