Steply

Solve f(x) = 3x, g(x) = x + 2, g(f(x))

Step by step, with the reason for every step · Composition and inverse functions · Algebra 2

Step by step

The question

Question: find g(f(x)) for g(x) = x + 2 and f(x) = 3x.

g(x) = x + 2
f(x) = 3x

1 Work out the inside

g(f(x)) is a function inside a function.

Like with brackets, we start inside.

First f(x).

inside first: f(x)

f(x) is 3x.

So g(f(x)) is g(3x).

g(f(x)) = g(3x)

2 Put it in

Put (3x) in place of every x in g.

We keep it in brackets.

= (3x) + 2

3 Open the brackets

A bracket with a plus or nothing in front can just be removed.

( ) away

Now we have 3x + 2.

g(f(x)) = 3x + 2

4 Check

Let's check.

We pick a number for each letter: x = 2.

We put it into the start.

Start: (3 × 2) + 2 = 6 + 2 = 8

Now into our answer.

Answer: 3 × 2 + 2 = 6 + 2 = 8

Both give 8.

Same value, so 3x + 2 is right!

Both give 8

Let's look back.

First: work out the inside.

Then: put it in.

Then: open the brackets.

Last: check.

Answer
g(f(x)) = 3x + 2

Your turn

Try this one yourself, then check:

g(x) = x + 5, f(x) = 8x, find g(f(x))
Show the answer
g(f(x)) = 8x + 5

More from Composition and inverse functions

The whole lesson: Composition and inverse functions →