I am trying to compute the integral

Integrate[(g^(u^(g - 1)))/(1 + u^g), {u, 0, t}]

but as an answer I get my input expression. There must be something wrong with parameters but even if I give values to t or g mathematica'a answer is the same: it just gives me back my input expression...

My output is

How can I compute this integral?

  • $\begingroup$ Same in v8. When you have numerical values for t and g you can use NIntegrate $\endgroup$
    – ssch
    Nov 29, 2012 at 20:05
  • $\begingroup$ you probably will need to do it numerically. Do you think you should have a closed form solution? $\endgroup$
    – Gabriel
    Nov 29, 2012 at 20:06
  • $\begingroup$ It seems for fixed values (I tried g=2) it works. $\endgroup$
    – chris
    Nov 29, 2012 at 20:14
  • $\begingroup$ The only way I can get a value is when I give values to g and t. But I would like to have a closed form solution. $\endgroup$
    – Thanos
    Nov 29, 2012 at 20:15
  • $\begingroup$ @chris: You are right... If I use g=2 I get a value. If I use g=4 I don't...In particular if I use NIntegrate with t being a limit of integration I can't have a solution. $\endgroup$
    – Thanos
    Nov 29, 2012 at 20:19

1 Answer 1


It appears that this integral can be calculated symbolically only for special integer arguments g. One can use e.g. Assumptions in Integrate :

Integrate[(g^(u^(g - 1)))/(1 + u^g), {u, 0, t}, Assumptions -> g == # && t > 0] & /@ Range[4]
{Log[1 + t], 
 I 2^(-1 - I) (Cos[Log[4]] ExpIntegralEi[-I Log[2]] - ExpIntegralEi[I Log[2]] + 
 ExpIntegralEi[(I + t) Log[2]] - ExpIntegralEi[(-I + t) Log[2]] (Cos[Log[4]] + I Sin[Log[4]])
  + I ExpIntegralEi[-I Log[2]] Sin[Log[4]]), 
 Integrate[g^u^(-1 + g)/(1 + u^g), {u, 0, t}, Assumptions -> g == 3 && t > 0], 
 Integrate[g^u^(-1 + g)/(1 + u^g), {u, 0, t}, Assumptions -> g == 4 && t > 0]}

We can see that only for g == 1 or g == 2 we can get exact results. For g rational e.g. g == 3/2 we can't compute symbolically this integral either. For other values of g you could use Nintegrateto find numerical results.Integrate hasn't been changed in version 9, nethertheless some improvements of the core functionality has been described in Enhanced Core Algorithms. To find out more interesting remarks on Integrate I recommend to read Some Notes on Internal Implementation, especially this paragraph : Differentiation and Integration, where it says e.g. that the algorithms in Mathematica cover all of the indefinite integrals in standard reference books such as Gradshteyn-Ryzhik as well as that Integrate uses about 500 pages of Mathematica code and 600 pages of C code.

  • $\begingroup$ Thank you very much for answer! It seems that there isn't a closed form... so the assumptions are vital! Thank you! $\endgroup$
    – Thanos
    Nov 29, 2012 at 20:47
  • 1
    $\begingroup$ You could evaluate the integral numerically over a range of values of $g$ and interpolate that to get a working "closed form" function. Parameterize it as $g = \exp(\gamma)$ and evaluate it at roughly equally-spaced values of $\gamma$. To see what's going on, look at LogLinearPlot[ NIntegrate[(g^(u^(g - 1)))/(1 + u^g), {u, 0, 1}, WorkingPrecision -> 50], {g, 0.01, 100000}, PlotRange -> {Full, Full}] (and be prepared to wait a minute or two: the extra precision is needed for values of $g$ greater than $1000$ or so, for obvious reasons). (The limit at $g\to\infty$ is $1$.) $\endgroup$
    – whuber
    Nov 29, 2012 at 23:27

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.