7
$\begingroup$

fixed in 10.0.2


Update

I have tried like these. I think there is a bug.

Plot[1/Sqrt[-1 + 2^2 Sech[x]^2], {x, 0, ArcCosh[2]},
 Ticks -> {{ArcCosh[2]}, Automatic}]

Blockquote

This is the antiderivative.

primitive = Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], x]; 

Plot[primitive, {x, 0, ArcCosh[2]},
 Ticks -> {{ArcCosh[2]}, {π/4, π/2}}]

Blockquote

Limit[primitive, x -> 0]

0

So far, that's right. Look at this any situation. Limits of primitive are same regardless of the direction. And the limit value is minus. Is this right?

(version 10)

Limit[primitive, x -> ArcCosh[2], Direction -> -1] // FullSimplify

-π/2

Limit[primitive, x -> ArcCosh[2], Direction -> 1] // FullSimplify

-π/2

But this computation is right at version 9

(version 9)

Limit[primitive, x -> ArcCosh[2], Direction -> 1] // FullSimplify

π/2

And as mentioned earlier origin, the definite integral is an erroneous conclusion at version 9 also.

===============================================================

Edit

The definite integral is solved using substitution method as Dr. Wolfgang Hintze says like this.

$u$ =$\frac{\cosh ^2(x)-1}{a^2-1}$

$dx$ = $\frac{\left(a^2-1\right)}{2 \sinh (x) \cosh (x)}du$

$\int_0^1 \frac{a^2-1}{2 \sinh (x) \cosh (x) \sqrt{a^2 \text{sech}^2(x)-1}} \, du$

$\frac{1}{2} \int_0^1 \frac{a^2-1}{\sqrt{a^2 \sinh ^2(x)-\sinh ^2(x) \cosh ^2(x)}} \, du$

$\frac{1}{2} \int_0^1 \frac{1}{\sqrt{\frac{\left(\cosh ^2(x)-1\right) \left(a^2-\cosh ^2(x)+1-1\right)}{\left(a^2-1\right) \left(a^2-1\right)}}} \, du$

$\frac{1}{2} \int_0^1 \frac{1}{\sqrt{u (1-u)}} \, du=\frac{\pi }{2}$

It is solved in the real number region. And ArcCos[2]is also real number. But I don't konw why mathematica make $\int_0^{\cosh ^{-1}(2)} \frac{1}{\sqrt{2^2 \text{sech}^2(x)-1}}\, dx$ appear a imaginary term like $\left(\frac{1}{2}-i\right) \pi$ .

===============================================================

Origin

I have tried two expressions.(version 10)

(1)

 Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], {x, 0, ArcCosh[2]}]

$\left(\frac{1}{2}-i\right) \pi$

(2)

$Assumptions = {a > 1}; 
Integrate[1/Sqrt[-1 + a^2*Sech[x]^2], {x, 0, ArcCosh[a]}]

$\frac{\pi }{2}$

  1. What difference does it make it?

  2. The first computing (1) makes the imaginary term. - I π. I don't know why it did such result?

(version 9)

 Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], {x, 0, ArcCosh[2]}]

$\frac{3 \pi }{2}$

  1. If possible, I want to know mathematica's detail process.
$\endgroup$
  • $\begingroup$ (at)Junho Lee: the integral is independent of "a". In fact, substituting u = (Cosh[x]^2-1)/(a^2-1) leads to 1/2 Integrate[1/Sqrt[u(1-u),{u,0,1}] = pi/2. This result is also returned in version 8 of MMA under the (natural) assumption a>1. $\endgroup$ – Dr. Wolfgang Hintze Sep 22 '14 at 7:00
  • $\begingroup$ Here you'll find why imaginary terms can appear Why does Integrate declare a convergent integral divergent? $\endgroup$ – Artes Sep 22 '14 at 9:14
  • $\begingroup$ @Dr. Wolfgang Hintze: thanks I have got the solution by your method. but I don't know why does the imaginary term appear. thanks a lot. $\endgroup$ – Junho Lee Sep 22 '14 at 11:50
  • 1
    $\begingroup$ Regarding the process, in this example Mathematica uses the Newton-Leibniz method. (1) Find an antiderivative. (2) Check integration path for possible singularities. (3) Evaluate between consecutive point pairs comprised of path endpoints and singularities, if any. Take limits from appropriate directions to do these evaluations (this is how jump discontinuities get managed). As for the bug in question... $\endgroup$ – Daniel Lichtblau Sep 24 '14 at 18:20
  • 1
    $\begingroup$ ... The singularity detection code finds a "jump" point, in the range [0, arccosh(2)]. The trouble arises from the following bad interaction: (1) The antiderivative takes a jump at that endpoint arccosh(2) (not a problem in and of itself), and (2) the singular point is found to be Log[7 + 4*Sqrt[3]]/2, which is not recognized as being equal to that endpoint of ArcCosh[2]. So an excess pair of limits are evaluated and they give a jump value that does not belong in the definite integral. Fix is to do a better job of determining when a "singlar" point is actually a path endpoint. $\endgroup$ – Daniel Lichtblau Sep 24 '14 at 18:28
3
$\begingroup$

It seems to be a branch cut issue. It depends when the substitution is done, that causes the integrator to go one way vs. the other. This below shows difference

ClearAll[x, a];
sol = Integrate[1/Sqrt[-1 + a^2*Sech[x]^2], x]

The integrand at x=0 is always zero, so we can ignore this, The issue is with the upper limit

low = Limit[sol, x -> 0]
(*0*)

Taking the limit using ArcCosh[a] first, then after that replacing a by 2 :

up = Limit[sol, x -> ArcCosh[a]]
Limit[up, a -> 2]
(*  -Pi/2 *)

Now taking the limit using ArcCosh[2] first then replacing a by 2 :

up = Limit[sol, x -> ArcCosh[2]]
Limit[up, a -> 2]
(* Pi/2 *)

So depending when a is set to 2 causes different result. This would indicate a branch cut issue.

$\endgroup$
3
$\begingroup$

This has been fixed in 10.0.2. On windows 7, 64 bit:

Mathematica graphics

Mathematica graphics

$\endgroup$
  • $\begingroup$ I think that Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], {x, 0, ArcCosh[2]}] should be Pi/2 $\endgroup$ – Junho Lee Dec 20 '14 at 13:28
  • $\begingroup$ @JunhoLee Well, may be, but looking at: r = Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], x]; Limit[r, x -> ArcCosh[2]] - Limit[r, x -> 0]; N[%] gives -Pi/2 and -Pi/2 is actually the same as 3 Pi/2 However, NIntegrate[1/Sqrt[-1 + 2^2*Sech[x]^2], {x, 0, ArcCosh[2]}] gives Pi/2. So I am not sure. May be someone knows. $\endgroup$ – Nasser Dec 20 '14 at 13:41
  • 1
    $\begingroup$ @JunhoLee I also just verified it with Rubi, it also gives -Pi/2 or 3 Pi/2 : !Mathematica graphics so I think the symbolic result is correct. May be there is problem with numerical integration. $\endgroup$ – Nasser Dec 20 '14 at 13:49
  • $\begingroup$ @JunhoLee fyi, in 10.1 Integrate[1/Sqrt[-1 + 2^2*Sech[x]^2], {x, 0, ArcCosh[2]}] gives Pi/2, but with some message as well. Screen shot !Mathematica graphics $\endgroup$ – Nasser Apr 2 '15 at 10:58
1
$\begingroup$
$Version

"10.0 for Mac OS X x86 (64-bit) (September 10, 2014)"

$Assumptions = {a > 1};
Integrate[1/Sqrt[-1 + a^2*Sech[x]^2], {x, 0, ArcCosh[a]}]

Pi/2

f[a_?NumericQ] := Module[
  {ar = Rationalize[a, 0]},
  NIntegrate[
    1/Sqrt[-1 + ar^2*Sech[x]^2],
    {x, 0, ArcCosh[ar]},
    WorkingPrecision -> 20] //
   Chop]

RootApproximant[f[2]/Pi]*Pi

Pi/2

Plot[f[a], {a, 1, 5},
 Exclusions -> 1,
 PlotRange -> Pi/2 {.9, 1.1}]

enter image description here

The integral is a constant Pi/2 for a > 1, the integral result with the imaginary component is wrong.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.