       Re: Integrate Bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg13218] Re: Integrate Bug?
• From: Alan Mahoney <mahoney at purdue.edu>
• Date: Mon, 13 Jul 1998 07:43:07 -0400
• Organization: Purdue University
• References: <6nskhb\$fch@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

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

In:= awm = Log[1-W]

Out= Log[1 - W]

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

Out= 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:= test = D[F, W]
>
> In:= F1 = FullSimplify[Integrate[test, W]]
>
>
> In:= N[F /. {b -> 1, Nt -> 2, u -> 2, w -> -1, W -> 0.25, a -> 1,
>     R -> 1, T -> 1}]
>
> Out= 0.662394
>
> Substituting numeric values into the expression F1 after differentiation
> and  integration.
>
> In:= N[F1 /. {b -> 1, Nt -> 2, u -> 2, w -> -1, W -> 0.25, a -> 1,
>     R -> 1, T -> 1}]
>
> Out= 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?