Message Boards Message Boards

0
|
4384 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Error in Mathematica 9.0.1 integral of mixed Exp and Power type functions?

Posted 11 years ago
Hello,

In the description below you can find an error, which occurs for a Rational function of exponent argument. Do I miss anything?

Followed the instruction and attached the problem description below. Hope it is readable now.
Still, in my opinion it looks not as good as the original code in Mathematica
(e.g. fractions are without horizontal lines, no symbolic representation for 'Pi' and 'Infinity').

1. Integrate the following
Integrate[Exp[a x]/(1 + Exp[b x])^2, {x, -\[Infinity], \[Infinity]}, Assumptions -> 2 b > a && a > 0]

to obtain
((-a + b) \[Pi] Csc[(a \[Pi])/b])/b^2

The resulting expression coincides with the known formula in integration books (e.g. Gradshtein & Ryshik)

2. Now let us consider the more general integral
Integrate[Exp[a x]/(1 + Exp[b x])^c, {x, -\[Infinity], \[Infinity]},
Assumptions -> b c > a && a > 0 && b > 0]

to obtain
Hypergeometric2F1[a/b, c, (a + b)/b, -1]/a +
Hypergeometric2F1[c, -(a/b) + c, 1 - a/b + c, -1]/(-a + b c)

As internal check choose the previous c = 2 value.
c = 2; FullSimplify[
Hypergeometric2F1[a/b, c, (a + b)/b, -1]/a +
Hypergeometric2F1[c, -(a/b) + c, 1 - a/b + c, -1]/(-a + b c)
                    ]
to obtain 
((-a + b) \[Pi] Csc[(a \[Pi])/b])/b^2

the latter concides with case 1.

Now the error.
3. Remove the assumptions in case 2
Integrate[Exp[a x]/(1 + Exp[b x])^c, {x, -\[Infinity], \[Infinity]}]

to obtain
ConditionalExpression[-(Hypergeometric2F1[a/b, c, (a + b)/b, -1]/a) +
                        Hypergeometric2F1[c, -(a/b) + c, 1 - a/b + c, -1]/( a - b c),
(Re[(-1)^(-1/b)] >= 1 ||
    Re[(-1)^(-1/b)] <= 0 || (-1)^(-1/b) \[NotElement]
     Reals) && (Re[(-1)^(1/b)] >= 1 ||
    Re[(-1)^(1/b)] <= 0 || (-1)^(1/b) \[NotElement] Reals) &&
  Re[b] < 0 && Re[a - b c] < 0 && Re[a] > 0]

The first term acquires now an additional minus sign

Insert c = 2 to compare with case 2 considered above
c = 2;
FullSimplify[-(Hypergeometric2F1[a/b, c, (a + b)/b, -1]/a) +
  Hypergeometric2F1[c, -(a/b) + c, 1 - a/b + c, -1]/(a - b c)]
to obtain 
((a - b) \[Pi] Csc[(a \[Pi])/b])/b^2

It differs from case 2 by a minus sign!

To summarize, the same integrals (cases 1 and 3), were obtained by two different paths and yield two different results.

'Pi' and 'Infinity' didn't appear as symbolic when I pasted the code. It appeard as symbolic only after I pressed the "Publish" button.
The fraction lines are still not horizontal as in original file.
POSTED BY: Shimon Rubin
Thank you for posting this. If you believe you have a found an issue with Mathematica's results, contact our technical support department by email at (support@wolfram.com) including a description of the issue and your Mathematica license number or activation key. They will be able to sort out whether the function is behaving correctly and contact the developers about any issues.

Please consider this tutorial which covers how Integrate uses generic cases to handle integration. This is a feature which allows it to return sensible results and is a less intuitive part of calculus.

The subsitution you are doing is very much like the one in the tutorial - you may want to test your example to see if it is the same issue. The way that Integrate chooses to return results should generally give a correct value for an interval on the real line, but may give unexpected values at isolated points along the real line.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract