I'm trying to find the integral given below with Mathematica

$\int_0^{\infty } r \frac{2^{r-1} \log (2) e^{-\frac{\sqrt{2^r-1}}{b}} \left(2^r-1\right)^{\frac{d}{2}-1}}{b^d \Gamma (d)} \, dr$

However, it takes too long for it to return something and when it returns it outputs the same integral.

$\int_{0}^{\infty } \frac{2^{r-1} r \log (2) b^{-d} e^{-\frac{\sqrt{2^r-1}}{b}} \left(2^r-1\right)^{\frac{d}{2}-1}}{\Gamma (d)} \, dr$

I'd like to figure out the solution for this integral.

Mathematica code

y = (2^(-1 + r)*(-1 + 2^r)^(-1 + d/2)*Log[2])/(E^(Sqrt[-1 + 2^r]/b)*(Gamma[d]*b^d)); 
Integrate[r*y, {r, 0, Infinity}]
  • 2
    $\begingroup$ Please include your Mathematica code so we don't have to type in your integral. $\endgroup$
    – JimB
    Jul 10, 2020 at 1:59
  • 1
    $\begingroup$ Even without multiplying by $r$ it doesn't appear that the integral converges on {$0,\infty$}. What values of $b$ and $d$ do you think there is finite result? $\endgroup$
    – JimB
    Jul 10, 2020 at 2:12
  • 2
    $\begingroup$ So you want the expectation of a random variable $R$ with a pdf of $\frac{2^{r-1} \log (2) \left(2^r-1\right)^{\frac{d}{2}-1} \exp \left(-\frac{\sqrt{2^r-1}}{b}\right)}{b^d \Gamma (d)}$ with $b>0$ and $0<d<1$? If so, adding in such information would be helpful. $\endgroup$
    – JimB
    Jul 10, 2020 at 3:51
  • $\begingroup$ If you do a change of variables technique with $x=2^r-1$, then Mathematica will give you a result with the assumptions of $b>0$ and $0<d<1$. Sorry, I won't have time to write up an answer with that until sometime tomorrow. $\endgroup$
    – JimB
    Jul 10, 2020 at 5:31
  • $\begingroup$ @JimB, I've just added the Mathematica code. Thanks! $\endgroup$ Jul 10, 2020 at 12:24

1 Answer 1


After applying the change of variable technique with $x=2^r-1$ we get

$$f=\frac{e^{-\frac{\sqrt{r}}{b}} r^{\frac{d}{2}-1} \log _2(r+1)}{2 \left(b^d \Gamma (d)\right)} $$

$$\text{Integrate}[f,\{r,0,\infty \},\text{Assumptions}\to d\in \mathbb{R}\land b\in \mathbb{R}\land d>0\land b>0]$$

Integrate[f, {r, 0, Infinity}, 
 Assumptions -> 
  d ∈ Reals && b ∈ Reals && d > 0 && b > 0]

then, the solution to this integral is

$$\frac{b^{-d} \left(\frac{2 \pi \csc \left(\frac{\pi d}{2}\right) \, _1F_2\left(\frac{d}{2};\frac{1}{2},\frac{d}{2}+1;-\frac{1}{4 b^2}\right)}{d}+\frac{2 \left(-\pi b \sec \left(\frac{\pi d}{2}\right) \, _1F_2\left(\frac{d}{2}+\frac{1}{2};\frac{3}{2},\frac{d}{2}+\frac{3}{2};-\frac{1}{4 b^2}\right)+(d+1) b^d \Gamma (d-2) \, _2F_3\left(1,1;2,\frac{3}{2}-\frac{d}{2},2-\frac{d}{2};-\frac{1}{4 b^2}\right)+2 \left(d^3-2 d^2-d+2\right) b^{d+2} \Gamma (d-2) (\log (b)+\psi ^{(0)}(d))\right)}{b^2 (d+1)}\right)}{\log (4) \Gamma (d)}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.