Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

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

Search the Archive

Re: $Assumptions

  • To: mathgroup at
  • Subject: [mg92634] Re: $Assumptions
  • From: Peter Breitfeld <phbrf at>
  • Date: Thu, 9 Oct 2008 06:35:00 -0400 (EDT)
  • References: <gci2ia$ta$>

Ruth Lazkoz Sáez schrieb:
> Dear all,
> 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.
> Hope you can help me. Thanks,
> Ruth Lazkoz

If you evaluate

NIntegrate[Exp[-x^2], {x, 20, 40}, Assumptions -> True]

you will get the error message:

NIntegrate::optx: Unknown option Assumptions in \

This means, that NIntegrate doesn't have an Assumptions option.

Setting $Assumtions to any value works only for functions with an
Assumtions optin which must default to $Assumptions.

The function Assuming works similiar to construct like this:


so using Assuming won't work with NItegrate either.

The following function, which I found in this group, lists all
functions in the System-context, which have an Assumptions option:

hatOption[option_] := 
  ToExpression /@ 
     MemberQ[ToExpression[#, StandardForm, 
         Options[Unevaluated[#]] &][[All, 1]], option] &]];
hA = hatOption[Assumptions]

The only function of these, which has not Assumptions->$Assumptions
as default option is PowerExpand. It's Assumptions Option defaults
to Automatic. So PowerExpand too will not reacht on setting
$Assumptions or using Assuming.

Gruss Peter
Peter Breitfeld, Bad Saulgau, Germany --

  • Prev by Date: Re: Overlapping binning of differences of two lists
  • Next by Date: Re: Overlapping binning of differences of two lists
  • Previous by thread: Re: $Assumptions
  • Next by thread: Re: Why is Mathematica assuming k==l and how do I make it