Function Repository Resource:

PolynomialHomogenize

Source Notebook

Homogenize a polynomial with respect to a given set of variables

Contributed by: Daniel Lichtblau

ResourceFunction["PolynomialHomogenize"][poly,vars,t]

homogenizes the expanded polynomial poly in total degree of vars using the new variable t.

ResourceFunction["PolynomialHomogenize"][{poly1,poly2,},vars,t]

homogenizes each of polyi.

Details

Each term in ResourceFunction["PolynomialHomogenize"][poly,vars,t] will have the same total degree. Terms in poly of lower degree are augmented by an appropriate power of t.

Examples

Basic Examples (2) 

Homogenize the equation for a hyperbola:

In[1]:=
ResourceFunction["PolynomialHomogenize"][x^2 - y^2 - 3, {x, y}, t]
Out[1]=

Create a homogenized polynomial of total degree 4:

In[2]:=
ResourceFunction["PolynomialHomogenize"][
 1 - 2 b + b^2 + c^2 - 2 b c^2 + b^2 c^2 + 2 a c d - 2 a b c d + d^2 +
   a^2 d^2 - r - a^2 r - c^2 r, {a, b, c, d, r}, t]
Out[2]=

Scope (1) 

Any variables appearing in a polynomial that are not specified in vars are treated as parameters (that is, part of the coefficients):

In[3]:=
ResourceFunction["PolynomialHomogenize"][
 1 - 2 b + b^2 + c^2 - 2 b c^2 + b^2 c^2 + 2 a c d - 2 a b c d + d^2 +
   a^2 d^2 - r - a^2 r - c^2 r, {a, b, c, d}, t]
Out[3]=

Properties and Relations (1) 

A polynomial can be de-homogenized by setting the homogenizing variable to unity:

In[4]:=
poly = 1 - 2 b + b^2 + c^2 - 2 b c^2 + b^2 c^2 + 2 a c d - 2 a b c d +
    d^2 + a^2 d^2 - r - a^2 r - c^2 r;
hpoly = ResourceFunction["PolynomialHomogenize"][poly, Variables[poly], t]
Out[4]=
In[5]:=
(hpoly /. t -> 1) === poly
Out[5]=

Possible Issues (1) 

PolynomialHomogenize requires the input polynomial to be fully expanded:

In[6]:=
ResourceFunction["PolynomialHomogenize"][
 1 + b^2 (1 + c^2) + 2 a c d + d^2 + a^2 d^2 - 2 b (1 + c^2 + a c d) -
   c^2 (-1 + r) - r - a^2 r, {a, b, c, d, r}, t]
Out[6]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.0.1 – 03 January 2022
  • 1.0.0 – 13 February 2019

License Information