Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: deterministic integration
Replies: 4   Last Post: Mar 3, 2013 10:57 PM

 Search Thread: Advanced Search

 Messages: [ Previous | Next ]
 daniel.lichtblau0@gmail.com Posts: 20 Registered: 7/23/12
Re: deterministic integration
Posted: Feb 27, 2013 11:43 PM
 Plain Text Reply

On Wednesday, February 27, 2013 2:03:06 AM UTC-6, Alex Krasnov wrote:
> This issue has already been discussed on this list, but the previous
>
> solutions are unsatisfactory. Integrate returns non-deterministic results
>
> depending on machine speed and kernel cache state. Example (Mathematica
>
> 8.0.4):
>
>
>
> In: Assuming[Element[z, Reals], Integrate[1/Sqrt[x^2+y^2+z^2], {x, -1, 1}, {y, -1, 1}]]
>
> Out: -4*(z*ArcCot[z*Sqrt[2 + z^2]] + Log[1 - I*z] + Log[(1 + I*z)/(3 + z^2 + 2*Sqrt[2 + z^2])])
>
>
>
> In: Assuming[Element[z, Reals], Integrate[1/Sqrt[x^2+y^2+z^2], {x, -1, 1}, {y, -1, 1}]]
>
> Out: -4*(z*ArcCot[z*Sqrt[2 + z^2]] + Log[(1 + z^2)/(3 + z^2 + 2*Sqrt[2 + z^2])])
>
>
>
> The previous solutions involve adjusting the machine speed and clearing
>
> the kernel cache before each evaluation. This strategy attempts to achieve
>
> the least transformed result, though this is presumably not guaranteed.
>
> Instead, how can one achieve the most transformed result? The behavior of
>
> Integrate appears to be similar to that of Refine, Simplify, FullSimplify.
>
> However, unlike the latter, Integrate does not expose a TimeConstraint
>
> option. How can one achieve the effect of TimeConstraint -> Infinity? Is
>
> the absence of this option related to the undecidability of Risch's
>
> algorithm or is the non-determinism entirely in a subsequent
>
> simplification phase?
>
>
>
> Alex

Integrate uses a very large number of time-constrained computations, and some of them also use time constraints under the hood.

There is some amount of discussion of this here:

http://library.wolfram.com/infocenter/Conferences/5832/

A revised/updated version may be found here:

http://www.sigsam.org/cca/issues/issue175.html

See in particular section 5.7.

As for effectively setting all time constraints to infinity, this might by and large work (except there are also several places where Integrate code bypasses the evaluator for time-constraining).

Unprotect[TimeConstrained];
TimeConstrained[expr_,args___] := expr

This alters toe speed of your example above from 10 seconds to a minute; plan accordingly.

Daniel Lichtblau
Wolfram Research

Date Subject Author
2/27/13 Alex Krasnov
2/27/13 daniel.lichtblau0@gmail.com
3/2/13 Alex Krasnov
3/3/13 Daniel Lichtblau

© The Math Forum at NCTM 1994-2018. All Rights Reserved.