This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

TimeConstraint

TimeConstraint
is an option for various algorithmic functions which specifies how long to spend trying a particular transformation or part of an algorithm.
  • TimeConstraint->t specifies that a maximum of t seconds of CPU time should be spent trying a particular transformation or part of an algorithm.
  • In functions such as Simplify and FullSimplify, settings for TimeConstraint give only the maximum time to be spent doing a particular transformation on a particular subpart; the total time spent processing the whole expression may be considerably larger.
  • Changing the setting for TimeConstraint will never affect the validity of a result obtained from functions like Simplify or FullSimplify, but smaller settings may prevent the simplest possible form from being found.
  • Since different computer systems run at different speeds, the same setting for TimeConstraint can lead to different results on different systems.
This takes a long time, due to trigonometric expansion, but does not yield a simplification:
TimeConstraint limits the time spent on any single transformation:
A similar example, where the transformation yields a simplification:
In this case setting TimeConstraint prevents some simplification:
This takes a long time, due to trigonometric expansion, but does not yield a simplification:
In[1]:=
Click for copyable input
Out[1]=
TimeConstraint limits the time spent on any single transformation:
In[2]:=
Click for copyable input
Out[2]=
 
A similar example, where the transformation yields a simplification:
In[1]:=
Click for copyable input
Out[1]=
In this case setting TimeConstraint prevents some simplification:
In[2]:=
Click for copyable input
Out[2]=
Checking whether a condition follows from assumptions may take a long time:
If a condition does not follow from assumptions, checking this may still take a long time:
The time spent on a single condition check is restricted by the value of TimeConstraint:
With a time constraint of one second Refine cannot prove that :
New in 3