Composite Function Calculator
Compute (f∘g)(x) = f(g(x)) by evaluating two functions in sequence at a given x value.
Inputs
Outer function
Inner function
(f∘g)(x) = f(g(x))
26.00000000
(g∘f)(x) = g(f(x))
31.00000000
g(x)
5.00000000
f(x)
17.00000000
Step by step
Values used
f(x) = x^2 + 1; g(x) = 2*x - 3; x value = 4
Composition
(f∘g)(x) = f(g(x))
Reverse composition
(g∘f)(x) = g(f(x))
(f∘g)(x) = f(g(x))
= 26.00000000
(g∘f)(x) = g(f(x))
= 31.00000000
g(x)
= 5.00000000
f(x)
= 17.00000000
How it works
Function composition (f∘g)(x) means applying g first, then f to the result: f(g(x)). Note that composition is generally not commutative: f(g(x)) ≠ g(f(x)) in most cases. This calculator evaluates both orders for comparison.
Formulas
Composition
(f∘g)(x) = f(g(x))
- f
- Outer function
- g
- Inner function
- x
- Input value
Reverse composition
(g∘f)(x) = g(f(x))
- f
- First function applied
- g
- Second function applied
Frequently Asked Questions
Is f(g(x)) the same as g(f(x))?
Not in general. Function composition is not commutative — the order matters. This calculator shows both so you can compare.
What expressions can I use?
Any expression supported by the parser: polynomials, trig functions, logarithms, exponentials, square roots, etc. Use x as the variable.