Precalculus

Function Composition Calculator

Enter two functions f(x) and g(x) to get the composed function (f ∘ g)(x) = f(g(x)) in simplified form. You can also fill in a numeric value of a to get the composed value (f ∘ g)(a) alongside.

Function Composition Calculator

Compute (f ∘ g)(x) symbolically, plus an optional value at x = a.

Try:
Answer(f ∘ g)(x) = (2·x + 3)² + 1
  1. f(x)x² + 1
  2. g(x)2·x + 3
  3. Composition(f ∘ g)(x) = f(g(x)) = (2·x + 3)² + 1

Worked examples

Frequently asked questions

Is (f ∘ g) the same as (g ∘ f)?

No — composition is not commutative. f(g(x)) and g(f(x)) are generally different functions.

What input syntax does it accept?

Any expression in x with +, −, ×, ÷, ^ and the standard functions sqrt, sin, cos, tan, exp, ln. Implicit multiplication (3x, 2sin(x)) is supported.

Does it simplify the composition?

Yes — the composed expression goes through the same simplifier as the symbolic derivative tool, so constants collapse and like terms combine when possible.