Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Same in v8. When you have numerical values for t and g you can use NIntegrate – ssch Nov 29 '12 at 20:05
you probably will need to do it numerically. Do you think you should have a closed form solution? – Gabriel Nov 29 '12 at 20:06
It seems for fixed values (I tried g=2) it works. – chris Nov 29 '12 at 20:14
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. – Thanos Nov 29 '12 at 20:15
@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. – Thanos Nov 29 '12 at 20:19
up vote 5 down vote accepted

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.

share|improve this answer
Thank you very much for answer! It seems that there isn't a closed form... so the assumptions are vital! Thank you! – Thanos Nov 29 '12 at 20:47
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$.) – whuber Nov 29 '12 at 23:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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