On Fri, Oct 24, 2008 at 7:39 PM, Richard Hennessy <rvh2007 at comcast.net>wrote:
> (%i15) assume_pos:true;
> (%o15) true
> (%i11) ratsimp((2*unit_step(x)-1)/x);
> (%o11) 1/x
> ...
> In the first case the function simplifies to 1/x which is not correct.
Please read the documentation for assume_pos.
For positive x, unit_step(x) = 1, so %i11 correctly simplifies to 1/x with
assume_pos:true, just as abs(x) simplifies to x. By setting assume_pos:true,
you are telling Maxima to assume that <<all>> variables are positive (unless
declared otherwise). Obviously assume_pos must be used with very great
caution. I don't generally recommend its use.
-s