MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: how to have a blind factorization of a polinomial?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54158] Re: [mg54123] Re: how to have a blind factorization of a polinomial?
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Sat, 12 Feb 2005 01:57:07 -0500 (EST)
  • References: <cud789$2t3$1@smc.vnet.net> <cuf453$gfb$1@smc.vnet.net> <200502110833.DAA09170@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

foice wrote:

>On Thu, 10 Feb 2005 07:57:23 +0000 (UTC), "Jens-Peer Kuska"
><kuska at informatik.uni-leipzig.de> wrote:
>
>  
>
>>Sqrt[x + y] /. a_ + x :> x*(a/x + 1)
>>    
>>
>Thanks for your help. Probably is a viable method, but is a little less than you expect
>for a WorldWideFamous software as Mathematica.
>In this way you can chose the form of the output, you can also do mistaques typing
>something like
>Sqrt[x^3 + y^2] /. a_ + x :> x^3*(a/x + 1)
>and mathematica will not prevent you from the error giving an output in the form
>Sqrt[x^3*(y^2/x+1)]
>
>Is mathematica so feature poor to allow only a "requested form" factorization? 
>I can't belive it. 
>Why there isn't somethig as Collect but that can use also negatieve powers to collect?
>
>i.e. Collect[x+y,x,Blind] giving x(1+y/x)
>
>Or better, at least for my task, a Mathematica command converting a function f(x,y) into a
>function f(x,y/x) (if possible)
>
>Thanks
>
>-------------------------------------------------------------
>tutto ciò che ho scritto è sempre In My Humble Opinion (IMHO)
>probabilmente l'ho scritto di fretta, quindi scusate se sono stato sbrigativo.
>  
>

This is not at all well specified. I don't think you can reasonably 
expect Mathematica to figure out what you have not clearly requested. 
(Then there is the question of whether this, once specified, should be 
built in or programmed by the user. I would guess the latter, since it 
looks to be fairly obscure.)

What sort of input do you generally have in mind? Laurent polynomials 
possibly inside radicals? Something more general?

What would you like done with your example Sqrt[x^3 + y^2]? Would you like
Sqrt[x^2*(x + y^2/x^2)]? That's not hard to achieve.

PullOutPowers[expr_,x_] /; !SymbolQ[Head[expr]] ||
  !MemberQ[Attributes[Evaluate[Head[expr]]],NumericFunction] := expr

PullOutPowers[expr_,x_] := Module[
    {vars=Complement[Variables[expr],{x}], e2, head=Head[expr]},
    e2 = expr /. Thread[vars->x*vars];
    If [head===Plus || head===Times,
        Factor[e2] /. Thread[vars->vars/x],
        Map[Factor,e2] /. Thread[vars->vars/x]]
    ]

InputForm[PullOutPowers[Sqrt[x^3 + y^2], x]]
Out[5]//InputForm= Sqrt[x^2*(x + y^2/x^2)]

Given that you apparently want to consider variables as weighted with 
respect to one another, you might also try working with Series 
expansions, or some of the manipulation tactics presented in

http://library.wolfram.com/infocenter/Conferences/325/

in the section "Examples of polynomial manipulation".


Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Problems with easy simplifications
  • Next by Date: Re: [Mathematica 5.1] Bug Report - Two numerical values for a same variable
  • Previous by thread: Re: Re: Re: how to have a blind factorization of a polinomial?
  • Next by thread: solving simple first order condition