Calculator Inputs
Enter coefficients from highest degree to constant. Example: 2, 3, 1 means 2x² + 3x + 1.
Example Data Table
Example polynomials: f(x)=2x²+3x+1, g(x)=x²−1, f(g(x))=2x⁴−x², g(f(x))=4x⁴+12x³+13x²+6x.
| x | f(x) | g(x) | f(g(x)) | g(f(x)) |
|---|---|---|---|---|
| -2 | 3 | 3 | 28 | 8 |
| -1 | 0 | 0 | 1 | -1 |
| 0 | 1 | -1 | 0 | 0 |
| 1 | 6 | 0 | 1 | 35 |
| 2 | 15 | 3 | 28 | 224 |
Formula Used
Polynomial composition substitutes one polynomial into another. If f(x) = a₀ + a₁x + a₂x² + ... + aₙxⁿ and g(x) = b₀ + b₁x + b₂x² + ... + bₘxᵐ, then:
f(g(x)) = a₀ + a₁g(x) + a₂[g(x)]² + ... + aₙ[g(x)]ⁿ
g(f(x)) = b₀ + b₁f(x) + b₂[f(x)]² + ... + bₘ[f(x)]ᵐ
The calculator builds the composition using a Horner-style polynomial process. This reduces repeated symbolic expansion steps and keeps the result efficient.
Degree rule: for non-constant inputs, deg(f∘g) = deg(f) × deg(g). Coefficient growth can become large quickly.
How to Use This Calculator
- Enter coefficients for f(x) from highest degree to constant.
- Enter coefficients for g(x) in the same order.
- Choose whether to inspect both orders or focus on one composition.
- Set a value of x for direct evaluation.
- Set graph start, end, and step values for the plotting range.
- Choose precision, then submit the form.
- Review the symbolic expressions, coefficient lists, value table, and graph.
- Use the CSV and PDF buttons to export the generated output.
Frequently Asked Questions
1) What is polynomial composition?
It means inserting one polynomial into another. Instead of evaluating numbers only, you replace the variable in one polynomial with the full expression of another polynomial.
2) Why are f(g(x)) and g(f(x)) different?
Composition is order-sensitive. Substituting g(x) into f(x) usually produces a different expression than substituting f(x) into g(x).
3) In what order should I enter coefficients?
Enter coefficients from highest power to constant term. For example, 3, -2, 5 represents 3x² - 2x + 5.
4) Can I use decimal or fractional coefficients?
Yes. You can enter decimals such as 0.75 or simple fractions such as 3/4. Each entry is parsed as a numeric coefficient.
5) Why does the degree grow quickly?
Composition multiplies degrees when both polynomials are non-constant. A quadratic inside a cubic creates degree six, so terms and values can grow rapidly.
6) What does the graph show?
The graph plots generated values across your chosen range. Depending on your options, it can show the original polynomials and the two composed results together.
7) What is included in the CSV and PDF exports?
The exports include the symbolic results, evaluation summary, and the generated value table. This makes it easy to review or share calculated compositions.
8) Why might I see very large values?
Nested powers can explode quickly, especially with large coefficients or wide graph ranges. Reducing the range or increasing the step often makes the output easier to inspect.