MathGroup Archive 1998

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

Search the Archive

Re: Integrate Bug?


Examining the difference in the terms produced, the "bug" is much easier
to reproduce

In[1]:= awm = Log[1-W]

Out[1]= Log[1 - W]

In[2]:= Integrate[D[awm,W],W]

Out[2]= Log[-1 + W]

But if you do the integration normally, the answer is "Log[Abs[-1 +
W]]." Since Mathematica
can't know what the value of W (or b Nt W in your case) is, it seems to
assume > 1.  I would
just use /. Log[a_] :> Log[Abs[a_]] before making your numerical
substitutions.

Alan


Ed Hall wrote:
> 
> The following integration problem appears to be a bug in Mathematica's
> Integrate function and Wolfram's technical support has been unable to
> help so far. I was hoping someone reading this newsgroup might be able
> to come up with a solution.
> 
> In[8]:= test = D[F, W]
>
> In[9]:= F1 = FullSimplify[Integrate[test, W]]
> 
> 
> In[10]:= N[F /. {b -> 1, Nt -> 2, u -> 2, w -> -1, W -> 0.25, a -> 1,
>     R -> 1, T -> 1}]
> 
> Out[10]= 0.662394
> 
> Substituting numeric values into the expression F1 after differentiation
> and  integration.
> 
> In[11]:= N[F1 /. {b -> 1, Nt -> 2, u -> 2, w -> -1, W -> 0.25, a -> 1,
>     R -> 1, T -> 1}]
> 
> Out[11]= 0.662394 - 4.06174 I
> 
> The result F1 of the integration is complex whereas the original
> expression F before differention is real.  How can I insure F1 will be
> real and equal to F?
> 

-- 
Alan W. Mahoney			mahoney at purdue.edu 1283 Chemical Engineering	Room B5
West Lafayette, IN  47907-1283	765+494-4052


  • Prev by Date: Re: Starting Sound in Mathematica for Windows
  • Next by Date: Re: installing TeXSave math fonts
  • Previous by thread: Re: Integrate Bug?
  • Next by thread: Re: Re: Integrate Bug?