Steply

Solve f(x) = 2x + 1, g(x) = x^2 - 3, f(g(x))

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

Step by step

The question

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

f(x) = 2x + 1
g(x) = x2 − 3

1 Work out the inside

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

Like with brackets, we start inside.

First g(x).

inside first: g(x)

g(x) is x² − 3.

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

f(g(x)) = f(x2 − 3)

2 Put it in

Put (x² − 3) in place of every x in f.

We keep it in brackets.

= 2(x2 − 3) + 1

3 Open the brackets

The 2 in front of the bracket multiplies every part inside.

a(b + c) = ab + ac

So we write 2 times each part.

= 2(x2) + 2(−3) + 1
− × + = −

Watch the signs.

2 times x² is 2x².

2 times (−3) is −6.

= 2x2 − 6 + 1

4 Group like terms

Terms are the parts between the + and − signs.

Like terms are the same kind: same letters, same powers.

Plain numbers go together.

Each colour is one kind.

like terms = same letters,
same powers

−6 + 1 is −5.

−6 + 1 = −5

So the expression is 2x² − 5.

f(g(x)) = 2x2 − 5

5 Check

Let's check.

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

We put it into the start.

Start: 2 × (22 − 3) + 1 = 2 × 1 + 1 = 2 + 1
= 3

Now into our answer.

Answer: 2 × 22 − 5 = 8 − 5 = 3

Both give 3.

Same value, so 2x² − 5 is right!

Both give 3

Let's look back.

First: work out the inside.

Then: put it in.

Then: open the brackets.

Then: group like terms.

Last: check.

Answer
f(g(x)) = 2x2 − 5

Your turn

Try this one yourself, then check:

f(x) = 2x + 1, g(x) = x2 − 5, find f(g(x))
Show the answer
f(g(x)) = 2x2 − 9

More from Composition and inverse functions

The whole lesson: Composition and inverse functions →