MathGroup Archive 2009

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

Search the Archive

Re: Defining assumptions globally

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95960] Re: [mg95945] Defining assumptions globally
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 31 Jan 2009 01:11:19 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Simplify[Sqrt[x^2]]

Sqrt[x^2]

$Assumptions = {x > 0}

{x>0}

Simplify[Sqrt[x^2]]

x


Bob Hanlon

---- Kay-Michael Voit <usenet1 at voits.net> wrote: 

=============
Hello,
is it possible to define assumptions globally?

This is my (simplified) problem:
To calculate certain quantities I wrote some modules like

cE[n_,0,s_]:=Module[{},
  cE[n,0,s]= E[n-1,0,s] Integrate[W[x,s],{s,0,1}]
]

(cE[0,0,s] is of course defined)

Later I would like to use for example

: [Module-Def]


Now, W might be quite complicated, so Integrate might need assumptions.
is there a better way than

: WAssumptions={}
  cE[n_,0,s_]:=Module[{},
    cE[n,0,s]= E[n-1,0,s]
Integrate[W[x,s],{s,0,1},Assumptions->WAssumptions]
  ]
: WAssumptions={a>0}
  W[x_,s_]= a ...;
: cE[n]

?

Regards
Kay



  • Prev by Date: Re: integration
  • Next by Date: Re: Defining assumptions globally
  • Previous by thread: Defining assumptions globally
  • Next by thread: Re: Defining assumptions globally