Step by step
The question
Question: find f(g(x)) for f(x) = x² + 1 and g(x) = 2x − 1.
1 Work out the inside
f(g(x)) is a function inside a function.
Like with brackets, we start inside.
First g(x).
g(x) is 2x − 1.
So f(g(x)) is f(2x − 1).
2 Put it in
Put (2x − 1) in place of every x in f.
We keep it in brackets.
3 Write the square out
A square means the bracket times itself.
(2x − 1)² is 2x − 1 times 2x − 1.
Careful!
We can't just square each part.
4x² + 1 is wrong.
The middle part is missing.
So we write the bracket two times.
4 Split the first bracket
Each part of the first bracket multiplies the whole second bracket.
The parts of the first bracket are 2x and −1.
Each one takes the whole second bracket.
5 Open the brackets
What is in front of a bracket multiplies every part inside.
So we write each part times what is in front.
Watch the signs.
2x times 2x is 4x².
2x times (−1) is −2x.
(−1) times 2x is −2x.
(−1) times (−1) is 1.
6 Group like terms
Terms are the parts between the + and − signs.
Like terms are the same kind: same letters, same powers.
All the x terms go together.
Plain numbers go together.
Each colour is one kind.
−2x − 2x is −4x.
1 + 1 is 2.
So the expression is 4x² − 4x + 2.
7 Check
Let's check.
We pick a number for each letter: x = 2.
We put it into the start.
Now into our answer.
Both give 10.
Same value, so 4x² − 4x + 2 is right!
Let's look back.
First: work out the inside.
Then: put it in.
Then: write the square out.
Then: split the first bracket.
Then: open the brackets.
Then: group like terms.
Last: check.