MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: $Assumptions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92639] Re: $Assumptions
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 9 Oct 2008 06:35:57 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <gci2ia$ta$1@smc.vnet.net>

Ruth Lazkoz Sáez wrote:

> I seem to be unable to change some default options globally.
> 
> At the top of  my notebook I have
> 
> $Assumptions = {MaxRecursion -> 30, AccuracyGoal -> 10};
> 
> Then we I evaluate  NIntegrate[Exp[-x^2], {x, 20., 40.}]
> I get 4.78196*10^-176
> 
> But if I  evaluate NIntegrate[Exp[-x^2], {x, 20., 40.}, MaxRecursion -> 30,
>  AccuracyGoal -> 10]
> I get quite a different value, 1.36703*10^-177
> 
> I had the same problem trying to change the options for fonts in plots, 
> and then I had to add the options I wanted
> in every plot, I mean evaluation something like $TextStyle ={whatever} 
> before doing the plots did not work.

What you want is *SetOptions* (Note that $Assumptions has nothing to do 
with options but with assumptions such as x > 0 or Element[n, Integers])

   In[166]:=
   SetOptions[NIntegrate, {MaxRecursion -> 30, AccuracyGoal -> 10}];

   NIntegrate[Exp[-x^2], {x, 20., 40.}]

   Out[167]= 1.36703*10^-177

Regards,
-- Jean-Marc


  • Prev by Date: Re: $Assumptions
  • Next by Date: Can Mathematica NIntegrate a Log-type singularity?
  • Previous by thread: Re: $Assumptions
  • Next by thread: Re: $Assumptions