Function Composition Calculator
Function Composition Calculator
Format: terms like 3x^2, -2x, +5. Exponents use ^.
Apply g first (x^2 − 3 at 2 gives 1), then f (2x + 1 at 1 gives 3).
Result Breakdown
| Quantity | Value |
|---|---|
| f(x) (simplified) | 2x + 1 |
| g(x) (simplified) | x^2 − 3 |
| g(2) = g(x) at input | 1 |
| f(g(2)) — (f∘g)(2) | 3 |
| g(f(2)) — (g∘f)(2) | 22 |
Composition Curves
g(x) and the composed f(g(x)) across the value table.
Value Table (x = −2 … 2)
| x | g(x) | f(g(x)) |
|---|---|---|
| -2 | 1 | 3 |
| -1 | -2 | -3 |
| 0 | -3 | -5 |
| 1 | -2 | -3 |
| 2 | 1 | 3 |
About the Function Composition Calculator
Function composition chains operations: (f∘g)(x) = f(g(x)) means "run g on x, then run f on the output." It is the mathematical version of a pipeline — the inner function feeds the outer one. For f(x) = 2x + 1 and g(x) = x² − 3, the composition (f∘g)(x) = 2(x² − 3) + 1 = 2x² − 5, so at x = 2 the value is 3.
Why order matters
Composition is not commutative: reversing the order gives g(f(x)) = (2x + 1)² − 3, a completely different function. This is why the calculator shows both directions and a value table — watching f(g(x)) diverge from g(f(x)) across inputs makes the non-commutativity concrete. The parser accepts simple polynomials without any eval, so expressions like 3x^2 + 2x − 5 are safe to enter.
Frequently Asked Questions
Related Calculators
Home Loan Calculator
Calculate home loan EMI, total interest, and amortization schedule.
Auto Loan Calculator
Detailed auto loan with trade-in, taxes, fees, and amortization.
Bike Loan Calculator
Calculate bike loan EMI, total cost, and repayment breakdown.
Boat Loan Calculator
Estimate boat financing payments, interest, and amortization.
Student Loan Calculator
Calculate student loan payments with income-driven repayment plans.
Gold Loan Calculator
Calculate gold loan amount based on gold weight, purity, and LTV ratio.
USDA Loan Calculator
Calculate USDA loan payments with guarantee fee and income eligibility.
Loan Against Property Calculator
Calculate LAP EMI based on property value and loan-to-value ratio.