20

Right, so as the final step of my project draws near and after having made a bad layout sort of question, I am posting a new one very clear and unambiguous. I need to find this specific definite integral which Mathematica could not solve:

$$ \int_{x=0}^\pi \frac{\cos \frac{x}{2}}{\sqrt{1 + A \sin^2 \frac{x}{2}}} \sin \left( \frac{1+A}{\sqrt{A}} \omega \tanh^{-1} \frac{\cos \frac{x}{2}}{\sqrt{1 + A \sin^2 \frac{x}{2}}} \right) \, dx.$$

where $ 0<A<1 $ and $ \omega > 0 $ are parameters of the problem. I tried to use a substitution of the argument of the hyperbolic arctan but that seemed to make it worse. I was posting here in the hopes of receiving help, if someone could tell me if it is at all possible to solve it analytically via a trick of sorts or a clever substitution, or maybe it is an elliptic integral in disguise. I thank all helpers.

** My question on the Melnikov integral can be found here I just used trig identities to soften it up

Croc2Alpha
  • 3,927
  • 1
    Why would it help to have an analytic value, as opposed to a numeric value? Is "omega" a constant? – hardmath Jul 11 '16 at 18:23
  • @hardmath : yes omega is constant I just figured analytic would be easier to handle afterwards – Croc2Alpha Jul 11 '16 at 18:23
  • 4
    I think it would be extremely helpful to know the origin of such integral, as probably the real or imaginary part of something way more manageable, and probably related with an elliptic integral. Moreover, the substitution $x/2=t$ removes some syntactical mess. – Jack D'Aurizio Jul 11 '16 at 18:25
  • The origin of this integral is the Melnikov integral of a dynamical system asked about here and manipulated by me and the kind helpers on the site on this link: http://math.stackexchange.com/questions/1853921/finding-a-specific-improper-integral-on-a-solution-path-to-a-2-dimensional-syste – Croc2Alpha Jul 11 '16 at 18:26
  • 1
    unfortunately mathematica is an extremely limited software... you will notice that it fails for practically everything except some narrow group of calculations. – Masacroso Jul 11 '16 at 18:27
  • @Masacroso : I figured it out, unfortunately – Croc2Alpha Jul 11 '16 at 18:27
  • 1
    By the way, setting $x/2=\arcsin(y)$ gives a little bit nicer form to the integral. – tired Jul 11 '16 at 20:17
  • @tired but would it make it solvable? – Croc2Alpha Jul 11 '16 at 20:18
  • 1
    Not for me at the moment, but it MAY be a starting point – tired Jul 11 '16 at 20:19
  • 13
    @Masacroso "unfortunately mathematica is an extremely limited software": you nominate for the most mindblowing comment of all times. –  Jul 12 '16 at 11:08
  • @YvesDaoust Ya, bueno, supongo. Si escribiese en español quizá mis comentarios no fuesen tan "alucinantes" ;) – Masacroso Jul 14 '16 at 15:02
  • @FelixMarin : How is this related to my problem? – Croc2Alpha Jul 15 '16 at 12:11
  • @FelixMarin : I appreciate your assistance but could you please show me this relation to my problem? – Croc2Alpha Jul 15 '16 at 12:19
  • @Masacroso I believe you mean "serían" instead of "fuesen" :). – YoTengoUnLCD Jul 17 '16 at 16:52
  • No @YoTengoUnLCD, "serían" se refiere a una posibilidad, "fuesen" a un hecho. No sólo eso, hay que cuidar la concordancia de tiempos verbales: "sería" no es imperfecto de subjuntivo ;) – Masacroso Jul 17 '16 at 17:58

4 Answers4

22

Let $\mathcal{I}$ be the integral at hand and $B = \frac{1+A}{\sqrt{A}}\omega$. Introduce variables $y, t, \theta, z$ such that

$$y = \sin\frac{x}{2},\quad t = \tanh\theta = \frac{\cos\frac{x}{2}}{\sqrt{1+A\sin^2\frac{x}{2}}}\quad\text{ and }\quad z = e^\theta$$

Notice $$t = \sqrt{\frac{1-y^2}{1+Ay^2}} \implies y = \sqrt{\frac{1-t^2}{1+At^2}} \implies \frac{dy}{\sqrt{1+Ay^2}} = - \frac{t\sqrt{A+1}dt}{\sqrt{1-t^2}(1+At^2)} $$ and $dt = (1-t^2)d\theta$, we have $$\begin{align} \mathcal{I} &= 2\int_0^1 \sin(B\theta)\frac{dy}{\sqrt{1+Ay^2}} = 2\sqrt{A+1}\int_0^1\sin(B\theta)\frac{t\sqrt{1-t^2}}{1+At^2}\frac{dt}{1-t^2}\\ &= 2\sqrt{A+1}\int_0^\infty \frac{\sin(B\theta)\sinh\theta}{\cosh^2\theta + A\sinh^2\theta} d\theta = -i\sqrt{A+1}\int_{-\infty}^\infty \frac{e^{iB\theta}\sinh\theta}{\cosh^2\theta + A\sin^2\theta} d\theta\\ &= -i2\sqrt{A+1}\int_0^\infty \frac{z^{iB}(z^2-1)}{(z^2+1)^2 + A(z^2-1)^2} dz \end{align} $$ Let $\phi = \tan^{-1}\sqrt{A}$, this can be simplified as $$ \mathcal{I} = -\frac{2i}{\sqrt{A+1}}\int_0^\infty \frac{z^{iB}(z^2-1)}{z^4 + 2\left(\frac{1-A}{1+A}\right) z^2 + 1} dz = -2i\cos\phi\int_0^\infty \frac{z^{iB}(z^2-1)}{(z^2+e^{2i\phi})(z^2+e^{-2i\phi})} dz$$ Consider following contour integral $$\mathcal{J(\epsilon,R)} \stackrel{def}{=} \oint_{C(\epsilon,R)} \frac{(-z)^{iB}(z^2-1)}{(z^2+e^{2i\phi})(z^2+e^{-2i\phi})} dz \tag{*1}$$ where

  • $\arg(-z) = 0$ on negative real axis.
  • $(-z)^{iB}$ has a branch cut along positive real axis.
  • $C(\epsilon,R)$ is the contour consists of

    • $C_1$ : line segment from $\epsilon \to R$ above the positive real axis.
    • $C_2$ : circular arc $Re^{iu}$ for $u$ from $0 \to 2\pi$.
    • $C_3$ : line segment $R \to \epsilon$ below the positive real axis.
    • $C_4$ : circular arc $\epsilon e^{iu}$ for $u$ from $2\pi \to 0$.

It is easy to see in $\mathcal{J}(\epsilon,R)$,

  • the contribution from $C_1$ and $C_3$ adds up to $$(e^{\pi B} - e^{-\pi B})\int_\epsilon^R \frac{z^{iB}(z^2-1)}{(z^2+e^{2i\phi})(z^2+e^{-2i\phi})} dz$$
  • the contribution from $C_4$ vanishes as $\epsilon \to 0$.
  • Since $B > 0$ is a real number, $|(-z)^{iB}|$ is bounded from above by $e^{\pi B}$ and the contribution from $C_2$ behaves as $O(R^{-1})$ as $R \to \infty$.

Combine these, we find

$$\mathcal{I} = -i\frac{\cos\phi}{\sinh(\pi B)}\lim_{\epsilon \to 0,R \to \infty} \mathcal{J}(\epsilon,R)$$

The integrand in $(*1)$ has 4 poles inside the contour: $\; e^{i(\frac{\pi}{2} \pm \phi)}\;$ and $\;e^{i(\frac{3\pi}{2} \pm \phi)}$.

  • The residues at $e^{i(\frac{\pi}{2} \pm \phi)}$ are $\displaystyle\;(e^{-(-\frac{\pi}{2} \pm \phi)B})\frac{-e^{\pm 2i\phi} - 1}{4i e^{\pm i\phi }(-e^{\pm 2i \phi} + \cos(2\phi))} = \mp\frac{e^{(\frac{\pi}{2}\mp \phi)B}}{4\sin\phi}$

  • The residues at $e^{i(\frac{3\pi}{2} \pm \phi)}$ are $\displaystyle\;(e^{-(\frac{\pi}{2} \pm \phi)B})\frac{-e^{\pm 2i\phi} - 1}{-4i e^{\pm i\phi }(-e^{\pm 2i \phi} + \cos(2\phi))} = \pm\frac{e^{(-\frac{\pi}{2}\mp \phi)B}}{4\sin\phi}$

This implies

$$\begin{align} \mathcal{I} &= \left(-i \frac{\cos\phi}{\sinh\pi B}\right)\left(\frac{2\pi i}{4\sin\phi}\right)\left[ -e^{(\frac{\pi}{2}-\phi)B} +e^{(\frac{\pi}{2}+\phi)B} +e^{(-\frac{\pi}{2}-\phi)B} -e^{(-\frac{\pi}{2}+\phi)B} \right]\\ &= \left(\frac{\cos\phi}{\sinh\pi B}\right)\left(\frac{2\pi}{4\sin\phi}\right) (e^{\frac{\pi}{2}B} - e^{-\frac{\pi}{2}B}) (e^{\phi B} - e^{-\phi B}) = \frac{\pi}{\tan\phi}\frac{\sinh(B\phi)}{\cosh\left(\frac{\pi}{2}B\right)}\\ &= \frac{\pi}{\sqrt{A}}\frac{\sinh(B\tan^{-1}\sqrt{A})}{\cosh\left(\frac{\pi}{2}B\right)} \end{align} $$ Treating $A, B$ as two independent parameters, in the limiting case $A \to 0$, we find $$\lim_{A\to 0} \mathcal{I} = \frac{\pi B}{\cosh\left(\frac{\pi}{2}B\right)}$$

This matches what first pointed out by @nospoon in the comments.

achille hui
  • 122,701
  • 4
    Amazing solution. I would delete my lazy 'answer', but at least I contributed the letter $B$ – Yuriy S Jul 17 '16 at 17:02
  • 3
    Very nice calculation. I have just arrived at this result with the command Integrate[(x^(B I) - x^(-B I))/((x + 1/x)^2 + A^2 (x - 1/x)^2), {x, 0, Infinity}] which I guess dispels the accusations against Mathematica in the comments on the OP. – Noam Shalev - nospoon Jul 17 '16 at 17:10
  • 1
    @You'reInMyEye you should keep your answer. The advice there is useful for the general case. It is not very common one can integrate such an complicated integral and obtain a simple expression at the end. – achille hui Jul 17 '16 at 17:12
  • 1
    One important note: What happens to $B$ when $A \to 0$? We probably have to make $\omega \to 0$ as well – Yuriy S Jul 17 '16 at 17:15
  • 1
    @You'reInMyEye I basically treat $A$, $B$ as two independent parameter. – achille hui Jul 17 '16 at 17:17
  • @achillehui : may I say, breathtaking and absolutely epic solution thank you so very very much – Croc2Alpha Jul 17 '16 at 18:48
6

This is not a full answer.From answer of user You're In My Eye .First, let's make the following substitutions:

$$y=\sin \frac{x}{2}$$

$$B=\frac{1+A}{\sqrt{A}} \omega$$

$$2 \int_0^1 \sin \left( B~ \text{arctanh}~\sqrt{\frac{1-y^2}{1+Ay^2}} \right) \frac{dy}{\sqrt{1+Ay^2}}$$ substitutions: $$y={\frac { \sqrt{- \left( A{t}^{2}+1 \right) \left( {t}^{2}-1 \right) }}{A{t}^{2}+1}} $$ Then we obtain: $$2\, \sqrt{A+1}\int_{0}^{1}\!{\frac {\sin \left( B{\rm arctanh} \left(t \right) \right) t}{ \left( A{t}^{2}+1 \right) \sqrt{-{t}^{2}+1}}} \,{\rm d}t $$ substitutions: $$t=\tanh \left( k \right) $$ have : $$2\,\sqrt {A+1}\int_{0}^{\infty }\!{\frac {\sin \left( Bk \right) \sinh \left( k \right) }{A \left( \cosh \left( k \right) \right) ^{2}+ \left( \cosh \left( k \right) \right) ^{2}-A}}\,{\rm d}k $$ trig identity: cosh(k)^2-sinh(k)^2 = 1 and A+1=m $$2\, \sqrt{A+1}\int_{0}^{\infty }\!{\frac {\sin \left( Bk \right) \sinh \left( k \right) }{1+ \left( A+1 \right) \left( \sinh \left( k \right) \right) ^{2}}}\,{\rm d}k \tag{1} $$ I have a simple form of integral: $$2\, \sqrt{m}\int_{0}^{\infty }\!{\frac {\sin \left( B k \right) \sinh \left( k \right) }{1+m \left( \sinh \left( k \right) \right) ^{2}}} \,{\rm d}k $$ Substitutions back $$B=\frac{1+A}{\sqrt{A}} \omega$$ to equation 1. I have: $$2\, \sqrt{A+1}\int_{0}^{\infty }\!{\frac {\sin \left(\frac{1+A}{\sqrt{A}} \omega k \right) \sinh \left( k \right) }{1+ \left( A+1 \right) \left( \sinh \left( k \right) \right) ^{2}}}\,{\rm d}k $$

Mathematica can find solution for this integral.

 A = 1/4;
 omega = 1;
 int = Normal[2*Sqrt[A + 1]*Integrate[(Sin[(1 + A)/Sqrt[A]*omega*k]*Sinh[k])/(
 1 + (A + 1)*Sinh[k]^2), {k, 0, Infinity}]]

 (*(1/1769)2 Sqrt[5] ((305 - 
  122 I) ((1/5 + (3 I)/20) Hypergeometric2F1[1, 1 - (5 I)/2, 
    2 - (5 I)/2, -((1 + 2 I)/Sqrt[5])] + (1/5 - (3 I)/
     20) Hypergeometric2F1[1, 1 - (5 I)/2, 
    2 - (5 I)/2, -((1 - 2 I)/Sqrt[5])] + (1/5 - (3 I)/
     20) Hypergeometric2F1[1, 1 - (5 I)/2, 2 - (5 I)/2, (1 - 2 I)/
    Sqrt[5]] + (1/5 + (3 I)/20) Hypergeometric2F1[1, 1 - (5 I)/2, 
    2 - (5 I)/2, (1 + 2 I)/Sqrt[5]]) + (5 + 
  2 I) (61 ((1/5 + (3 I)/20) Hypergeometric2F1[1, 1 + (5 I)/2, 
       2 + (5 I)/2, -((1 + 2 I)/Sqrt[5])] + (1/5 - (3 I)/
        20) Hypergeometric2F1[1, 1 + (5 I)/2, 
       2 + (5 I)/2, -((1 - 2 I)/Sqrt[5])] + (1/5 - (3 I)/
        20) Hypergeometric2F1[1, 1 + (5 I)/2, 2 + (5 I)/2, (
       1 - 2 I)/Sqrt[5]] + (1/5 + (3 I)/20) Hypergeometric2F1[1, 
       1 + (5 I)/2, 2 + (5 I)/2, (1 + 2 I)/Sqrt[5]]) + (2 + 
     5 I) ((6 + 
        5 I) ((1/5 + (3 I)/20) Hypergeometric2F1[1, 3 - (5 I)/2, 
          4 - (5 I)/2, -((1 + 2 I)/Sqrt[5])] + (1/5 - (3 I)/
           20) Hypergeometric2F1[1, 3 - (5 I)/2, 
          4 - (5 I)/2, -((1 - 2 I)/Sqrt[5])] + (1/5 - (3 I)/
           20) Hypergeometric2F1[1, 3 - (5 I)/2, 4 - (5 I)/2, (
          1 - 2 I)/Sqrt[5]] + (1/5 + (3 I)/20) Hypergeometric2F1[
          1, 3 - (5 I)/2, 4 - (5 I)/2, (1 + 2 I)/Sqrt[5]]) - (6 - 
        5 I) ((1/5 + (3 I)/20) Hypergeometric2F1[1, 3 + (5 I)/2, 
          4 + (5 I)/2, -((1 + 2 I)/Sqrt[5])] + (1/5 - (3 I)/
           20) Hypergeometric2F1[1, 3 + (5 I)/2, 
          4 + (5 I)/2, -((1 - 2 I)/Sqrt[5])] + (1/5 - (3 I)/
           20) Hypergeometric2F1[1, 3 + (5 I)/2, 4 + (5 I)/2, (
          1 - 2 I)/Sqrt[5]] + (1/5 + (3 I)/20) Hypergeometric2F1[
          1, 3 + (5 I)/2, 4 + (5 I)/2, (1 + 2 I)/Sqrt[5]]))))*)
  • 1
    This is great! Probably can be attacked by contour integration – Yuriy S Jul 17 '16 at 16:32
  • On the other hand, for $B=1$ and $m=3/2$ Mathematica gives a terrible expression with Hypergeometric functions of complex argument. I still stand by numerical methods, but your form of the integral is much easier to work with numerically – Yuriy S Jul 17 '16 at 16:49
6

Here is a sketch for a residue-free solution:

First, consider the formula $$\int_0^{\infty} \frac{\cos( a x)}{\cosh(\frac{\pi}{2} x)}dx = \operatorname{sech} a. \tag{1}$$

Since $\displaystyle \,\,\sin(a)\sin(b) = \frac12 \cos(a-b)-\frac12 \cos(a+b), \,\,$ we obtain $$ \int_0^{\infty} \frac{\sin( a x) \sin(b x)}{\cosh(\frac{\pi}{2} x)}dx = \frac12 \operatorname{sech}(a-b) - \frac12 \operatorname{sech}(a+b). \tag{2}$$

Now, using a fourier inversion argument $\displaystyle\left( f(a)=\int_0^{\infty} g(x)\sin(a x) dx \iff \frac{\pi}{2} g(a) = \int_0^{\infty} f(x) \sin(a x) dx \right),\,$ we obtain $$\int_0^{\infty} \sin( b x) ( \operatorname{sech}(a-x) - \operatorname{sech}(a+x)) dx = \pi \cfrac{ \sin(a b)}{\cosh( \frac{\pi}{2} b)}. \tag{3}$$

Finally, letting $a \mapsto i \tan^{-1} \sqrt{a},\,$ and noting that $$\operatorname{sech}(a-b) - \operatorname{sech}(a+b) = 2 \frac{\sinh a}{\cosh^2 a} \,\frac{\sinh b}{\cosh^2 b}\, \frac1{1-\tanh^2 a \, \tanh^2 b},$$

we find that

$$\frac{\pi}{\sqrt{a}} \cfrac{\sinh( b \tan^{-1} \sqrt{a} )}{\cosh( \frac{\pi}{2} b)} = 2 \sqrt{1+a} \int_0^{\infty} \cfrac{\sin(b x) \sinh x}{\cosh^2 x + a \, \sinh^2 x} dx, \tag{4}$$

which is exactly your integral, with $b= \frac{1+a}{\sqrt{a}} \omega,$ and the substitution $$\tanh^{-1} \frac{\cos \frac{x}{2}}{\sqrt{1+ a \sin^2 \frac{x}{2}}} \mapsto x. \tag{5}$$

5

I highly doubt this integral has any useful analytic form. I suggest you either use numerical integration or simplify your initial model to obtain a solvable integral.

Using @tired 's suggestion, we can make you integral much easier. First, let's make the following substitutions:

$$y=\sin \frac{x}{2}$$

$$B=\frac{1+A}{\sqrt{A}} \omega$$

Then we obtain:

$$I(A,B)=2 \int_0^1 \sin \left( B~ \text{arctanh}~\sqrt{\frac{1-y^2}{1+Ay^2}} \right) \frac{dy}{\sqrt{1+Ay^2}}$$

For the most simple case Mathematica gives:

$$B=1,~~A=0$$

$$I(0,1)=2\pi \frac{\sinh (\pi/2)}{\sinh \pi}$$

Mathematica can't take this integral even with $B=1,~A=1$. Neither with $A=0$ and $B$ not defined.

Which is why I think numerical methods is the only way for you. Numerically, the integral is very nice (and very weakly depends on $A$ by the way).

See the plots below for $I(A,B)$, for $A \in (0,1)$ and $B \in (0,4)$:

enter image description here

I'm aware this is not even close to answering your question, but you might find this useful.

And yes, there might be some connection with elliptic integrals, as you can see by the argument of the inverse hyperbolic tangent.


Edit

I was wrong - this integral is workable. See @MariuszIwaniuk 's much better answer!

And see @achillehui's answer for the final solution. With permission, I add the 3D plot of the exact solution to compare with numerical results:

enter image description here

All credit goes to achille hui!

Yuriy S
  • 31,474