[Date Index]
[Thread Index]
[Author Index]
Re: Simplify With Assumptions
*To*: mathgroup at smc.vnet.net
*Subject*: [mg17963] Re: [mg17931] Simplify With Assumptions
*From*: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
*Date*: Mon, 7 Jun 1999 02:51:20 -0400
*Sender*: owner-wri-mathgroup at wolfram.com
This is strange because it is possible to write even in mathematica 3 a
version of simplify which will work with such cases. Here is an very
imperfect example (not meant to be used, there is plenty wrong with it!)
which illustrates the idea:
In[1]:=
<<Algebra`AlgebraicInequalities`
In[2]:=
mysimplify[Sqrt[f_],{vars__},cond_List]:=
PowerExpand[Sqrt[f]]/;SemialgebraicComponents[
Append[cond,
PowerExpand[Sqrt[Denominator[f]]]*PowerExpand[Sqrt[Numerator[f]]]<
0],{vars}]=={};
mysimplify[f_,{vars_},cond_List]:=Simplify[f]
Now we can do not only things like:
In[3]:=
mysimplify[Sqrt[x^2], {x}, {x > 0}]
Out[3]=
x
but also
In[3]:=
mysimplify[Sqrt[(2*t^2 + 1)^2/t^2], {t}, {t > 0}]
Out[3]=
2
1 + 2 t
--------
t
One of the many unsatisfactory things is that
In[4]:=
mysimplify[Sqrt[x^2], {x}, {x < 0}]
Out[4]=
2
Sqrt[x ]
instead of -x, but one could obviously fix that. I can't see any obvious
reason why a (much better) version has not been implemented. Perhaps Adam
Strzebonski would like to comment?
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp
----------
>From: "David Park" <djmp at earthlink.net>
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg17963] [mg17931] Simplify With Assumptions
>Date: Sat, Jun 5, 1999, 3:56 PM
>
> Simplify with assumptions in Version 4 is not everything one might
> hope.
>
> Simplify[Sqrt[x^2], x > 0]
> x
>
> But
>
> Simplify[Sqrt[(1 + 2*t^2)^2/t^2], t > 0]
> Sqrt[4 + 1/t^2 + 4*t^2]
>
> not
>
> (1 + 2*t^2)/t
>
> Of course we can see for ourselves and PowerExpand. Yet one would have
> hoped that Mathematica would have handled this case automatically.
>
> David Park
> djmp at earthlink.net
> http://home.earthlink.net/~djmp/
>
>
>
>
Prev by Date:
**Re: need help hiding display formulas**
Next by Date:
**Re: Question on symbols in modules**
Previous by thread:
**Simplify With Assumptions**
Next by thread:
**Re: Simplify With Assumptions**
| |