I am trying to integrate over $v_y$ and $v_z$ the following function in Mathematica 13.1 \begin{equation} n(v_x, v_y, v_z)= \frac{1}{\exp\left[\frac{\frac{m}{2}\left(v_x^2 + v_y^2 + v_z^2 \right) - \mu}{k_B T}\right]+ 1}. \end{equation} All parameters are real. Moreover $T$, $\mu$, $k_B$, $m$ and $h$ are positive constants.

I know that the result must be something like \begin{equation} n(v_x) =\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}n(v_x, v_y, v_z)\,\mathrm{d}v_y\,\mathrm{d}v_z=\frac{2\pi k_B T}{m} \log\left[1 + \exp\left(-\frac{\frac{1}{2}m v_x^2 - \mu}{k_B T }\right)\right] \end{equation}

My code is

$Assumptions = 
 Vx \[Element] Reals && Vy \[Element] Reals && Vz \[Element] Reals && 
  kB > 0 && m > 0 && T > 0 && \[Mu] > 0; Integrate[
 1/(Exp[(m/2*(Vx^2 + Vy^2 + Vz^2) - \[Mu])/(k*T)] + 
    1), {Vy, -\[Infinity], +\[Infinity]}, {Vz, -\[Infinity], +\

enter image description here Mathematica 13.1 does not find the solution.

The thing that puzzles me is that a previous version of Mathematica gave me the correct result.

  • 2
    $\begingroup$ Welcome to Mathematica StackExchange! This could be considered as a regression bug since the integration works normally in version 12.3, even without any assumptions, but it gets stuck in version 13.0. You can report it to the Wolfram Technical Support. $\endgroup$
    – Domen
    Feb 1 at 23:01

1 Answer 1


It seems that in 13.2, MMA will do the first integral wrt Vy and returns a polylog function, then get stuck there.

We can use the new function IntegrateChangeVariables in 13.1,


to transform the integral into the radial coordinates,

IntegrateChangeVariables[integral,{r,θ},{y==r Cos[θ],z==r Sin[θ]},Assumptions->0<θ<2π&&r>0]//Activate
(*π Log[1+E^(1-x^2)]*)
  • $\begingroup$ You are right! In polar coordinates the intergration works. $\endgroup$ Feb 2 at 8:30

Your Answer

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

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