Re: Factor[1+x^4]

*To*: mathgroup at smc.vnet.net*Subject*: [mg26889] Re: Factor[1+x^4]*From*: paradaxiom at my-deja.com*Date*: Fri, 26 Jan 2001 01:27:32 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

By default Factor[] factors over integers. If you want Factor[] to factor into Sqrt[2] and I you have to give this to the Extension option: In[1]:= f = Factor[1 + z^4, Extension -> {I, Sqrt[2]}] Out[1]= (1/4)*(Sqrt[2] - (1 + I)*z)* (Sqrt[2] - (1 - I)*z)* (Sqrt[2] + (1 - I)*z)* (Sqrt[2] + (1 + I)*z) In[2]:= Expand[f] Out[2]= 1 + z^4 Of course, in general you don't know what Extension to pick beforehand. So one thing you can do is the following: In[1]:= poly = 1 + z^4 Out[1]= 1 + z^4 The find the extension you want by looking at the roots of the polynomial: In[2]:= extension[poly_, z_] := ComplexExpand[ Roots[poly == 0, z] /. {_ == a_ -> a} /. {Or -> List} ] In[3]:= extension[poly, z] Out[3]= {(1 + I)/Sqrt[2], -((1 - I)/Sqrt[2]), -((1 + I)/Sqrt[2]), (1 - I)/Sqrt[2]} In[4]:= Factor[poly, Extension -> extension[poly, z]] Out[4]= (1/4)*(Sqrt[2] - (1 + I)*z)* (Sqrt[2] - (1 - I)*z)* (Sqrt[2] + (1 - I)*z)* (Sqrt[2] + (1 + I)*z) I hope this helps a bit. Perhaps someone knows a better way to go about this? //Marten Sent via Deja.com http://www.deja.com/