Re: Persistent assumption
- To: mathgroup at smc.vnet.net
- Subject: [mg106071] Re: [mg106019] Persistent assumption
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 31 Dec 2009 03:20:33 -0500 (EST)
- Reply-to: hanlonr at cox.net
$Assumptions = {x > 0};
Simplify[Sqrt /@ {x^2, y^2}]
{x, Sqrt[y^2]}
$Assumptions =.
Bob Hanlon
---- Sam Takoy <samtakoy at yahoo.com> wrote:
=============
Hi,
Is it possible to make an Assumption for the duration of a block of
code? In other words, to say "In all of the following code, Assume[x>0]".
I appreciate that it is possible to use,
Assuming[x>0,
a whole lot of code
]
but that's quite awkward. Looking for a better alternative.
Thanks,
Sam