1
$\begingroup$

I'm experiencing different results when integrating the following part of a code:

$Assumptions = {T > 298, P > 0};
ktccx = 70 - 0.01*(T - 298.15);
Vcc = (1 - 4*P/(4*P + ktccx))^(1/4);
dLGcc = Integrate[Vcc, {P, 0, P}]

Mathematica 8.0.4 returns:

ConditionalExpression[
     1.33333 (-0.25 + 
        0.707107 ((18.2454 + P - 0.0025 T)/(72.9815 - 0.01 T))^(
         3/4)) (72.9815 - 0.01 T),   P - 0.0025 T < -18.2454 || T <= 7298.15]

Mathematica 11.0.1 returns:

ConditionalExpression[(-0.00333333 + 6.16298*10^-35 I) (-1. + 
    1. (((7298.15 - 
         3.02923*10^-28 I) + (400. - 4.89859*10^-14 I) P - (1. - 
          4.93038*10^-32 I) T)/(7298.15 - 1. T))^(3/4)) (-7298.15 + 
    1. T), P - 0.0025 T <= -18.2454 || T <= 7298.15]

The latter shows Complex numbers and rest of the code crashes when dealing with variable dLGcc. Why this occurs? Any hint on this issue? The goal is to use the same code on Mathematica ver. 11, and get rid of the imaginary part.

$\endgroup$

closed as off-topic by Artes, Michael E2, m_goldberg, MarcoB, J. M. will be back soon Mar 19 '17 at 15:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Artes, Michael E2, m_goldberg, MarcoB, J. M. will be back soon
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ There is no problem if you work with exact numbers instead of approximate ones, e.g.: Integrate[(1 - 4 s/(4 s + (70 - 1/100 (T - 29815/100))))^(1/4), {s, 0, P}, Assumptions -> T > 298 && P > 0]. One can work with ConditionalExpression seamlessly, nevertheless if one needs there is Normal, otherwise one should choose more specific assumptions. $\endgroup$ – Artes Mar 16 '17 at 9:04
  • 2
    $\begingroup$ Comparing with NIntegrate, it appears the V8.0.4 expression above is inaccurate. $\endgroup$ – Michael E2 Mar 16 '17 at 10:26
  • 1
    $\begingroup$ Note that symbolic/exact solvers such as Integrate use algorithms that are not always numerically well-conditioned. I think that might be the source of the inaccuracy I mentioned. In any case it is usually better to use exact numbers with such solvers, as Artes suggested. $\endgroup$ – Michael E2 Mar 19 '17 at 13:57