Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: $Assumptions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92629] Re: $Assumptions
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Thu, 9 Oct 2008 06:34:03 -0400 (EDT)
  • References: <gci2ia$ta$1@smc.vnet.net>

Hi,

> I seem to be unable to change some default options globally.
> 
> At the top of  my notebook I have
> 
> $Assumptions = {MaxRecursion -> 30, AccuracyGoal -> 10};

If you want to change default options, use SetOptions. Changing
$Assumptions will not have any effect on NIntegrate, except that you
might introduce unintended side effects. This should do what you want:

SetOptions[NIntegrate,MaxRecursion -> 30, AccuracyGoal -> 10]

you can even check that this has been succesful by evaluating:

Options[NIntegrate]

> 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.

Same story here: You need to change the Options of Plot:

SetOptions[Plot, BaseStyle -> {FontSize -> 20}]

>From the documentation:
"As of Version 6.0, $TextStyle has been superseded by BaseStyle and
other options."

There have been complaints about the documentation, but still I think it
is a good idea to first look there if something doesn't work as expected...

hth,

albert


  • Prev by Date: Re: How to print TraditionalForm without evaluation
  • Next by Date: Re: How to print TraditionalForm without evaluation
  • Previous by thread: Re: $Assumptions
  • Next by thread: Re: $Assumptions