4

I'm trying to find a way to unit test a numerical evaluation of: \begin{align} I(y) := \int_{0}^{y} \frac{\sin(x)}{x} \frac{1}{\sqrt{1+ax}} \, \mathrm{d}x, \qquad a \in \mathbb{R} \end{align} Is there a nice representation of this function in terms of special functions? (Hopefully special functions that can be evaluated in Boost.Math, though any other representation not using numerical quadrature would be convenient.)

I should add that the limit $y\to \infty$, though aesthetically pleasing, is not the goal.

user14717
  • 4,902
  • 1
    you could express as a Taylor or maclaurin series – danimal Mar 25 '15 at 16:37
  • 1
    I think the only way to get a real closed form expression is the special case $y=\infty$. Then the integral should be computable in Trems of Error/Fresnel-Functions – tired Mar 25 '15 at 16:51

3 Answers3

3

Allow me to put it like this: $~\displaystyle\int_{-1}^\infty\frac{\sin x}x\cdot\frac{dx}{\sqrt{1+x}} ~=~ \pi~\bigg[C\bigg(\sqrt{\frac2\pi}\bigg)+S\bigg(\sqrt{\frac2\pi}\bigg)\bigg],~$ which

can easily be generalized to $~\displaystyle\int_{-\tfrac1a}^\infty\frac{\sin x}x\cdot\frac{dx}{\sqrt{1+ax}} ~=~ \pi~\bigg[C\bigg(\sqrt{\frac2{a~\pi}}\bigg)+S\bigg(\sqrt{\frac2{a~\pi}}\bigg)\bigg],~$

where C and S are the two Fresnel integrals. Everything else is doomed to have $($ generalized $)$

hypergeometric functions in its expression : $$\int_{-\tfrac1a}^0\frac{\sin x}x\cdot\frac{dx}{\sqrt{1+ax}} ~=~ \frac 2a~_2F_3\bigg(\bigg\{\frac12~,~1\bigg\}~,~\bigg\{\frac34~,~\frac54~,~\frac32\bigg\}~,~-\frac1{4a^2}\bigg),$$ for instance.

Lucian
  • 48,334
  • 2
  • 83
  • 154
  • Maybe you should add the case of $\int_0^{\infty}$ to your list :) – tired Mar 25 '15 at 17:47
  • @tired: $\displaystyle\int_0^\infty~=~\displaystyle\int_{-\tfrac1a}^\infty-\displaystyle\int_{-\tfrac1a}^0.$ – Lucian Mar 25 '15 at 17:50
  • Sure, but to be honest i don't see immediately how this hypergeometric is related to the square of Fresnel integrals. But never mind ;) – tired Mar 25 '15 at 17:57
3

We have: $$\mathcal{L}(\sin x)=\frac{1}{1+t^2},\qquad \mathcal{L}^{-1}\left(\frac{1}{x\sqrt{1+ax}}\right)=\operatorname{Erf}\left(\sqrt{\frac{t}{a}}\right)$$ hence for $y=+\infty$ it follows that: $$ \lim_{y\to +\infty}I(y) = \int_{0}^{+\infty}\operatorname{Erf}\left(\sqrt{\frac{t}{a}}\right)\frac{dt}{1+t^2}=\int_{0}^{+\infty}\operatorname{Erf}(u)\frac{2a^2 u}{1+a^2 u^4}\,du$$ and by the residue theorem:

$$ \lim_{y\to +\infty}I(y) = \pi a\left( C\left(\sqrt{\frac{2\pi}{a}}\right)-C\left(\sqrt{\frac{2\pi}{a}}\right)^2+S\left(\sqrt{\frac{2\pi}{a}}\right)-S\left(\sqrt{\frac{2\pi}{a}}\right)^2\right)$$

where $C$ and $S$ are given by the Fresnel integrals: $$ C(z)=\int_{0}^{z}\cos\left(\frac{\pi t^2}{2}\right)\,dz,\qquad S(z)=\int_{0}^{z}\sin\left(\frac{\pi t^2}{2}\right)\,dz.$$

For different values of $y$ we can perform almost the same steps, i.e. to write $\frac{1}{x\sqrt{1+ax}}$ as the Laplace transform of an error function, switch the order of integration and compute the last integral through the residue theorem. Obviously we'll have to deal with an incomplete integral and with an "incomplete Laplace transform", too, i.e. with: $$ \int_{0}^{v}\sin x e^{-sx}\,dx = \frac{1}{1+s^2}-\frac{e^{-sv}}{1+s^2}\left(\cos v-s\sin v\right).$$

Jack D'Aurizio
  • 353,855
2

We try to solve the special case of $y=\infty$ , assuming that $a>0$.

First step: Relabeling $a =1/b$ ,substitute $b(q-1)=x$ $$ I(\infty,b)=\int_{1}^{\infty}\frac{\sin\left[b(q-1)\right]}{q-1}\frac{1}{\sqrt{q}}dq $$

differentiate w.r.t to b yields $$ \partial_b I(\infty,b)=\int_{1}^{\infty}\frac{\cos\left[b(q-1)\right]}{\sqrt{q}}=\int_{1}^{\infty}\frac{\sin (b) \sin (b q)+\cos (b) \cos (b q)}{\sqrt{q}}dq $$ Setting $q=p^2$ brings this integrals to a nice form:

$$ \partial_b I(\infty,b)=2\int_{1}^{\infty}\sin (b) \sin (b p^2)+\cos (b) \cos (b p^2)dp $$

By definition of the Fresnel integrals $C(x), S(x)$ this yields $$ \partial_b I(\infty,b)=\sqrt{\frac{\pi }{2 b}} \left(-2 C\left(\sqrt{\frac{2 b}{\pi }}\right) \cos (b)-2 S\left( \sqrt{\frac{2b}{\pi }}\right) \sin (b)+\sin (b)+\cos (b)\right) $$

Integrating back to w.r.t to $b$
(integration by parts will work because $\partial_x C^2(x)= C(x)\cos(\frac{\pi x^2}{2})$ and the same for $S(x)$)

yields

$$ I(\infty,b)=\pi \left(-C\left( \sqrt{\frac{2b}{\pi }}\right)^2+C\left( \sqrt{\frac{2b}{\pi }}\right)-S\left(\sqrt{\frac{2b}{\pi }}\right)^2+S\left( \sqrt{\frac{2b}{\pi }}\right)\right) $$ where the constant of integration is fixed by the condition $I(\infty, 0)=0$

tired
  • 12,325