Re: "Nice" complex form
- To: mathgroup at smc.vnet.net
- Subject: [mg131601] Re: "Nice" complex form
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Tue, 10 Sep 2013 03:35:28 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
On 9/9/13 at 12:06 AM, sam.takoy at yahoo.com wrote: >Can I get >Assuming[a - 4 < 0, Sqrt[a - 4]] >to "simplify" to >I Sqrt[4 - a] Given Mathematica by default considers expressions with lower LeafCount as simpler and: In[1]:= Sqrt[a - 4] // LeafCount Out[1]= 7 In[2]:= I Sqrt[4 - a] // LeafCount Out[2]= 13 the simplest answer to your question is you can't, i.e., there isn't a built-in function to do this. So, if you want to transform Assuming[a - 4 < 0, Sqrt[a - 4]] to I Sqrt[4 - a] you will have to create a special function to do that. Perhaps the following will suffice: In[3]:= Sqrt[a - 4] /. Sqrt[a_] -> I Sqrt[-a] Out[3]= I*Sqrt[4 - a] Or possibly you could add a transformation rule to Simplify. But this last certainly seems counter to the design of Simplify.