Group Abstract Group Abstract

Message Boards Message Boards

0
|
225 Views
|
3 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Wolfram|Alpha expression for the indefinite integral ∫ ln(x+f)/(x+a) dx is not always valid?

Posted 20 days ago

Asked for the indefinite integral

⌠ln(x+f)
⎮─────── dx
⌡  x+a

Wolfram|Alpha returns

          ⎛  f+x⎞              ⎛a+x⎞
I(x) ≡ Li₂⎜- ───⎟ + log(f+x)log⎜───⎟ + const.
          ⎝  a-f⎠              ⎝a-f⎠

For a = 1.2 - 3.4*i and f = 5.6 - 7.8*i, computing the definite integral between x=2.1 and x=2.3 using this expression yields I(2.3) - I(2.1) = -4.8411 - 11.4393 i, as shown here. But, if instead Wolfram|Alpha is queried directly for the definite integral between x=2.1 and x=2.3, it returns 0.0937041 + 0.0475201 i, as shown here. What is going on?

The two methods of evaluation seem to agree for other integration bounds. E.g., for the integral between x=2.3 and x=2.5, both query types yield 0.0922966 + 0.0442528 i, as shown here and here.

Does anyone know what's happening for the integral between x=2.1 and x=2.3? I'm surprised that Wolfram|Alpha doesn't provide a robust answer as the integral in question arises in the fairly prosaic context of evaluating

          Re(f)
⌠     1  ⌠              1
⎮ dx ─── ⎮      dy ───────────
⌡    x+a ⌡         x+y+i*Im(f)
POSTED BY: Brent Page
3 Replies

The indefinite integral has a branch cut discontinuity in your interval:

Block[{a = 1.2 - 3.4 I, f = 5.6 - 7.8 I},
 ReImPlot[ Log[(a + x)/(a - f)] Log[f + x] +
   PolyLog[2, -((f + x)/(a - f))],
  {x, 2, 2.5}]]

That is why it cannot be used (directly) in calculating the definite integral.

POSTED BY: Gianluca Gorni
Posted 19 days ago

Ah I see, thanks. As you indicate, correcting I(2.3) - I(2.1) (where I(x) is the indefinite integral returned by Wolfram|Alpha) for the discontinuity ΔI = I(lim x-> 2.2+) - I(lim x-> 2.2-) across the branch cut at x=x'≡2.2,

                                    ⎛   ⎛ f+x′⎞            ⎞
ΔI = (ΔLi₂) + log(f+x′)(Δlog) = 2πi ⎜log⎜-────⎟ - log(f+x′)⎟ = -4.9348 - 11.4868 i
                                    ⎝   ⎝ a-f ⎠            ⎠
  • the Li₂ argument -(f+x)/(a-f) passes from the lower half to the upper half plane, so the discont in Li₂ is +2 π i * log(-(f+x')/(a-f))
  • the log argument (a+x)/(a-f) passes from the upper half to the lower half plane, so the discont in log is -2πi
  • [evaluation using Wolfram|Alpha for reference][1]

yields I(2.3) - I(2.1) - ΔI = 0.0937 + 0.0475 i, which agrees with the definite integral reported by Wolfram|Alpha.

I was interested to see whether Wolfram can automatically apply such branch cut crossing corrections for definite integrals. The example above suggests it can, but Wolfram could be falling back on numerical integration to do the definite integral. So, I tried an integral with the same form but with parameters

  • a=1.2-3.4e-7*i
  • f=5.6-7.8*i

from x=-1.3 to x=-1.1 . It should be problematic for numerical integrators because the denominator passes near 0 at x=-1.2.

Wolfram|Alpha [reports][2] the definite integral to be 3.22989 + 6.8354 * i. But, if instead the indefinite integral I(x) is used with care taken to correct for the branch cut crossing at x=Im(a*conj(f))/Im(f-a)=-1.19999980821..., the result is inconsistently [given][3] as 3.33223 + 6.90663 * i. The results from 1.) Wolfram|Alpha definite integration and from 2.) I(x) with a branch cut crossing correction converge if a is changed to a=1.2-3.4e-2*i, as shown [here][4] and [here][5] (the branch cut crossing is at x=-1.180736544... in this case). This can be attributed to the near zero in the denominator at x=-1.2 being less severe and so less problematic for numerical integrators than for a=1.2-3.4e-7*i .

From this, I conclude that

  • Wolfram|Alpha at least sometimes uses numerical integration to evaluate definite integrals with the form

    x₂
    ⌠   ln(x+f)
    ⎮   ─────── dx
    ⌡     x+a
    x₁
    
  • Doing analytical integration using the indefinite integral I(x) would be superior, but this would require that log and Li₂ be monitored for branch cuts. I wonder why Wolfram|Alpha doesn't take this approach. Maybe it would be hard to incorporate in a systematic way into the general analytical integration algorithm?

POSTED BY: Brent Page
Posted 17 days ago

Oh right, thanks. Tried to post a longer reply but the mods aren't having it.

POSTED BY: Brent Page
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard