13

I know that:

$$\int\limits_0^\infty \left(\sqrt{x}-\sqrt{\sqrt{1+x^2}-1}\,\right)\sin{x}\,\text{d}x = \frac{1}{2}\,\sqrt{\frac{\pi}{2}}\,\frac{e-1}{e}$$

but

Integrate[(Sqrt[x] - Sqrt[Sqrt[1 + x^2] - 1]) Sin[x], {x, 0, Infinity}]

yields the integral itself in output after a few seconds.

Is there a way to get the correct result or can MMA provide only an approximation?


I found a way to fool MMA, that is to expand the double radical:

Integrate[(Sqrt[x] - Sqrt[(-1 + I x)/2] - Sqrt[(-1 - I x)/2]) Sin[x], {x, 0, Infinity}]
((-1 + E) Sqrt[\[Pi]/2])/(2 E)

Is there a command that does this automatically?


Deepening further, I noticed that by writing:

Plot[Sqrt[Sqrt[1 + x^2] - 1] - (Sqrt[(-1 + I x)/2] + Sqrt[(-1 - I x)/2]), {x, -10, 10}]

we get:

enter image description here

and this, if I am not mistaken, indicates that MMA does not have an algorithm that can establish its equivalence.

m0nhawk
  • 3,867
  • 1
  • 20
  • 35
πρόσεχε
  • 4,452
  • 1
  • 12
  • 28
  • For the approximation, you could use NIntegrate. – JungHwan Min Jul 12 '18 at 17:42
  • Ok I correct the comment. You can check with NIntegrate code: Sqrt[Pi/2]/2*((E - 1)/E) - NIntegrate[(Sqrt[x] - Sqrt[Sqrt[1 + x^2] - 1])*Sin[x], {x, 0, Infinity}, WorkingPrecision -> 200] almost zero. – Mariusz Iwaniuk Jul 12 '18 at 18:56
  • 1
    @MariuszIwaniuk You can verify the solution like that, but you cannot compute it (plus, being close does not necessarily mean they're equal). The assumption here is that you don't know the solution $\frac{1}{2},\sqrt{\frac{\pi}{2}},\frac{e-1}{e}$ a priori. – JungHwan Min Jul 12 '18 at 19:28
  • 3
    The questions arise: isn't it art for art's sake? where is this integral applied? – user64494 Jul 12 '18 at 19:32
  • Note sure if useful, but your integral can also be written as a sum: -Cos[1] + Sqrt[Pi/2] FresnelC[Sqrt[2/Pi]] + Sum[((-1)^(1 + n) (-1 + n) Sqrt[2/Pi] Gamma[-(7/2) + 2 n] HypergeometricPFQ[{-(1/2) + n}, {3/2, 1/2 + n}, -(1/4)])/Gamma[2 n] - ((1/16 + I/16) I^n (-I + (-1)^n) (Gamma[5/4 - n/2] Gamma[-(1/2) + n] HypergeometricPFQRegularized[{5/4 - n/2}, {3/2, 9/4 - n/2}, -(1/4)] + 4 Sqrt[Pi] Sec[n Pi] Sin[1/4 (Pi + 2 n Pi)]))/Gamma[1 + n], {n, 1, Infinity}]. – AccidentalFourierTransform Jul 12 '18 at 20:35
  • Note: Mathematica can evaluate the asymptotic part of the integrand Integrate[ Sin[x]/(2 Sqrt[x] ), {x, 0, Infinity} ](*Sqrt[\[Pi]/2]/2*) – Ulrich Neumann Jul 13 '18 at 06:14
  • 1
    How you expand the double radical? Could you explain and update the question? – Mariusz Iwaniuk Jul 13 '18 at 21:45
  • related?: https://mathematica.stackexchange.com/questions/15920/how-do-i-simplify-expressions-with-square-roots/15926#15926 [Though there the nested roots are purely numeric -- they don't include a variable.] – theorist Jul 15 '18 at 02:06

3 Answers3

7

FWIW, Wolfram|Alpha can denest this radical:

radical = WolframAlpha[
  "Simplify[Sqrt[Sqrt[1 + x^2] - 1]]", 
  {{"Result", 1}, "ComputableData"}
][[1]]

enter image description here

Integrate[(Sqrt[x] - radical) Sin[x], {x, 0, ∞}]
((-1 + E) Sqrt[\[Pi]/2])/(2 E)
Greg Hurst
  • 35,921
  • 1
  • 90
  • 136
5

FWIW, you can de-nest roots using the identity

$$\sqrt{\frac{1}{2} (-a+i b x)}+\sqrt{\frac{1}{2} (-a-i b x)}=\sqrt{\sqrt{a^2+b^2 x^2}-a}$$ from which it follows that $$ \int_{\mathbb R^+}\sqrt{\sqrt{a^2+b^2 x^2}-a}\ \sin x\mathrm dx=\frac{1}{2} \sqrt{\frac{\pi }{2}} \sqrt{b} \left(1-e^{-\frac{a}{b}}\right) $$ as given by

Integrate[
          (Sqrt[b x] - Sqrt[(-a + I x b)/2] - Sqrt[(-a - I x b)/2]) Sin[x]
         , {x, 0, Infinity}, Assumptions -> a > 0 && b > 0
]

Your integral corresponds to $a=b=1$,

% /. {a -> 1, b -> 1}
(* 1/2 (1 - 1/E) Sqrt[Pi/2] *)

as expected.

  • 3
    In general, radical de-nesting is a non-trivial problem. You can find some more details on the wikipedia page, https://en.wikipedia.org/wiki/Nested_radical. – AccidentalFourierTransform Jul 14 '18 at 22:08
  • 3
    Doesn't the OP already have the de-nesting in the question, and asks, "Is there a command that does this automatically?" – Michael E2 Jul 14 '18 at 22:10
1

1 2

(
−
a
+
i
b
x
)

  • 1 2

    ( − a − i b x )

=

    a
    2

  +

    b
    2


    x
    2


−
a



It seems that Mathematica does not know this way of expanding the nested square root. For example, changing the integrate to something else will still result in the unevaluated form. I think this is a bug or something.

t-smart
  • 2,031
  • 8
  • 21