Composite Function Evaluator
Evaluate composite functions (f ∘ g)(x) = f(g(x)), (g ∘ f)(x) = g(f(x)), and self-compositions with intermediate step-by-step value tracing and domain verification.
Composition Order
Select which function is the outer function vs. inner function
Compute exact numerical value at this real number (or enter expression like 3, -1/2, pi/4)
3-Stage Function Pipeline (Inside-Out Process)
Stage flow: x → Inner → OuterStep-by-Step Composition Solution
Verified algebraic stepsAll 4 Compositions Comparison at x₀
Demonstrates that (f ∘ g)(x) ≠ (g ∘ f)(x) in generalComposite Curves & Point (x₀, y₀)
Range: x ∈ [-4, 4]Sample Values Table
Integer x| x | g(x) | f(g(x)) | g(f(x)) |
|---|
How to Evaluate a Composite Function f(g(x))
To evaluate a composite function, work strictly from the inside out: for a given input value x = c, first compute the inner function value u = g(c). Then, plug that intermediate output u into the outer function f(u). Remember that function composition is non-commutative: f(g(x)) ≠ g(f(x)) in general.
What Is a Composite Function? (Definition & Notation)
In mathematics, function composition is the algebraic operation that takes two functions, f and g, and produces a new function by applying one after the other.
Formally, given a function g: A → B and a function f: B → C, the composite function f ∘ g: A → C is defined for every element x ∈ A by:
Circle Notation (f ∘ g)(x)
Read as "f circle g", "f composed with g", or "f of g". The small circle is an operation symbol, exactly like addition (+) or multiplication (×).
Nested Parentheses f(g(x))
Shows the actual computational order: g(x) is the complete input expression placed inside the outer function f.
The Inside-Out Evaluation Rule
When evaluating a composite function at a specific number x = c, always follow the inside-out pipeline rule:
Proof: Function Composition Is Non-Commutative
In ordinary arithmetic, multiplication is commutative (a × b = b × a). However, function composition is strictly non-commutative:
The Two-Step Domain Rule
An input x must safely navigate both functions to belong to the domain of (f ∘ g)(x):
Step 1: Domain of Inner Function
x must be in Domain(g). If g(x) is undefined (e.g. division by zero), evaluation stops immediately.
Step 2: Domain of Outer Function
The intermediate result g(x) must be in Domain(f). If f cannot accept g(x), the composite value does not exist.
Step-by-Step Worked Examples
Given f(x) = 2x + 1 and g(x) = x², evaluate (f ∘ g)(3) and (g ∘ f)(3)
The Calculus Connection: The Chain Rule
Composite functions form the backbone of differential calculus. You cannot differentiate a composite function by simply differentiating each part independently. Instead, you apply the Chain Rule:
In words: differentiate the outer function f while keeping the inner function g(x) completely untouched inside, and then multiply by the derivative of the inner function g'(x).
Common Pitfalls & Composition Errors
Confusing Composition with Multiplication
(f ∘ g)(x) ≠ f(x) · g(x). Composition plugs one function into another; multiplication computes both values separately and takes their product.
Missing Outer Parentheses
When substituting g(x) = x + 2 into f(x) = x², students often write x + 2² = x + 4 instead of (x + 2)² = x² + 4x + 4.
Evaluating in Reverse Order
In (f ∘ g)(x), the right-hand function g must execute first. Evaluating f(x) first gives (g ∘ f)(x), which is completely different.
Ignoring the Inner Function Domain
Never determine the domain strictly from the simplified result formula. Any value of x that produces division by zero or an imaginary number in the inner function remains excluded forever.
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.