Functions & Inverses
Function Composition
Compare functions and their composition with preserved real domains.
f(x)=x^2+1, g(x)=2*x, (f∘g)(x) means f(g(x))=(2*x)^2+1=4*x^2+1. Both functions and this composition have all real inputs.
The numeric version at 3 returns 37. The three-function example (f∘g∘h)(x), with f(x)=x+1, g(x)=2*x and h(x)=x^2, returns 2*x^2+1. Use Equations for the exact simplification or Graph to compare the original functions and the composition.
Equation
f(x)=x^2+1, g(x)=2*x, (f∘g)(x)
Substitution order and domains
Composition applies the rightmost function first. To form f(g(x)), substitute the whole expression g(x) for every occurrence of the input in f. Parentheses matter: squaring 2*x gives 4*x^2, not 2*x^2. The symbol ∘ and nested function calls describe the same operation, and changing their order can change the answer.
The input must belong to the inner function's domain, and the inner output must belong to the outer function's domain. Simplification cannot remove an original hole or make a forbidden square root real. The equation workflow reports the symbolic expression and substitution steps. The graph workflow compares the functions and their composition on their valid domains.
Reading the input
f(x)=x^2+1, g(x)=2*x, (f∘g)(x)— f(x)=x^2+1, g(x)=2*x, (f∘g)(x) means f(g(x))=(2*x)^2+1=4*x^2+1. Both functions and this composition have all real inputs.
Try a change
- Edit one number in the field, then use Generate Graph. The studio opens on the homepage with the edited text and runs it.
- Use Open in DGS Studio when you want the expression loaded but not run yet.
Generate Graph opens this input in the graph workspace with its domain restrictions. The interactive result keeps the existing zoom, pan, and export controls.