Wolfram Research

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 and Options

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

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

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

A polynomial can be dehomogenized 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

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

Resource History

License Information