Composition of functions
Problem 13.352 · medium
Let \( \displaystyle f(x) = \sqrt{x + 4} \) and \( \displaystyle g(x) = x^{3} - 4 \). Find \( \displaystyle (f \circ g)(x) \) and \( \displaystyle (g \circ f)(x) \), simplified.
- (f∘g)(x) = f(g(x)): put g(x) in place of x in f. (g∘f) is the other way round.
- \[ \left. \sqrt{x + 4} \right|_{\substack{ x=x^{3} - 4 }} = \sqrt{x^{3}} \]f(g(x)), simplified.✓ Proved
- \[ \left. x^{3} - 4 \right|_{\substack{ x=\sqrt{x + 4} }} = \left(x + 4\right)^{\frac{3}{2}} - 4 \]g(f(x)), simplified.✓ Proved
- The two orders give different functions: composition is not commutative.
Answer \( (f \circ g)(x) = \sqrt{x^{3}},\quad (g \circ f)(x) = \left(x + 4\right)^{\frac{3}{2}} - 4 \)
Lines: 2 proved, 2 not checked. The answer was also checked a second way, without looking at the solution. The reviewers disagree about how one step is explained; every verdict is in the receipt. How we verify
The full receipt
| Line | Status | Checked by | Detail |
|---|---|---|---|
| 1 | Not checked | — | a sentence; read, not computed |
| 2 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 3 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 4 | Not checked | — | a sentence; read, not computed |
| answer, a second way | ✓ Checked independently | sympy 1.14.0 + mpmath 1.3.0 | f(g(x)) and g(f(x)) computed in floating point at sample points |
Reviewers
gpt-oss:20b: passqwen3.6:27b-mlx: fail (error) — The simplification in line 2 is incorrect; f(g(x)) is sqrt(x^3 - 4), not sqrt(x^3). The CAS output shown is mathematically wrong for the given functions.
Every verdict on record (6)
qwen3.6:27b-mlx: fail (error) 2026-10-19 — The simplification in line 2 is incorrect; f(g(x)) is sqrt(x^3 - 4), not sqrt(x^3). The CAS output shown is mathematically wrong for the given functions.gpt-oss:20b: pass 2026-10-19qwen3.6:27b-mlx: fail (error) 2026-10-16 — The simplification in line 2 is incorrect; f(g(x)) simplifies to sqrt(x^3 - 4), not sqrt(x^3). The CAS output shown in line 2 appears to be a hallucination or error, as substituting x^3 - 4 into sqrt(x+4) does not yield sqrt(x^3).gpt-oss:20b: pass 2026-10-16qwen3.6:27b-mlx: fail (error) 2026-10-16 — The simplification in step 2 is incorrect; f(g(x)) should be sqrt(x^3 - 4), not sqrt(x^3). The solution erroneously dropped the '-4' inside the square root.gpt-oss:20b: pass 2026-10-16
Proved: SymPy reduced the difference between the two sides to zero. Checked independently: a separate
method, named above, confirmed it. Checked numerically: the two sides agree at every sampled point, which is evidence,
not proof. Reviewed: a model or a person read it; that is all a sentence can have. Solution by
generator:structured/function_composition, checked 2026-10-19 with SymPy 1.14.0.