Calculator Form
This page keeps a clean single-column flow, while the form fields shift into three columns on large screens, two on medium screens, and one on mobile.
Example Data Table
Example using f(x) = x² + 2x + 1 and g(x) = 2x - 3.
| x | f(x) | g(x) | f(g(x)) | g(f(x)) |
|---|---|---|---|---|
| -1 | 0 | -5 | 16 | -3 |
| 0 | 1 | -3 | 4 | -1 |
| 1 | 4 | -1 | 0 | 5 |
| 2 | 9 | 1 | 4 | 15 |
Formula Used
Core composition rules
Function composition: (f∘g)(x) = f(g(x)) and (g∘f)(x) = g(f(x)).
Polynomial expansion: each function is stored by coefficients, then composition is expanded exactly using polynomial multiplication and addition.
Degree and derivative checks
Degree estimate: deg(f∘g) usually equals deg(f) × deg(g) when leading coefficients stay nonzero.
Derivative: ((f∘g)′)(x) = f′(g(x))·g′(x) and ((g∘f)′)(x) = g′(f(x))·f′(x).
How to Use This Calculator
- Choose the degree of f(x) and enter coefficients from x⁴ down to the constant term.
- Choose the degree of g(x) and enter its coefficients the same way.
- Set the evaluation point, graph range, number of sampled rows, and display precision.
- Select whether to inspect both orders or focus on one composition.
- Press Compose Functions to show expanded formulas, numeric results, the graph, and the sampled table above the form.
- Use the export buttons to save the sampled data as CSV or generate a PDF summary.
Frequently Asked Questions
1. What does function composition mean?
Function composition means one function uses the output of another. In f(g(x)), you first calculate g(x), then place that result into f. Reversing the order usually changes the answer.
2. Why are f(g(x)) and g(f(x)) often different?
Composition is generally not commutative. Even simple functions can produce very different outputs when their order changes, because the inner function transforms the input before the outer function acts.
3. What kinds of functions does this page support?
This version supports polynomial inputs up to degree four for each source function. The resulting composition can therefore expand to much higher degree, depending on the chosen terms.
4. Why does the degree of the composition grow quickly?
When a polynomial is placed inside another polynomial, powers multiply. For example, a cubic inside a quartic can generate terms as high as degree twelve, assuming leading coefficients remain nonzero.
5. What does the sampled output table show?
The table lists evenly spaced x-values across your chosen range. For each point, it shows f(x), g(x), f(g(x)), and g(f(x)), making it easier to compare behavior numerically.
6. What is the derivative output used for?
The derivative values show local change at your selected x-point. They help you compare how steeply each composition is changing there, which is useful for analysis and checking calculus work.
7. What does the graph help me see?
The graph helps you compare original functions and composed functions over the same interval. It makes turning points, growth, symmetry, and order-based differences much easier to notice.
8. Can I export my results?
Yes. After calculating, you can export all sampled rows as CSV and generate a PDF summary containing formulas, selected metrics, and a compact version of the sampled table.