∫Calc Practice

Composition of functions

Problem 13.157 · medium

Let \( \displaystyle f(x) = - 2 x^{2} - 4 x \) and \( \displaystyle g(x) = x^{2} + 3 \). Find \( \displaystyle (f \circ g)(x) \) and \( \displaystyle (g \circ f)(x) \), simplified.
  1. (f∘g)(x) = f(g(x)): put g(x) in place of x in f. (g∘f) is the other way round.
    Reviewed
  2. \[ \left. - 2 x^{2} - 4 x \right|_{\substack{ x=x^{2} + 3 }} = - 2 x^{4} - 16 x^{2} - 30 \]
    f(g(x)), simplified.✓ Proved
  3. \[ \left. x^{2} + 3 \right|_{\substack{ x=- 2 x^{2} - 4 x }} = 4 x^{2} \left(x + 2\right)^{2} + 3 \]
    g(f(x)), simplified.✓ Proved
  4. The two orders give different functions: composition is not commutative.
    Reviewed
Answer \( (f \circ g)(x) = - 2 x^{4} - 16 x^{2} - 30,\quad (g \circ f)(x) = 4 x^{2} \left(x + 2\right)^{2} + 3 \)

✓ Nihil obstat Lines: 2 proved, 2 reviewed. The answer was also checked a second way, without looking at the solution. Reviewers found nothing wrong with the explanation. How we verify

The full receipt
LineStatusChecked byDetail
1Reviewedreviewers: gpt-oss:20b, qwen3.6:27b-mlxa sentence; read, not computed
2✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
3✓ Provedsympy 1.14.0simplify(lhs - rhs) reduced to 0
4Reviewedreviewers: gpt-oss:20b, qwen3.6:27b-mlxa sentence; read, not computed
answer, a second way✓ Checked independentlysympy 1.14.0 + mpmath 1.3.0f(g(x)) and g(f(x)) computed in floating point at sample points

Reviewers

  • gpt-oss:20b: pass
  • qwen3.6:27b-mlx: pass — The solution correctly defines function composition, performs the substitutions accurately (verified by the algebra check), and simplifies the results correctly. The concluding remark is mathematically sound.
Every verdict on record (6)
  • qwen3.6:27b-mlx: pass 2026-10-18 — The solution correctly defines function composition, performs the substitutions accurately (verified by the algebra check), and simplifies the results correctly. The concluding remark is mathematically sound.
  • gpt-oss:20b: pass 2026-10-18
  • qwen3.6:27b-mlx: pass 2026-10-15 — The solution correctly defines function composition, performs the substitutions accurately, and simplifies the results as requested. The final observation about non-commutativity is correct and relevant.
  • gpt-oss:20b: pass 2026-10-15
  • qwen3.6:27b-mlx: pass 2026-10-14 — The solution correctly defines function composition and provides the correct simplified results for both (f ∘ g)(x) and (g ∘ f)(x). The concluding remark about non-commutativity is accurate.
  • gpt-oss:20b: pass 2026-10-14

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-18 with SymPy 1.14.0.