Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*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 2006

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

Search the Archive

Re: Please help overcome problems with integration

  • 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[8]:= NIntegrate[ee/.rul, {x,0,1}]
Out[8]= 1.6552

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

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

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


Daniel Lichtblau
Wolfram Research


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