HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /Two machines are placed in a row, and then the order of the machines is swapped to see whether the…
EasyMathematicsHigh School (9–10)Functions and Calculus › Composite and Inverse FunctionsNumericalA-LevelIGCSEIB

Two machines are placed in a row, and then the order of the machines is swapped to see whether the…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

Two machines are placed in a row, and then the order of the machines is swapped to see whether the outputs agree.

f(x)=3x−2f(x) = 3x - 2f(x)=3x−2 and g(x)=x2+1g(x) = x^2 + 1g(x)=x2+1.

Find gf(2)gf(2)gf(2) and fg(2)fg(2)fg(2).

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

gf(x)gf(x)gf(x) means g(f(x))g(f(x))g(f(x)): the function next to xxx acts first. In general gfgfgf and fgfgfg differ. The composite gfgfgf exists only for the inputs xxx where f(x)f(x)f(x) is allowed in ggg.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. gf(2)gf(2)gf(2). f(2)=4f(2) = 4f(2)=4, then g(4)=16+1=17g(4) = 16 + 1 = 17g(4)=16+1=17.

Step 2. fg(2)fg(2)fg(2). g(2)=5g(2) = 5g(2)=5, then f(5)=15−2=13f(5) = 15 - 2 = 13f(5)=15−2=13.

Watch out. gf(2)=17gf(2) = 17gf(2)=17 and fg(2)=13fg(2) = 13fg(2)=13 are different. The order of the functions matters.

Answer: gf(2)=17gf(2) = 17gf(2)=17 and fg(2)=13fg(2) = 13fg(2)=13.

Log in to save this for later
← All Problems
← Some rules are their own reverse: running them twice returns the starting input, whatever it was…Two chains of the same two machines are built in opposite orders, and Lena looks for the one input… →
More onFunctions and Calculus › Composite and Inverse Functions

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. Composite functionsDomain, Range, Inverse and Composite Functions

More on this topic

  1. Two functions are chained, but each has its own list of allowed inputs, so the chain may not exist…Hard
  2. Two chains of the same two machines are built in opposite orders, and Lena looks for the one input…Medium
  3. Some rules are their own reverse: running them twice returns the starting input, whatever it was…Hard
Samir wants to run a quadratic rule backwards, so the domain must be cut on one side of the turning…Medium
  • A rule divides one linear expression by another, and Priya wants the reverse rule and the inputs it…Medium
  • All problems on this topic →