Evaluating the integral $int_0^1 frac{cos bx}{sqrt{x^2+s^2} }dx$
up vote
7
down vote
favorite
I'd really love to evaluate this integral exactly in terms of known functions, because for large $b$ it becomes a pain numerically.
$$I(b,s)=int_0^1 frac{cos bx}{sqrt{x^2+s^2} }dx$$
Didn't get anywhere wth integration by parts, or series. I want an expression valid for both large and small values of the parameters.
Note: we have $b= pi n$, where $n$ is an integer.
For $s gg 1$ we can expand the root as a series and get a good approximation. However, this case is of small use to me, as in general $s$ is of the order of $1$ or smaller.
So here's my latest attempt:
Edited
$$x=s sinh v$$
$$I(b,s)=int_0^{sinh^{-1} frac{1}{s}} cos left(bs sinh v right) dv$$
Let's try integration by parts:
$$U=cos left(bs sinh v right) \ dV=dv$$
$$dU=-bssin left(bs sinh v right) cosh v \ V=v$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{sinh^{-1} frac{1}{s}} v sin left(bs sinh v right) cosh v dv$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{frac{1}{s}} sinh^{-1} r sin left(bs r right) dr$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx$$
This seems a little better, at least we separated the special case $I(0,s)$, which is the first term. Not sure how to continue.
Using the fact that $b= pi n$, we can transform the integral as:
$$b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx=pi sum_{k=0}^{n-1} (-1)^k int_0^1 sinh^{-1} left( frac{t+k}{ns} right) sin pi t dt$$
The function $sinh^{-1}$ is pretty nice, it has a logarithmic growth, and doesn't blow up anywhere. I guess, this could be the way to get a good approximation, especially since we have an alternating sum.
definite-integrals approximation closed-form
|
show 1 more comment
up vote
7
down vote
favorite
I'd really love to evaluate this integral exactly in terms of known functions, because for large $b$ it becomes a pain numerically.
$$I(b,s)=int_0^1 frac{cos bx}{sqrt{x^2+s^2} }dx$$
Didn't get anywhere wth integration by parts, or series. I want an expression valid for both large and small values of the parameters.
Note: we have $b= pi n$, where $n$ is an integer.
For $s gg 1$ we can expand the root as a series and get a good approximation. However, this case is of small use to me, as in general $s$ is of the order of $1$ or smaller.
So here's my latest attempt:
Edited
$$x=s sinh v$$
$$I(b,s)=int_0^{sinh^{-1} frac{1}{s}} cos left(bs sinh v right) dv$$
Let's try integration by parts:
$$U=cos left(bs sinh v right) \ dV=dv$$
$$dU=-bssin left(bs sinh v right) cosh v \ V=v$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{sinh^{-1} frac{1}{s}} v sin left(bs sinh v right) cosh v dv$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{frac{1}{s}} sinh^{-1} r sin left(bs r right) dr$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx$$
This seems a little better, at least we separated the special case $I(0,s)$, which is the first term. Not sure how to continue.
Using the fact that $b= pi n$, we can transform the integral as:
$$b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx=pi sum_{k=0}^{n-1} (-1)^k int_0^1 sinh^{-1} left( frac{t+k}{ns} right) sin pi t dt$$
The function $sinh^{-1}$ is pretty nice, it has a logarithmic growth, and doesn't blow up anywhere. I guess, this could be the way to get a good approximation, especially since we have an alternating sum.
definite-integrals approximation closed-form
Have you tried by using Contour Integration, Residue theorem etc. on the function $displaystyle frac{e^{ibz}}{sqrt{z^2+s^2}}$ around the contour $|z|=1$
– Sujit Bhattacharyya
Nov 15 at 12:32
@SujitBhattacharyya, I'm bad at contour integration, especially with roots, aren't there branch cuts to deal with? If you could show me how to do that...
– Yuriy S
Nov 15 at 12:33
If you just need an approximation why don't you use the trapezoidal rule or some other such method? WolframAlpha didn't seem to find any expansion in terms of standard mathematical functions.
– Sorin Tirc
Nov 15 at 12:51
@SorinTirc, approximation is the last option I'd consider, and trapezoidal rule is horrible for large $b$ (the function oscillates like crazy). I've used numerical methods on this, and they are slow and inaccurate, even with the best Mathematica has to offer. Moreover, see my edit. I think I'm on the right path with the exact evaluation...
– Yuriy S
Nov 15 at 12:53
1
In Mathematica11.3we can use command:AsymptoticIntegrate[Cos[b x]/Sqrt[ x^2 + s^2], {x, 0, 1}, {b, Infinity, 2}, Assumptions -> s > 0]and we get:$frac{sin (b)}{b sqrt{s^2+1}}-frac{cos (b)}{b^2 left(s^2+1right)^{3/2}}$ forb->Infinity
– Mariusz Iwaniuk
Nov 15 at 17:01
|
show 1 more comment
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I'd really love to evaluate this integral exactly in terms of known functions, because for large $b$ it becomes a pain numerically.
$$I(b,s)=int_0^1 frac{cos bx}{sqrt{x^2+s^2} }dx$$
Didn't get anywhere wth integration by parts, or series. I want an expression valid for both large and small values of the parameters.
Note: we have $b= pi n$, where $n$ is an integer.
For $s gg 1$ we can expand the root as a series and get a good approximation. However, this case is of small use to me, as in general $s$ is of the order of $1$ or smaller.
So here's my latest attempt:
Edited
$$x=s sinh v$$
$$I(b,s)=int_0^{sinh^{-1} frac{1}{s}} cos left(bs sinh v right) dv$$
Let's try integration by parts:
$$U=cos left(bs sinh v right) \ dV=dv$$
$$dU=-bssin left(bs sinh v right) cosh v \ V=v$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{sinh^{-1} frac{1}{s}} v sin left(bs sinh v right) cosh v dv$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{frac{1}{s}} sinh^{-1} r sin left(bs r right) dr$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx$$
This seems a little better, at least we separated the special case $I(0,s)$, which is the first term. Not sure how to continue.
Using the fact that $b= pi n$, we can transform the integral as:
$$b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx=pi sum_{k=0}^{n-1} (-1)^k int_0^1 sinh^{-1} left( frac{t+k}{ns} right) sin pi t dt$$
The function $sinh^{-1}$ is pretty nice, it has a logarithmic growth, and doesn't blow up anywhere. I guess, this could be the way to get a good approximation, especially since we have an alternating sum.
definite-integrals approximation closed-form
I'd really love to evaluate this integral exactly in terms of known functions, because for large $b$ it becomes a pain numerically.
$$I(b,s)=int_0^1 frac{cos bx}{sqrt{x^2+s^2} }dx$$
Didn't get anywhere wth integration by parts, or series. I want an expression valid for both large and small values of the parameters.
Note: we have $b= pi n$, where $n$ is an integer.
For $s gg 1$ we can expand the root as a series and get a good approximation. However, this case is of small use to me, as in general $s$ is of the order of $1$ or smaller.
So here's my latest attempt:
Edited
$$x=s sinh v$$
$$I(b,s)=int_0^{sinh^{-1} frac{1}{s}} cos left(bs sinh v right) dv$$
Let's try integration by parts:
$$U=cos left(bs sinh v right) \ dV=dv$$
$$dU=-bssin left(bs sinh v right) cosh v \ V=v$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{sinh^{-1} frac{1}{s}} v sin left(bs sinh v right) cosh v dv$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+bs int_0^{frac{1}{s}} sinh^{-1} r sin left(bs r right) dr$$
$$I(b,s)=cos b sinh^{-1} frac{1}{s}+b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx$$
This seems a little better, at least we separated the special case $I(0,s)$, which is the first term. Not sure how to continue.
Using the fact that $b= pi n$, we can transform the integral as:
$$b int_0^1 sinh^{-1} frac{x}{s} sin left(b x right) dx=pi sum_{k=0}^{n-1} (-1)^k int_0^1 sinh^{-1} left( frac{t+k}{ns} right) sin pi t dt$$
The function $sinh^{-1}$ is pretty nice, it has a logarithmic growth, and doesn't blow up anywhere. I guess, this could be the way to get a good approximation, especially since we have an alternating sum.
definite-integrals approximation closed-form
definite-integrals approximation closed-form
edited Nov 15 at 14:57
asked Nov 15 at 12:21
Yuriy S
15.3k433115
15.3k433115
Have you tried by using Contour Integration, Residue theorem etc. on the function $displaystyle frac{e^{ibz}}{sqrt{z^2+s^2}}$ around the contour $|z|=1$
– Sujit Bhattacharyya
Nov 15 at 12:32
@SujitBhattacharyya, I'm bad at contour integration, especially with roots, aren't there branch cuts to deal with? If you could show me how to do that...
– Yuriy S
Nov 15 at 12:33
If you just need an approximation why don't you use the trapezoidal rule or some other such method? WolframAlpha didn't seem to find any expansion in terms of standard mathematical functions.
– Sorin Tirc
Nov 15 at 12:51
@SorinTirc, approximation is the last option I'd consider, and trapezoidal rule is horrible for large $b$ (the function oscillates like crazy). I've used numerical methods on this, and they are slow and inaccurate, even with the best Mathematica has to offer. Moreover, see my edit. I think I'm on the right path with the exact evaluation...
– Yuriy S
Nov 15 at 12:53
1
In Mathematica11.3we can use command:AsymptoticIntegrate[Cos[b x]/Sqrt[ x^2 + s^2], {x, 0, 1}, {b, Infinity, 2}, Assumptions -> s > 0]and we get:$frac{sin (b)}{b sqrt{s^2+1}}-frac{cos (b)}{b^2 left(s^2+1right)^{3/2}}$ forb->Infinity
– Mariusz Iwaniuk
Nov 15 at 17:01
|
show 1 more comment
Have you tried by using Contour Integration, Residue theorem etc. on the function $displaystyle frac{e^{ibz}}{sqrt{z^2+s^2}}$ around the contour $|z|=1$
– Sujit Bhattacharyya
Nov 15 at 12:32
@SujitBhattacharyya, I'm bad at contour integration, especially with roots, aren't there branch cuts to deal with? If you could show me how to do that...
– Yuriy S
Nov 15 at 12:33
If you just need an approximation why don't you use the trapezoidal rule or some other such method? WolframAlpha didn't seem to find any expansion in terms of standard mathematical functions.
– Sorin Tirc
Nov 15 at 12:51
@SorinTirc, approximation is the last option I'd consider, and trapezoidal rule is horrible for large $b$ (the function oscillates like crazy). I've used numerical methods on this, and they are slow and inaccurate, even with the best Mathematica has to offer. Moreover, see my edit. I think I'm on the right path with the exact evaluation...
– Yuriy S
Nov 15 at 12:53
1
In Mathematica11.3we can use command:AsymptoticIntegrate[Cos[b x]/Sqrt[ x^2 + s^2], {x, 0, 1}, {b, Infinity, 2}, Assumptions -> s > 0]and we get:$frac{sin (b)}{b sqrt{s^2+1}}-frac{cos (b)}{b^2 left(s^2+1right)^{3/2}}$ forb->Infinity
– Mariusz Iwaniuk
Nov 15 at 17:01
Have you tried by using Contour Integration, Residue theorem etc. on the function $displaystyle frac{e^{ibz}}{sqrt{z^2+s^2}}$ around the contour $|z|=1$
– Sujit Bhattacharyya
Nov 15 at 12:32
Have you tried by using Contour Integration, Residue theorem etc. on the function $displaystyle frac{e^{ibz}}{sqrt{z^2+s^2}}$ around the contour $|z|=1$
– Sujit Bhattacharyya
Nov 15 at 12:32
@SujitBhattacharyya, I'm bad at contour integration, especially with roots, aren't there branch cuts to deal with? If you could show me how to do that...
– Yuriy S
Nov 15 at 12:33
@SujitBhattacharyya, I'm bad at contour integration, especially with roots, aren't there branch cuts to deal with? If you could show me how to do that...
– Yuriy S
Nov 15 at 12:33
If you just need an approximation why don't you use the trapezoidal rule or some other such method? WolframAlpha didn't seem to find any expansion in terms of standard mathematical functions.
– Sorin Tirc
Nov 15 at 12:51
If you just need an approximation why don't you use the trapezoidal rule or some other such method? WolframAlpha didn't seem to find any expansion in terms of standard mathematical functions.
– Sorin Tirc
Nov 15 at 12:51
@SorinTirc, approximation is the last option I'd consider, and trapezoidal rule is horrible for large $b$ (the function oscillates like crazy). I've used numerical methods on this, and they are slow and inaccurate, even with the best Mathematica has to offer. Moreover, see my edit. I think I'm on the right path with the exact evaluation...
– Yuriy S
Nov 15 at 12:53
@SorinTirc, approximation is the last option I'd consider, and trapezoidal rule is horrible for large $b$ (the function oscillates like crazy). I've used numerical methods on this, and they are slow and inaccurate, even with the best Mathematica has to offer. Moreover, see my edit. I think I'm on the right path with the exact evaluation...
– Yuriy S
Nov 15 at 12:53
1
1
In Mathematica
11.3 we can use command: AsymptoticIntegrate[Cos[b x]/Sqrt[ x^2 + s^2], {x, 0, 1}, {b, Infinity, 2}, Assumptions -> s > 0] and we get:$frac{sin (b)}{b sqrt{s^2+1}}-frac{cos (b)}{b^2 left(s^2+1right)^{3/2}}$ for b->Infinity– Mariusz Iwaniuk
Nov 15 at 17:01
In Mathematica
11.3 we can use command: AsymptoticIntegrate[Cos[b x]/Sqrt[ x^2 + s^2], {x, 0, 1}, {b, Infinity, 2}, Assumptions -> s > 0] and we get:$frac{sin (b)}{b sqrt{s^2+1}}-frac{cos (b)}{b^2 left(s^2+1right)^{3/2}}$ for b->Infinity– Mariusz Iwaniuk
Nov 15 at 17:01
|
show 1 more comment
3 Answers
3
active
oldest
votes
up vote
2
down vote
accepted
Getting a grasp of the original problem: we want to find the asymptotic behaviour of the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}in L^2(0,1)$. Since the inverse Laplace transform of $frac{1}{sqrt{x^2+s^2}}$ is $J_0(as)$ and the Laplace transform of $cos(pi n x)mathbb{1}_{(0,1)}(x)$ is $frac{a}{a^2+n^2pi^2}-frac{a(-1)^n}{e^a(a^2+pi^2 n^2)}$, we have
$$ int_{0}^{1}frac{cos(pi n x)}{sqrt{x^2+s^2}},dx = underbrace{int_{0}^{+infty}frac{a J_0(as)}{a^2+pi^2 n^2},da}_{K_0(pi n s)} + (-1)^{n+1}int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},da $$
which is fairly easy to approximate numerically due to the known bounds for Bessel functions.
Close to the origin $J_0(a)$ can be approximated through its rapidly-convergent Maclaurin series, far from the origin we have Tricomi's $J_0(a)approxfrac{sin(a)+cos(a)}{sqrt{pi a}}$. For $K_0$ we have Hankel's expansion.
In particular the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}$ decay like $frac{1}{n^2 s^3}$.
It is also interesting to point out a curious inequality provided by Cauchy-Schwarz:
$$begin{eqnarray*}left|int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},daright|^2&leq& int_{0}^{+infty}frac{J_0(as)^2}{e^{2a}},daint_{0}^{+infty}frac{a^2}{(a^2+pi^2 n^2)^2},da\&=&frac{1}{8n,text{AGM}(1,sqrt{1+s^2})}leqfrac{1}{8n}(1+s^2)^{-1/4}.end{eqnarray*}$$
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
add a comment |
up vote
3
down vote
The asymptotic for large $n$ is determined by the behaviour of the integrand at $x = pm 1$. Choosing a contour going in the direction $i$ from $x = -1$ and then in the direction $-i$ towards $x = 1$ and expanding the non-exponential part, we have
$$frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = -1 + i xi} =
frac 1 {sqrt {1 + s^2}} + frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2), \
frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = 1 + i xi} =
frac 1 {sqrt {1 + s^2}} - frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2).$$
The contributions from the first terms will cancel out, leaving
$$I(pi n, s) =
frac 1 2int_{-1}^1 frac {e^{i pi n x}} {sqrt {x^2 + s^2}} dx sim
i int_0^infty
frac {i xi} {(1 + s^2)^{3/2}} e^{-i pi n - pi n xi} dxi = \
frac {(-1)^{n - 1}} {pi^2 (1 + s^2)^{3/2} n^2},
quad n to infty, ,n in mathbb N.$$
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
add a comment |
up vote
0
down vote
Just a comment
The integral is the real part of
$$int^1_0frac{e^{ibx}}{sqrt{s^2+x^2}}dx$$
If we make a substitution $x=iscos t$, without dealing with branch cuts rigorously we can obtain
$$-iint^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt$$
Essentially,
$$I(b,s)=Im~ int^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt $$
or
$$I(b,s)=-Im~ int^{sin^{-1}(-i/s)}_{0}e^{-bssin t}dt $$
which suggests a relation with Bessel functions. However, due to the upper and lower limits not being $pmpi$, the normal Bessel functions cannot be used. I think there might be a need to define some kind of ‘incomplete Bessel function’ to write the integral in closed form.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Getting a grasp of the original problem: we want to find the asymptotic behaviour of the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}in L^2(0,1)$. Since the inverse Laplace transform of $frac{1}{sqrt{x^2+s^2}}$ is $J_0(as)$ and the Laplace transform of $cos(pi n x)mathbb{1}_{(0,1)}(x)$ is $frac{a}{a^2+n^2pi^2}-frac{a(-1)^n}{e^a(a^2+pi^2 n^2)}$, we have
$$ int_{0}^{1}frac{cos(pi n x)}{sqrt{x^2+s^2}},dx = underbrace{int_{0}^{+infty}frac{a J_0(as)}{a^2+pi^2 n^2},da}_{K_0(pi n s)} + (-1)^{n+1}int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},da $$
which is fairly easy to approximate numerically due to the known bounds for Bessel functions.
Close to the origin $J_0(a)$ can be approximated through its rapidly-convergent Maclaurin series, far from the origin we have Tricomi's $J_0(a)approxfrac{sin(a)+cos(a)}{sqrt{pi a}}$. For $K_0$ we have Hankel's expansion.
In particular the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}$ decay like $frac{1}{n^2 s^3}$.
It is also interesting to point out a curious inequality provided by Cauchy-Schwarz:
$$begin{eqnarray*}left|int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},daright|^2&leq& int_{0}^{+infty}frac{J_0(as)^2}{e^{2a}},daint_{0}^{+infty}frac{a^2}{(a^2+pi^2 n^2)^2},da\&=&frac{1}{8n,text{AGM}(1,sqrt{1+s^2})}leqfrac{1}{8n}(1+s^2)^{-1/4}.end{eqnarray*}$$
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
add a comment |
up vote
2
down vote
accepted
Getting a grasp of the original problem: we want to find the asymptotic behaviour of the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}in L^2(0,1)$. Since the inverse Laplace transform of $frac{1}{sqrt{x^2+s^2}}$ is $J_0(as)$ and the Laplace transform of $cos(pi n x)mathbb{1}_{(0,1)}(x)$ is $frac{a}{a^2+n^2pi^2}-frac{a(-1)^n}{e^a(a^2+pi^2 n^2)}$, we have
$$ int_{0}^{1}frac{cos(pi n x)}{sqrt{x^2+s^2}},dx = underbrace{int_{0}^{+infty}frac{a J_0(as)}{a^2+pi^2 n^2},da}_{K_0(pi n s)} + (-1)^{n+1}int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},da $$
which is fairly easy to approximate numerically due to the known bounds for Bessel functions.
Close to the origin $J_0(a)$ can be approximated through its rapidly-convergent Maclaurin series, far from the origin we have Tricomi's $J_0(a)approxfrac{sin(a)+cos(a)}{sqrt{pi a}}$. For $K_0$ we have Hankel's expansion.
In particular the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}$ decay like $frac{1}{n^2 s^3}$.
It is also interesting to point out a curious inequality provided by Cauchy-Schwarz:
$$begin{eqnarray*}left|int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},daright|^2&leq& int_{0}^{+infty}frac{J_0(as)^2}{e^{2a}},daint_{0}^{+infty}frac{a^2}{(a^2+pi^2 n^2)^2},da\&=&frac{1}{8n,text{AGM}(1,sqrt{1+s^2})}leqfrac{1}{8n}(1+s^2)^{-1/4}.end{eqnarray*}$$
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Getting a grasp of the original problem: we want to find the asymptotic behaviour of the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}in L^2(0,1)$. Since the inverse Laplace transform of $frac{1}{sqrt{x^2+s^2}}$ is $J_0(as)$ and the Laplace transform of $cos(pi n x)mathbb{1}_{(0,1)}(x)$ is $frac{a}{a^2+n^2pi^2}-frac{a(-1)^n}{e^a(a^2+pi^2 n^2)}$, we have
$$ int_{0}^{1}frac{cos(pi n x)}{sqrt{x^2+s^2}},dx = underbrace{int_{0}^{+infty}frac{a J_0(as)}{a^2+pi^2 n^2},da}_{K_0(pi n s)} + (-1)^{n+1}int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},da $$
which is fairly easy to approximate numerically due to the known bounds for Bessel functions.
Close to the origin $J_0(a)$ can be approximated through its rapidly-convergent Maclaurin series, far from the origin we have Tricomi's $J_0(a)approxfrac{sin(a)+cos(a)}{sqrt{pi a}}$. For $K_0$ we have Hankel's expansion.
In particular the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}$ decay like $frac{1}{n^2 s^3}$.
It is also interesting to point out a curious inequality provided by Cauchy-Schwarz:
$$begin{eqnarray*}left|int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},daright|^2&leq& int_{0}^{+infty}frac{J_0(as)^2}{e^{2a}},daint_{0}^{+infty}frac{a^2}{(a^2+pi^2 n^2)^2},da\&=&frac{1}{8n,text{AGM}(1,sqrt{1+s^2})}leqfrac{1}{8n}(1+s^2)^{-1/4}.end{eqnarray*}$$
Getting a grasp of the original problem: we want to find the asymptotic behaviour of the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}in L^2(0,1)$. Since the inverse Laplace transform of $frac{1}{sqrt{x^2+s^2}}$ is $J_0(as)$ and the Laplace transform of $cos(pi n x)mathbb{1}_{(0,1)}(x)$ is $frac{a}{a^2+n^2pi^2}-frac{a(-1)^n}{e^a(a^2+pi^2 n^2)}$, we have
$$ int_{0}^{1}frac{cos(pi n x)}{sqrt{x^2+s^2}},dx = underbrace{int_{0}^{+infty}frac{a J_0(as)}{a^2+pi^2 n^2},da}_{K_0(pi n s)} + (-1)^{n+1}int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},da $$
which is fairly easy to approximate numerically due to the known bounds for Bessel functions.
Close to the origin $J_0(a)$ can be approximated through its rapidly-convergent Maclaurin series, far from the origin we have Tricomi's $J_0(a)approxfrac{sin(a)+cos(a)}{sqrt{pi a}}$. For $K_0$ we have Hankel's expansion.
In particular the Fourier coefficients of $frac{1}{sqrt{x^2+s^2}}$ decay like $frac{1}{n^2 s^3}$.
It is also interesting to point out a curious inequality provided by Cauchy-Schwarz:
$$begin{eqnarray*}left|int_{0}^{+infty}frac{a J_0(as)}{e^a(a^2+pi^2 n^2)},daright|^2&leq& int_{0}^{+infty}frac{J_0(as)^2}{e^{2a}},daint_{0}^{+infty}frac{a^2}{(a^2+pi^2 n^2)^2},da\&=&frac{1}{8n,text{AGM}(1,sqrt{1+s^2})}leqfrac{1}{8n}(1+s^2)^{-1/4}.end{eqnarray*}$$
edited Nov 15 at 20:48
answered Nov 15 at 17:12
Jack D'Aurizio
283k33275653
283k33275653
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
add a comment |
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
Thank you very much! This should speed up the algorithm, once I get a handle on which approximation works where. Also should help with the other similar integrals, as they are just a part of the larger problem
– Yuriy S
Nov 15 at 19:11
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
I don't think the $1/(e^{pi n s} sqrt {2 n s})$ part is true, there are powers of $n$ that don't cancel out. I've added an answer.
– Maxim
Nov 15 at 20:45
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@Maxim: you're right, now fixing.
– Jack D'Aurizio
Nov 15 at 20:47
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
@JackD'Aurizio, your integral expression turned out to be very helpful, as a follow up, maybe you have any advice here?
– Yuriy S
Nov 16 at 0:23
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
The second integral is great for Gauss-Laguerre quadrature, it's fast and accurate for a few points. This works for me much better than any other ways I tried, so thank you again
– Yuriy S
Nov 16 at 1:53
add a comment |
up vote
3
down vote
The asymptotic for large $n$ is determined by the behaviour of the integrand at $x = pm 1$. Choosing a contour going in the direction $i$ from $x = -1$ and then in the direction $-i$ towards $x = 1$ and expanding the non-exponential part, we have
$$frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = -1 + i xi} =
frac 1 {sqrt {1 + s^2}} + frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2), \
frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = 1 + i xi} =
frac 1 {sqrt {1 + s^2}} - frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2).$$
The contributions from the first terms will cancel out, leaving
$$I(pi n, s) =
frac 1 2int_{-1}^1 frac {e^{i pi n x}} {sqrt {x^2 + s^2}} dx sim
i int_0^infty
frac {i xi} {(1 + s^2)^{3/2}} e^{-i pi n - pi n xi} dxi = \
frac {(-1)^{n - 1}} {pi^2 (1 + s^2)^{3/2} n^2},
quad n to infty, ,n in mathbb N.$$
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
add a comment |
up vote
3
down vote
The asymptotic for large $n$ is determined by the behaviour of the integrand at $x = pm 1$. Choosing a contour going in the direction $i$ from $x = -1$ and then in the direction $-i$ towards $x = 1$ and expanding the non-exponential part, we have
$$frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = -1 + i xi} =
frac 1 {sqrt {1 + s^2}} + frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2), \
frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = 1 + i xi} =
frac 1 {sqrt {1 + s^2}} - frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2).$$
The contributions from the first terms will cancel out, leaving
$$I(pi n, s) =
frac 1 2int_{-1}^1 frac {e^{i pi n x}} {sqrt {x^2 + s^2}} dx sim
i int_0^infty
frac {i xi} {(1 + s^2)^{3/2}} e^{-i pi n - pi n xi} dxi = \
frac {(-1)^{n - 1}} {pi^2 (1 + s^2)^{3/2} n^2},
quad n to infty, ,n in mathbb N.$$
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
add a comment |
up vote
3
down vote
up vote
3
down vote
The asymptotic for large $n$ is determined by the behaviour of the integrand at $x = pm 1$. Choosing a contour going in the direction $i$ from $x = -1$ and then in the direction $-i$ towards $x = 1$ and expanding the non-exponential part, we have
$$frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = -1 + i xi} =
frac 1 {sqrt {1 + s^2}} + frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2), \
frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = 1 + i xi} =
frac 1 {sqrt {1 + s^2}} - frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2).$$
The contributions from the first terms will cancel out, leaving
$$I(pi n, s) =
frac 1 2int_{-1}^1 frac {e^{i pi n x}} {sqrt {x^2 + s^2}} dx sim
i int_0^infty
frac {i xi} {(1 + s^2)^{3/2}} e^{-i pi n - pi n xi} dxi = \
frac {(-1)^{n - 1}} {pi^2 (1 + s^2)^{3/2} n^2},
quad n to infty, ,n in mathbb N.$$
The asymptotic for large $n$ is determined by the behaviour of the integrand at $x = pm 1$. Choosing a contour going in the direction $i$ from $x = -1$ and then in the direction $-i$ towards $x = 1$ and expanding the non-exponential part, we have
$$frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = -1 + i xi} =
frac 1 {sqrt {1 + s^2}} + frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2), \
frac 1 {sqrt {x^2 + s^2}} biggrvert_{x = 1 + i xi} =
frac 1 {sqrt {1 + s^2}} - frac {i xi} {(1 + s^2)^{3/2}} + O(xi^2).$$
The contributions from the first terms will cancel out, leaving
$$I(pi n, s) =
frac 1 2int_{-1}^1 frac {e^{i pi n x}} {sqrt {x^2 + s^2}} dx sim
i int_0^infty
frac {i xi} {(1 + s^2)^{3/2}} e^{-i pi n - pi n xi} dxi = \
frac {(-1)^{n - 1}} {pi^2 (1 + s^2)^{3/2} n^2},
quad n to infty, ,n in mathbb N.$$
answered Nov 15 at 20:37
Maxim
3,786218
3,786218
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
add a comment |
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
Thank you, Maxim, this was also very helpful
– Yuriy S
Nov 16 at 0:43
add a comment |
up vote
0
down vote
Just a comment
The integral is the real part of
$$int^1_0frac{e^{ibx}}{sqrt{s^2+x^2}}dx$$
If we make a substitution $x=iscos t$, without dealing with branch cuts rigorously we can obtain
$$-iint^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt$$
Essentially,
$$I(b,s)=Im~ int^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt $$
or
$$I(b,s)=-Im~ int^{sin^{-1}(-i/s)}_{0}e^{-bssin t}dt $$
which suggests a relation with Bessel functions. However, due to the upper and lower limits not being $pmpi$, the normal Bessel functions cannot be used. I think there might be a need to define some kind of ‘incomplete Bessel function’ to write the integral in closed form.
add a comment |
up vote
0
down vote
Just a comment
The integral is the real part of
$$int^1_0frac{e^{ibx}}{sqrt{s^2+x^2}}dx$$
If we make a substitution $x=iscos t$, without dealing with branch cuts rigorously we can obtain
$$-iint^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt$$
Essentially,
$$I(b,s)=Im~ int^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt $$
or
$$I(b,s)=-Im~ int^{sin^{-1}(-i/s)}_{0}e^{-bssin t}dt $$
which suggests a relation with Bessel functions. However, due to the upper and lower limits not being $pmpi$, the normal Bessel functions cannot be used. I think there might be a need to define some kind of ‘incomplete Bessel function’ to write the integral in closed form.
add a comment |
up vote
0
down vote
up vote
0
down vote
Just a comment
The integral is the real part of
$$int^1_0frac{e^{ibx}}{sqrt{s^2+x^2}}dx$$
If we make a substitution $x=iscos t$, without dealing with branch cuts rigorously we can obtain
$$-iint^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt$$
Essentially,
$$I(b,s)=Im~ int^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt $$
or
$$I(b,s)=-Im~ int^{sin^{-1}(-i/s)}_{0}e^{-bssin t}dt $$
which suggests a relation with Bessel functions. However, due to the upper and lower limits not being $pmpi$, the normal Bessel functions cannot be used. I think there might be a need to define some kind of ‘incomplete Bessel function’ to write the integral in closed form.
Just a comment
The integral is the real part of
$$int^1_0frac{e^{ibx}}{sqrt{s^2+x^2}}dx$$
If we make a substitution $x=iscos t$, without dealing with branch cuts rigorously we can obtain
$$-iint^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt$$
Essentially,
$$I(b,s)=Im~ int^{cos^{-1}(-i/s)}_{pi/2}e^{-bscos t}dt $$
or
$$I(b,s)=-Im~ int^{sin^{-1}(-i/s)}_{0}e^{-bssin t}dt $$
which suggests a relation with Bessel functions. However, due to the upper and lower limits not being $pmpi$, the normal Bessel functions cannot be used. I think there might be a need to define some kind of ‘incomplete Bessel function’ to write the integral in closed form.
answered Nov 15 at 16:47
Szeto
6,2292726
6,2292726
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2999639%2fevaluating-the-integral-int-01-frac-cos-bx-sqrtx2s2-dx%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried by using Contour Integration, Residue theorem etc. on the function $displaystyle frac{e^{ibz}}{sqrt{z^2+s^2}}$ around the contour $|z|=1$
– Sujit Bhattacharyya
Nov 15 at 12:32
@SujitBhattacharyya, I'm bad at contour integration, especially with roots, aren't there branch cuts to deal with? If you could show me how to do that...
– Yuriy S
Nov 15 at 12:33
If you just need an approximation why don't you use the trapezoidal rule or some other such method? WolframAlpha didn't seem to find any expansion in terms of standard mathematical functions.
– Sorin Tirc
Nov 15 at 12:51
@SorinTirc, approximation is the last option I'd consider, and trapezoidal rule is horrible for large $b$ (the function oscillates like crazy). I've used numerical methods on this, and they are slow and inaccurate, even with the best Mathematica has to offer. Moreover, see my edit. I think I'm on the right path with the exact evaluation...
– Yuriy S
Nov 15 at 12:53
1
In Mathematica
11.3we can use command:AsymptoticIntegrate[Cos[b x]/Sqrt[ x^2 + s^2], {x, 0, 1}, {b, Infinity, 2}, Assumptions -> s > 0]and we get:$frac{sin (b)}{b sqrt{s^2+1}}-frac{cos (b)}{b^2 left(s^2+1right)^{3/2}}$ forb->Infinity– Mariusz Iwaniuk
Nov 15 at 17:01