Message Boards Message Boards

0
|
8126 Views
|
17 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Inconsistency in evaluating a definite integral?

Consider the integral $ \int_1^{\infty } \log \left(1-\frac{\alpha }{x}\right) \, dx$ where $0<\alpha <1$

This integral is divergent as can be verified by evaluating the indefinite integral: $x \log \left(1-\frac{\alpha }{x}\right)-\alpha \log (x-\alpha )$ between the two limits.

However, the Mathematica input: $\text{Assuming}\left[0<\alpha <1,\int_1^{\infty } \log \left(1-\frac{\alpha }{x}\right) \, dx\right]$

produces the output: $(\alpha -1) \log (1-\alpha )-\alpha$

POSTED BY: Joel Storch
17 Replies
Posted 5 years ago

Thanks!

POSTED BY: Bernd Günther
Posted 5 years ago

One more item (this time a limit instead of an integral):

Limit[ParabolicCylinderD[\[Nu], -t]/(
 Sqrt[2 Pi]/Gamma[-\[Nu]] t^(-\[Nu] - 1) Exp[t^2/4]) , 
 t -> \[Infinity]]

Mathematica evaluates to

-\[Infinity] Gamma[-\[Nu]] Gamma[1 + \[Nu]] Sin[\[Pi] \[Nu]]

The correct value would be -1, according to Gradshteyn-Ryzhik formula 9.246 part 2.

POSTED BY: Bernd Günther

Numerical checks make me suspect that the limit should be 1 rather than -1. But clearly the current behavior is wrong. I'll file a bug report for that.

POSTED BY: Daniel Lichtblau
Posted 5 years ago

Anyway, I have more gems of this sort:

Integrate[Csc[t] Log[1 + x Sin[t]], {t, -(\[Pi]/2), \[Pi]/2}, 
 Assumptions -> 0 < x < 1]

Mathematica evaluates this to 0. The correct result would be

\[Pi] ArcSin[x]

as can be seen from series expansions.

POSTED BY: Bernd Günther

This will also be filed as a bug.

POSTED BY: Daniel Lichtblau
Posted 5 years ago

Thanks!

POSTED BY: Bernd Günther
Posted 5 years ago

Compelling reason? No, but not forbidden either. One can enter formulae like this either with escape syntax or using the class room editor.

POSTED BY: Bernd Günther
Posted 5 years ago

If that helps:

Simplify[\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(r1\), \(r2\)]\(
\*FractionBox[\(1\), \(
\*SuperscriptBox[\(r\), \(2\)]\ 
\*SqrtBox[\(\((r - r1)\) \((r2 - r)\)\)]\)] \[DifferentialD]r\)\), 
 Assumptions -> (r1 > 0) && (r2 > 0) && (r2 > r1)] 

2nd formula:

Simplify[\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(a\), \(b\)]\(
\*FractionBox[\(1\), \(
\*SuperscriptBox[\(r\), \(2\)]\ 
\*SqrtBox[\(\((r - a)\) \((b - r)\)\)]\)] \[DifferentialD]r\)\), 
 Assumptions -> (a > 0) && (b > 0) && (b > a)] 

3rd one:

Integrate[1/(r^2 Sqrt[(r - r1) (r2 - r)]), {r, r1, r2}, 
 Assumptions -> (r1 > 0) && (r2 > 0) && (r2 > r1)]
POSTED BY: Bernd Günther

Is there a compelling reason to enter the first two using the box formatting? (This is a rhetorical question. The answer is "no". The problems with that formatting are that it is not readable and also does not copy/paste into a raw kernel on my Linux machine.) General rule: the simpler the code provided, the more likely one is to get a response.

As for the issue at hand, it appears that the integral, when not provided the assumptions, is off by a sign.

POSTED BY: Daniel Lichtblau
Posted 5 years ago

There seem to be more inconsistencies, for example (sorry, I must include this as picture) the following. The funny thing is that the result depends minutely on how the formula is entered:

enter image description here

POSTED BY: Bernd Günther

I find it impossible to believe that the code could not have been included in this message. I am unable to copy/paste an image.

POSTED BY: Daniel Lichtblau

Reported as a bug.

POSTED BY: Daniel Lichtblau

Mathematica gets the parametric integral wrong:

Assuming[0 < a < 1, Integrate[Log[1 - a/x], {x, 1, \[Infinity]}]]

but it gets it right when the parameter a is a number:

With[{a = 1/2}, Integrate[Log[1 - a/x], {x, 1, \[Infinity]}]]

If you force Evaluate on the integral, the wrong result will win the evaluation race, before the parameter a gets a numeric value. Remove Evaluate and the parameter a will become numeric before the integral is evaluated:

Manipulate[ Integrate[Log[1 - a/x], {x, 1, [Infinity]}], {a, 0.001, 0.999}]

POSTED BY: Gianluca Gorni

I have used

Manipulate[Evaluate[Assuming[0 < a < 1, Integrate[Log[1 - a/x], {x, 1, \[Infinity]}]]], {a, 0.001, 0.999}]

and for all the values of a $\in$ [0.001; 0.999] the integral values are finite. It's very confusing...

POSTED BY: Joel Storch

It seems to be a correct output as both the limits (x->1,x-> $\infty$) tend to $-\infty$. I attached the nb file with the code I used for an experiment.

Experiment Results...

Attachments:

Inconsistency in Evaluating Definite Integral

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