Derivatives: rules and functions

Meaning of a composite function f(g(x))

A composite function f(g(x))f(g(x)) applies gg first and then ff.

(fg)(x)=f(g(x))(f\circ g)(x)=f(g(x))

The composite function f(g(x))f(g(x)) applies gg to xx first, then ff to the result. Changing the order changes the function.

f(x)=x+3, g(x)=x2  g(f(x))=(x+3)2,f(g(x))=x2+3\begin{gathered} f(x)=x+3,\ g(x)=x^2 \ \Rightarrow\ g(f(x))=(x+3)^2, \\[4pt] f(g(x))=x^2+3 \end{gathered}

For differentiation, practice seeing y=(2x+4)4y=(2x+4)^4 as an outer function y=u4y=u^4 and an inner function u=2x+4u=2x+4. The chain rule multiplies the derivatives of the outer and inner parts.

Examples

  1. 01Write g(f(x)) as an expression:f(x)=x+3,g(x)=x2\displaystyle f(x)=x+3, \quad g(x)=x^{2}AnswerHide
    Answer(x+3)2\displaystyle (x+3)^{2}
  2. 02What is g(f(x)) − f(g(x))?g(f(x))=4x+2,  f(g(x))=4x+8\displaystyle g(f(x))=4x+2,\; f(g(x))=4x+8AnswerHide
    Answer6\displaystyle -6
  3. 03Write g(f(x)) as an expression:f(x)=x+4,g(x)=x2\displaystyle f(x)=x+4, \quad g(x)=x^{2}AnswerHide
    Answer(x+4)2\displaystyle (x+4)^{2}
  4. 04Viewing this as y=u4y=u^{4}, what is the inner uu?y=(2x+4)4\displaystyle y=(2x+4)^{4}AnswerHide
    Answer2x+4\displaystyle 2x+4
  5. 05Write f(g(x)) as an expression:f(x)=x+5,g(x)=x2\displaystyle f(x)=x+5, \quad g(x)=x^{2}AnswerHide
    Answerx2+5\displaystyle x^{2}+5
  6. 06What is g(f(x)) − f(g(x))?g(f(x))=3x+5,  f(g(x))=3x+15\displaystyle g(f(x))=3x+5,\; f(g(x))=3x+15AnswerHide
    Answer10\displaystyle -10

FAQ

Q1Are f(g(x)) and g(f(x)) the same?Show answerHide
A
Usually not. With f(x)=x+3f(x)=x+3 and g(x)=x2g(x)=x^2, f(g(x))=x2+3f(g(x))=x^2+3 but g(f(x))=(x+3)2g(f(x))=(x+3)^2. The order matters.

Practice this pattern in the app, 5 problems a day.

Download on the App Store
Before this
coming soonFunction notation f(x) and substitution
This topic
Meaning of a composite function f(g(x))

Published 2026-09-04 · Updated 2026-09-05