Function Composition Calculator: f(g(x))
Enter two functions and an x-value to evaluate the composite function f(g(x)).
First function applied to x
Second function applied to g(x)
Numeric input for evaluation
What Is “f of g of x”?
In algebra, f(g(x)) means you are combining two functions into one. This is called function composition. You apply g to x first, then take that result and feed it into f.
Think of it as a two-step process:
- Step 1: Compute g(x)
- Step 2: Use that output as the input for f, giving f(g(x))
How to Use This f(g(x)) Calculator
This calculator is built for quick function composition and evaluation. Enter your two formulas and your x-value, then press calculate.
Input format tips
- Use x as the variable (example:
3x+2orx^2-4) - You can use parentheses:
(x+1)(x-1) - Use powers with
^(example:x^3) - Supported functions include:
sqrt,sin,cos,tan,ln,log,abs
Worked Example
Suppose:
- g(x) = 2x + 3
- f(x) = x² - 1
- x = 4
First, evaluate g(4):
g(4) = 2(4) + 3 = 11
Then plug into f:
f(g(4)) = f(11) = 11² - 1 = 120
The composite function itself is f(g(x)) = (2x+3)² - 1.
Why Function Composition Matters
Composite functions show up everywhere in math and applied fields:
- Precalculus and calculus: chain rule, transformations, inverse functions
- Physics: layered formulas where one quantity depends on another
- Economics: cost, revenue, and demand models
- Computer science: function pipelines and data transformations
Common Mistakes to Avoid
- Reversing order: f(g(x)) is not the same as g(f(x))
- Forgetting parentheses: write
1/(x+2)not1/x+2 - Domain issues:
sqrt(x)requires x ≥ 0 in real numbers - Input mismatch: always substitute g(x) into every x in f(x)
Quick FAQ
Can I use this as a composite function calculator for homework checks?
Yes. It is ideal for verifying manual work, especially when practicing composition notation and substitution accuracy.
Does this calculator simplify f(g(x)) symbolically?
It displays the substituted form of the composition and computes numeric values at your chosen x. Full symbolic expansion is not the goal here; speed and correctness of evaluation are.
Can I enter trigonometric and logarithmic functions?
Yes. Use expressions like sin(x), cos(x), ln(x), and log(x). For log, this tool uses base-10 log.