Re: Extension of Factor
- To: mathgroup@smc.vnet.net
- Subject: [mg11741] Re: Extension of Factor
- From: Allan Hayes <hay@haystack.demon.co.uk>
- Date: Thu, 26 Mar 1998 03:09:08 -0500
- References: <6f1jd2$f49@smc.vnet.net>
Fred Lang wrote:
>
> Dear MathGroup users,
>
> I am a Mathematica user since 1988, I choose it for the beautiful plots
> and the coherent language.
>
> But sometimes, it seems to me, Mathematica is not so coherent, for
> example, let's look to the commands
>
> "Factor" "Apart" and "Integrate":
>
> 1) The Mathematica (3.0) command "Factor" have the option "Extension ->
> Automatic", but
>
> In[1] = Factor[ x^4 + 1 , Extension -> Automatic ] is unable to factor
> x^4 + 1.
>
> I have to use
>
> In[2] = Factor[ x^4 + 1 , Extension -> {Sqrt[2]} ] to have a result.
>
> 2) I cannot put a pattern in the Extension:
>
> In[3] = Factor[ x^4 + 1 , Extension -> {Sqrt[z_]} ]
>
> 3) Something like the following take a too long time:
>
> In[4] = list = Table[ Sqrt[ Prime[i] ] , {i,1,100} ]
>
> In[5] = Factor[ x^4 + 1 , Extension -> list ]
>
> 4) If a want to use Apart, I have no options like "Extension", I must
> enter something like:
>
> In[6] = Apart[ 1/Factor[ x^4 + 1 , Extension -> {Sqrt[2]} ] ]
>
> 5) But Integrate can factor 1/(x^4+1) very well :
>
> In[7] = Integrate[1/(x^4+1) , x]
>
> I am waiting for your comments.
>
> Fred Lang
Fred:
'
I throw in the following - its inefficiant, of limited applicablity and
amounts to getting Factor to sidestep multiplying factors from
conjugate roots - but it works on occasions
In[1]:=
ExactRealFactor[expr_]:=
Factor[ expr , Extension ->
Re[x/.Solve[expr==0,x]]]
In[2]:=
ExactRealFactor[x^4+1]
Out[1369]=
2 2 -((-1 + Sqrt[2] x - x ) (1 +
Sqrt[2] x + x )) --
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642