What is a composite function?
A composite function combines two functions by feeding the output of one into the other. The notation \((f \circ g)(x)\), read "f composed with g," means you first evaluate the inner function \(g\) at \(x\), then apply \(f\) to that result: \((f \circ g)(x) = f(g(x))\). Order matters — composing the other way, \((g \circ f)(x) = g(f(x))\), usually gives a different answer.
How to use this calculator
Enter the coefficients for two quadratic functions, \(f(x) = a \cdot x^{2} + b \cdot x + c\) and \(g(x) = d \cdot x^{2} + e \cdot x + h\). To work with a linear function such as \(g(x) = 2x + 1\), set \(d = 0\), \(e = 2\), \(h = 1\). For a constant, set the higher coefficients to 0. Pick the value of \(x\) to evaluate, and the calculator returns \(g(x)\), \(f(g(x))\), \(f(x)\), and \(g(f(x))\) so you can compare both compositions.
The formula explained
To compute \((f \circ g)(x)\): first find the inner value \(u = g(x) = d \cdot x^{2} + e \cdot x + h\). Then substitute \(u\) into \(f\): \(f(u) = a \cdot u^{2} + b \cdot u + c\). The composite value is therefore $$(f \circ g)(x) = a \cdot g(x)^{2} + b \cdot g(x) + c.$$ The reverse composition \((g \circ f)(x)\) swaps the roles, using \(f(x)\) as the inner value.
Worked example
Let \(f(x) = x^{2} + 1\) (\(a=1\), \(b=0\), \(c=1\)) and \(g(x) = 2x + 3\) (\(d=0\), \(e=2\), \(h=3\)), evaluated at \(x = 2\). First $$g(2) = 2 \cdot 2 + 3 = 7.$$ Then $$f(7) = 7^{2} + 1 = 50.$$ So \((f \circ g)(2) = 50\). For comparison, \(f(2) = 5\) and $$(g \circ f)(2) = g(5) = 2 \cdot 5 + 3 = 13.$$
FAQ
Is \((f \circ g)(x)\) the same as \(f(x) \cdot g(x)\)? No. Composition substitutes \(g(x)\) into \(f\), while multiplication multiplies the two outputs — completely different operations.
Does \((f \circ g)\) equal \((g \circ f)\)? Only in special cases. In general function composition is not commutative.
Can I use linear functions? Yes — set the \(x^{2}\) coefficient to 0 to get a linear or constant function.