On Tue, 2008-06-10 at 12:56 -0700, Carl Witty wrote: > On Jun 10, 10:44 am, polo0691 <[EMAIL PROTECTED]> wrote: > > Thanks for creating sage! I can really see how useful sage could be > > for engineering purposes. I've been playing around with sage for a > > couple of days and I have had trouble with the following: > > > > 1) simplifying equations with exponents: > > > > sage: var('vgs vt n') > > (vgs, vt, n) > > sage: f = (vgs - vt)^n > > sage: f^(1/n) > > ((vgs - vt)^n)^(1/n) > > sage: f^(1/n).simplify() > > ((vgs - vt)^n)^(1/n) > > > > It doesn't seem to easily simplify the exponent. I'm guessing it > > is a limitation of the CAS engine used. I also tried the same test > > case on YACAS and it didn't seem to want to simplify the exponent > > either. > > I'm not surprised this doesn't simplify: there's no consistent > definition for exponentiation that lets you safely apply the > simplification you want. To pick a simple case, over the reals, > squaring followed by square root gives the absolute value: > > sage: ((-2)^2)^(1/2) > 2
Sometimes you can use 'assume' to get the behavior you want, however. In this case, for example: sage: var('vgs vt n') (vgs, vt, n) sage: f = (vgs - vt)^n sage: assume(vgs > vt) sage: f^(1/n) vgs - vt sage: forget() sage: f^(1/n) ((vgs - vt)^n)^(1/n) sage: --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---