Re: Expression transformation
- To: mathgroup at smc.vnet.net
- Subject: [mg59319] Re: [mg59268] Expression transformation
- From: stephen layland <layland at wolfram.com>
- Date: Fri, 5 Aug 2005 01:22:44 -0400 (EDT)
- References: <200508040607.CAA26418@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
and thus spake mumbojumbo [2005.08.04 @ 01:24]: > Dear forum, > > How can I persuade Mathematica to transform the expression > Exp(-x)+(a+b Exp[-x])/c Exp[-x]... > to the form > (a+(b+c)Exp(-x))/c Negative unnamed variables sometimes cause problems with the way mathematica decides to display its results. The unsuspecting user would then try to use Simplify[], or (egads) FullSimplify[] to get their symbolic expression in the form they would have written on paper. This of course, doesn't always give the desired results, mainly because you don't know all the things that Simplify is trying to do! For now, an easy way to achieve this is to trick Simplify into thinking there are no negative Exp's lying around: In[1]:= Simplify[Exp[-x]+(a+b Exp[-x])/c /. -x -> u] /. u->-x //InputForm Out[1]//InputForm= (a + (b + c)/E^x)/c In future versions, there might be an easier way to pass this kind of exclusion to Simplify[]. Mathematica may not always do what you want, but getting symbolic algebra systems to behave just like human brians is something that just isn't that easy, try as we might. :) -- /*------------------------------*\ | stephen layland | | Documentation Programmer | | http://members.wri.com/layland | \*------------------------------*/
- References:
- Expression transformation
- From: mumbojumbo <mjumbo@gmail.com>
- Expression transformation