Concepts / Polynomial Basis Functions

Polynomial Basis Functions

Each OrderN polynomial basis function multiplies one powered term for every state variable.

  • Programming

From State to Functions

Suppose a state has d real-valued variables. An OrderN polynomial basis converts that state into a collection of polynomial basis functions. Each function is formed by choosing one allowed integer exponent for every state variable, raising each variable to its chosen exponent, and multiplying the resulting terms together.

The basis is not one polynomial chosen from a single exponent pattern. It is the complete collection produced by combining all allowed exponent choices.

use exponentsets poweruse exponentsets powermultiplymultiplys₁state variablec₁,jinteger exponents₁^c₁,jpowered terms₂state variablec₂,jinteger exponents₂^c₂,jpowered termbasis functionproduct of powered terms
How do the state variables combine with their exponents to form one polynomial basis function?

Exponent Choices

For every state variable, its corresponding exponent may be any integer from 0 through N. The notation c_i,j identifies the exponent assigned to a particular state variable in a particular basis function: the first index identifies the variable position, and the second identifies the basis-function choice. Thus, for a state with variables s₁ and s₂, one exponent controls the power of s₁ and another controls the power of s₂.

Changing an exponent changes the term contributed by its variable. For example, an exponent pair of (1, 2) produces s₁s₂². An exponent pair of (2, 0) produces s₁². The second variable does not appear as a factor in the written product because its power is zero.

assign powersassign powers(1, 2)c₁,j = 1, c₂,j = 2s₁s₂²product(2, 0)c₁,j = 2, c₂,j = 0s₁²product
Which exponent belongs to each state variable, and how does changing an exponent change the resulting term?

Multiplying the Terms

Constructing one basis function follows the same pattern for every number of state variables. First choose an allowed exponent for the first variable and form its powered term. Repeat this for the second variable and every remaining variable. Finally, multiply one powered term for every state variable. The result is one polynomial basis function.

assignraise each variablemultiplystate variabless₁, s₂, ..., s_dchoose exponents0 through Npowered termsone per variablebasis functionmultiply all terms
How does each powered state-variable term contribute to the final product that defines a basis function?

One Function from Three Variables

Choose exponents 2, 0, and 1 for state variables s₁, s₂, and s₃.

Assign the powers: The exponent for s₁ is 2, the exponent for s₂ is 0, and the exponent for s₃ is 1.

Form the powered terms: The terms are s₁², s₂⁰, and s₃¹.

Multiply the terms: Multiplying one powered term for each variable gives s₁²s₂⁰s₃¹, which can be written as s₁²s₃.

The chosen exponent combination produces the basis function s₁²s₃.

Counting the Complete Basis

Each of the d state variables has N + 1 possible exponent choices: 0, 1, and every integer through N. A complete basis function requires one choice for each variable. Because every allowed choice is combined with every allowed choice for the other variables, the complete OrderN basis contains (N + 1)^d different functions.

givessets number of factorscombine across variablesd variablesnumber of variablesN ordermaximum exponentN + 1 choicesfor each variable(N + 1)^dbasis functions
How do the number of state variables d and the order N determine how many basis functions are included?

Counting a Two-Variable Order-2 Basis

Find the number of functions when d = 2 and N = 2.

Count choices for one variable: Each exponent can be 0, 1, or 2, so there are N + 1 = 3 choices.

Combine the choices: There are 3 choices for the first variable and 3 choices for the second variable.

Apply the basis count: The number of functions is (N + 1)^d = 3^2 = 9.

A two-variable Order-2 polynomial basis contains 9 functions.

A Complete Small Basis

Take two state variables, s₁ and s₂, and choose Order 2. The possible exponent values for each variable are 0, 1, and 2. Represent each function by an exponent pair: the first entry controls s₁ and the second controls s₂.

next exponent pairnext exponent pairnext exponent pairnext exponent pairnext exponent pairnext exponent pairnext exponent pairnext exponent pair(0, 0)1(0, 1)s₂(0, 2)s₂²(1, 0)s₁(1, 1)s₁s₂(1, 2)s₁s₂²(2, 0)s₁²(2, 1)s₁²s₂(2, 2)s₁²s₂²
What are all the individual basis functions when two state variables and Order 2 are chosen?
Exponent pairBasis function
(0, 0)1
(0, 1)s₂
(0, 2)s₂²
(1, 0)s₁
(1, 1)s₁s₂
(1, 2)s₁s₂²
(2, 0)s₁²
(2, 1)s₁²s₂
(2, 2)s₁²s₂²

Every pair chooses one exponent for s₁ and one exponent for s₂.

Mistakes to Avoid

  • Using only exponents 1 through N

    Each exponent may be any integer from 0 through N, so omitting 0 removes valid basis functions such as 1, s₁, or s₂².

    Fix: List 0, 1, and every integer through N before combining choices.

  • Assigning both exponents to the same variable

    The first exponent controls s₁ and the second controls s₂.

    Fix: Read each position in the exponent choice as belonging to its corresponding state variable; (1, 2) produces s₁s₂².

  • Counting only the individual exponent values

    A function requires one exponent choice for every variable, and all choices are combined.

    Fix: Use (N + 1)^d. Here, 3 choices are made twice, giving 3² = 9.

  • Forgetting a variable with exponent zero

    The exponent 0 is allowed, so s₁² represents the pair (2, 0).

    Fix: Treat a zero exponent as a valid choice for that variable.

Practice Construction

EASY

Construct the complete polynomial basis for d = 2 and N = 1. List every exponent pair and write the corresponding basis function. Then determine the number of functions using (N + 1)^d.

Hints
  • Each exponent can be 0 or 1.
  • Pair the first exponent with s₁ and the second exponent with s₂.
  • There should be (1 + 1)^2 functions.
MEDIUM

A state has d = 3 variables and uses Order 2. How many functions are in the complete basis? Explain what the three exponent positions control in one chosen function.

Hints
  • There are three exponent choices for each variable: 0, 1, and 2.
  • Use (N + 1)^d.
  • The three exponent positions correspond to the three state variables.

Key Takeaways

  1. One polynomial basis function chooses one allowed exponent for every state variable and multiplies the resulting powered terms.
  2. For each variable, the exponent may be any integer from 0 through N.
  3. The exponent c_i,j identifies the power assigned to a particular variable in a particular basis function.
  4. Combining all exponent choices produces a complete OrderN basis containing (N + 1)^d functions.
  5. Exponent zero is valid, so the basis includes functions in which a variable does not appear as a visible factor.

Key Takeaways

  • A polynomial basis function is a product containing one powered term for every state variable.
  • The exponents c_i,j determine which power is used for each variable in a particular function.
  • Every exponent has N + 1 possible values, from 0 through N.
  • An OrderN basis over d variables contains (N + 1)^d functions.
  • To construct a small basis, enumerate every allowed exponent combination and translate each combination into a product.