       • To: mathgroup at smc.vnet.net
• Subject: [mg72256] Re: [mg72229] Please help overcome problems with integration
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Sat, 16 Dec 2006 05:18:28 -0500 (EST)
• References: <200612151206.HAA00084@smc.vnet.net>

```aaronfude at gmail.com wrote:
> Hi,
>
> This is similar to my previous posts, but I have worked hard to come up
> with the simplest possible example which highlights what ought to be
> considered in bug in Mathematica. Please comment and suggest a work
> around.
>
> F = Log[(-1 + d x + e Sqrt[f + 2g x + h  x^2])];
> st = Integrate[F, x];
>
> specific = st /. { d -> -2, e -> 10, f -> 1.3, g -> -1, h -> 1 };
> (specific /. x -> 1 ) - (specific /. x -> 0)
> NIntegrate[F /.  { d -> -2, e -> 10, f -> 1.3, g -> -1, h -> 1 }, {x,
> 0, 1}]
>
> The results are:
>
> -1.25713 - 4.44^-16*I
>
> and
>
> 1.6552
>
> Thank you very much in advance!
>
> Aaron Fude

Comment: It's not a bug that the antiderivative, evaluated at endpoints,
does not give the definite integral. The antiderivative has functions
with branch cuts.

Workaround: Use the parameter values in a definite integral.

ee = Log[-1+d*x+e*Sqrt[f+2*g*x+h*x^2]];

rul = {d->-2, e->10, f->13/10, g->-1, h->1};

In:= NIntegrate[ee/.rul, {x,0,1}]
Out= 1.6552

InputForm[ii = Integrate[ee/.rul, {x,0,1}]]

Out//InputForm=
(-4352 - 272*Sqrt*ArcTan[1/Sqrt] - 42*Sqrt[22*(57 -
(5*I)*Sqrt)]*
ArcTan[(103*((-11*I)*Sqrt + 27*Sqrt))/
(97*(27*Sqrt - (5*I)*Sqrt))] -
(42*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*
ArcTanh[(103*(11*Sqrt - (27*I)*Sqrt))/
(97*(27*Sqrt + (5*I)*Sqrt))] + 74*Sqrt[570 + (50*I)*Sqrt]*
ArcTanh[(103*(11*Sqrt - (27*I)*Sqrt))/
(97*(27*Sqrt + (5*I)*Sqrt))] - 2312*Log +
(21*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*Log -
(21*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*Log +
37*Sqrt[570 + (50*I)*Sqrt]*Log -
(21*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*Log +
(21*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*Log -
37*Sqrt[570 + (50*I)*Sqrt]*Log + 4352*Log[-3 + Sqrt] -
(21*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*
Log[249*I + 5*Sqrt + (16*I)*Sqrt[3*(57 - (5*I)*Sqrt)]] +
37*Sqrt[570 + (50*I)*Sqrt]*Log[249*I + 5*Sqrt +
(16*I)*Sqrt[3*(57 - (5*I)*Sqrt)]] + 37*Sqrt[570 -
(50*I)*Sqrt]*
((2*I)*ArcTan[(103*((-11*I)*Sqrt + 27*Sqrt))/
(97*(27*Sqrt - (5*I)*Sqrt))] +
Log[(3*(-249*I + 5*Sqrt - (16*I)*Sqrt[3*(57 + (5*I)*Sqrt)]))/
448]) + (21*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*
Log[-249*I + 5*Sqrt - (16*I)*Sqrt[3*(57 + (5*I)*Sqrt)]])/4352 +
(-1360*ArcSinh[Sqrt[10/3]] + 272*Sqrt*ArcTan[17/Sqrt] -
(42*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*
ArcTanh[(7711847*Sqrt + (30516153*I)*Sqrt +
(1005856*I)*Sqrt[143*(57 - (5*I)*Sqrt)])/(18879807*Sqrt +
(2574065*I)*Sqrt)] + 74*Sqrt[570 + (50*I)*Sqrt]*
ArcTanh[(7711847*Sqrt + (30516153*I)*Sqrt +
(1005856*I)*Sqrt[143*(57 - (5*I)*Sqrt)])/(18879807*Sqrt +
(2574065*I)*Sqrt)] + (42*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*
ArcTanh[(7711847*Sqrt - (30516153*I)*Sqrt -
(1005856*I)*Sqrt[143*(57 + (5*I)*Sqrt)])/(18879807*Sqrt -
(2574065*I)*Sqrt)] + 74*Sqrt[570 - (50*I)*Sqrt]*
ArcTanh[(7711847*Sqrt - (30516153*I)*Sqrt -
(1005856*I)*Sqrt[143*(57 + (5*I)*Sqrt)])/(18879807*Sqrt -
(2574065*I)*Sqrt)] + 2312*Log -
(21*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*Log +
(21*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*Log -
37*Sqrt[570 - (50*I)*Sqrt]*Log - 37*Sqrt[570 + (50*I)*Sqrt]*
Log + (21*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*Log -
(21*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*Log +
37*Sqrt[570 - (50*I)*Sqrt]*Log +
37*Sqrt[570 + (50*I)*Sqrt]*Log +
(21*I)*Sqrt[22*(57 + (5*I)*Sqrt)]*
Log[2477*I + 65*Sqrt + (38*I)*Sqrt[741 - (65*I)*Sqrt]] -
37*Sqrt[570 + (50*I)*Sqrt]*Log[2477*I + 65*Sqrt +
(38*I)*Sqrt[741 - (65*I)*Sqrt]] -
(21*I)*Sqrt[22*(57 - (5*I)*Sqrt)]*
Log[-2477*I + 65*Sqrt - (38*I)*Sqrt[741 + (65*I)*Sqrt]] -
37*Sqrt[570 - (50*I)*Sqrt]*Log[-2477*I + 65*Sqrt -
(38*I)*Sqrt[741 + (65*I)*Sqrt]])/4352

In:= Chop[N[ii]]
Out= 1.6552

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Definite integrals in Mathematica
• Next by Date: Re: Please help overcome problems with integration