Is there a solution for the following integral (even in terms of Bessel or Struve functions)? $$ \int_0^{\pi} \frac{ y \cos(y)}{s^2+y^2} \,dy $$

  • $\begingroup$ There is a rather complicated expression in terms of cos integrals and sine integrals. $\endgroup$ – mickep Jun 1 '15 at 6:24
  • $\begingroup$ Could you mention the equation? Can be approximated in simpler terms? $\endgroup$ – Hesam Jun 1 '15 at 6:25
  • 3
    $\begingroup$ This is what Mathematica gives: $$\frac{1}{2} ((\text{Ci}(\pi -i s)+\text{Ci}(i s+\pi )-\text{Ci}(-i s)-\text{Ci}(i s)) \cosh (s)+\sinh (s) (2 \text{Shi}(s)-i (\text{Si}(\pi -i s)-\text{Si}(i s+\pi )))).$$ I'm to lazy to start trying to obtain it by hand. Here, $\text{Shi}(t)=\int_0^t \sinh(s)/s\,ds$, $\text{Si}(t)=\int_0^t \sin(s)/s\,ds$, $\text{Ci}(t)=-\int_t^{+\infty}\cos(s)/s\,ds$. $\endgroup$ – mickep Jun 1 '15 at 6:28
  • 1
    $\begingroup$ Usually, the kind of integral that you posted yields nice closed form solutions on $(0,\infty)$, rather than on $\bigg(0,~k~\dfrac\pi2\bigg)$. Indeed, integrating on $\mathbb R^+$, for $s=1$ we get $-\dfrac{\text{Ei}(1)+e^2~\text{Ei}(-1)}{2e}~,$ where $\text{Ei}$ is the exponential integral. Replacing $\cos$ with $\sin$, we have $\dfrac\pi{2e^{\large s}}$ $\endgroup$ – Lucian Jun 1 '15 at 8:58
  • 1
    $\begingroup$ If we replace the upper integration limit with $\infty$, the general formula is $-\dfrac{\text{Ei}(s)+e^{\large2s}~\text{Ei}(-s)}{2e^{\large s}}$ $\endgroup$ – Lucian Jun 1 '15 at 9:17

The integral can be expressed as a series.

$$ \int_0^{\pi} \frac{ y \cos(y)}{s^2+y^2} \,dy=\ln \frac{\sqrt{s^2+\pi^2}}{|s|} \cosh s+\frac{1}{2} \sum_{n=1}^{\infty} \frac{(-1)^n}{(2n)!} \pi^{2n} \sum_{k=0}^{n-1} \frac{(-1)^k}{n-k} \left( \frac{s}{\pi} \right)^{2k} $$

Or, using Mathematica for the inner sum, I was able to write it using Lerch Transcendent. This series has much better convergence.

$$\int_0^{\pi} \frac{ y \cos(y)}{s^2+y^2} \,dy=\ln \frac{\sqrt{s^2+\pi^2}}{|s|} +\frac{\pi^2}{2s^2} \sum_{n=1}^{\infty} \frac{(-1)^n}{(2n)!} \pi^{2n}~ \Phi \left(-\frac{\pi^2}{s^2},1,n+1 \right)$$

See the plot for $s \in (0,10)$. Obviously, with only a few terms of the second series we can approximate the integral with very good precision:

enter image description here

Just in case, how to get the first series. Expand the cosine:

$$\cos y=1-\frac{y^2}{2!}+\frac{y^4}{4!}-\cdots=\sum_{n=0}^{\infty} \frac{(-1)^n y^{2n}}{(2n)!}$$

Then we get a series of integrals in the form:

$$\int_0^{\pi} \frac{ y^{2n+1}}{s^2+y^2} \,dy=\frac{1}{2} \int_0^{\pi^2} \frac{ t^{n}}{s^2+t} \,dt$$

And finally, we can divide the fraction under the integral:

$$\frac{ t^{n}}{s^2+t}=\sum_{k=0}^{n-1} (-1)^k s^{2k} t^{n-k-1}+ \frac{(-1)^n s^{2n} }{s^2+t} $$

The last integral is elementary:

$$(-1)^n s^{2n} \int_0^{\pi^2} \frac{ dt}{s^2+t}=(-1)^n s^{2n} (\ln (s^2+\pi^2)-2 \ln s)$$


Just wanted to add that there are other ways to represent with this integral.

Firstly, we use integration by parts with $u=y \cos y$:

$$\int_0^{\pi} \frac{ y \cos(y)}{s^2+y^2} \,dy=-\frac{\pi}{s} \arctan \frac{\pi}{s}+\frac{1}{s} \int_0^{\pi} (\cos y-y \sin y)\arctan \frac{y}{s}dy$$

Wolfram Alpha takes the last integrals easily, even indefinite, see here and here. See also @mickep's comment.

If we assume that $\color{blue}{s \geq \pi}$, we can expand the integral into the following double series. Otherwise we will just to invert the argument of the arctangent function and expand it in another way:

$$\frac{1}{s} \int_0^{\pi} \cos y \arctan \frac{y}{s}dy=\frac{\pi^2}{2s^2}\sum_{k,l=0}^\infty \frac{(-1)^{k+l}}{(2k)! (2l+1)(k+l+1)} \frac{\pi^{2(k+l)}}{s^{2l}}$$

$$\frac{1}{s} \int_0^{\pi} y \sin y \arctan \frac{y}{s}dy=\frac{\pi^4}{2s^2}\sum_{k,l=0}^\infty \frac{(-1)^{k+l}}{(2k+1)! (2l+1)(k+l+2)} \frac{\pi^{2(k+l)}}{s^{2l}}$$

$$\int_0^{\pi} \frac{ y \cos(y)}{s^2+y^2} \,dy=-\frac{\pi}{s} \arctan \frac{\pi}{s}+ \\ +\frac{\pi^2}{2s^2}\sum_{k,l=0}^\infty \frac{(-1)^{k+l}}{(2k)! (2l+1)} \left( \frac{1}{k+l+1}-\frac{\pi^2}{(2k+1)(k+l+2)} \right) \frac{\pi^{2(k+l)}}{s^{2l}}$$

Secondly, we use integration by parts with $u=\cos y$:

$$\int_0^{\pi} \frac{ y \cos(y)}{s^2+y^2} \,dy=-\ln (|s| \sqrt{\pi^2+s^2})+\frac{1}{2} \int_0^{\pi} \sin y \ln (s^2+y^2)dy$$

This integral can be easily expanded into series as well. Of course, the initial one can be expanded too, so this is not very useful.

I'll see if Mathematica will be able to sum some of these series, at least to a single series.

  • $\begingroup$ Why don't you add this as an edit to your other answer? Given that, technically, this is not an answer, you take the chance of seeing it deleted by the other users. $\endgroup$ – Alex M. Jul 29 '16 at 9:42
  • $\begingroup$ @AlexM., I was going to expand this one further, and anyway - I don't usually add to old answers, especially if they are long. It will just make them more confusing. If this one is downvoted, then so be it $\endgroup$ – Yuriy S Jul 29 '16 at 9:45

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.