# Why can't Mathematica solve this definite integral?

I want to solve the integral

$$\int_{p_0}^{p_1}\left(T_0+\Gamma_p(p_0-p)\right)\frac{1}{p}dp$$

Mathematica can do the indefinite integral immediately:

>>> Integrate[(T + Γ (p0 - p))*(1/p), p]
-p Γ + (T + p0 Γ) Log[p]


But addind bounds suddenly makes it choke, i.e. the following never returns:

>>> Integrate[(T + Γ (p0 - p))*(1/p), {p, p0, p1}]


even though I can do this just fine:

FullSimplify[Limit[-Γ p + (Γ P + T) Log[p], p -> p1] - Limit[-Γ p + (Γ P + T) Log[p], p -> p0]]


What is the issue?

• Is the subscript $p$ on $\Gamma$ in the first equation a typo? Is that not the same $p$ as the integration variable? Sep 23 at 12:26

Likely this is due to the fact that antiderivative are troublesome in computer algebra systems. Do this:

Integrate[(T + \[CapitalGamma] (p0 - p))*(1/p), {p, p0, p1},   Assumptions -> {p1 > p0 > 0}]


Assuming, of course, that p1 > p0 > 0 is actually true.

• +1 for linking back to that Wolfram blog post. Sep 23 at 15:02

Mathematica likely has problems with four parameters which are assumed to be complex numbers and an antiderivative with branches. The GenerateConditions -> False/True option does the job.

Integrate[(T + \[CapitalGamma] (p0 - p))*(1/p), {p, p0, p1}, GenerateConditions -> False]


p0 - p1) \[CapitalGamma] - (T + p0 \[CapitalGamma]) Log[ p0] + (T + p0 \[CapitalGamma]) Log[p1]

Integrate[(T +\[CapitalGamma] (p0 - p))*(1/p), {p, p0, p1},
Assumptions -> {p0, p1, \[CapitalGamma],T} \[Element] Reals,GenerateConditions -> True]


ConditionalExpression[(p0 - p1) \[CapitalGamma] + (T + p0 \[CapitalGamma]) Log[p1/p0], p0 > 0 && p0 != p1 && p1 > 0]