How do you find and solve a composite function?

Composite functions can be thought of as 'functions within functions'. For example, let's suppose that 

f(x) = x3

g(x) = x + 5

defined for all real numbers.

(Note: composite functions may have a different notation such as (f ○ g)(x))


Q1) Solve the equation fg(x) = 27

Firstly, we must find the composite function fg(x) in terms of x before we solve it. In order to do this, we can break down the function in the following way:

fg(x) = f[g(x)] = f(x+5)

As you can see, we have broken down fg(x) into a function of g within a function of f. We can now replace 'x' in f(x) = x3 with 'x+5':

fg(x) = f(x+5) = (x+5)3

We can now use the above function to rearrange and solve for fg(x) = 27.

fg(x) = (x+5)3 = 27

              x+5   = 3√(27)

                       = 3

                  x   = 3 - 5

A1)            x   = -2


It is also possible to form a composite function by applying the same function twice. For example, if we apply the function f to f(x), we have ff(x) or f 2(x).

f 2(x) = f[f(x)]

         = f(x3)

         = (x3)3

          = x9

One thing to note when calculating composite functions is that fg(x) is unlikely to be the same as gf(x). For instance, from using f(x) and g(x) from our example above, we can calculate gf(x) below:

gf(x) = g[f(x)]

         = g(x3)

         = x3 + 5

This result is completely different from our result of fg(x) = (x+5)3


Another point to consider when solving composite functions is the array of values for which the function holds i.e. the domain and range of the function. These values determine whether a composite function will solve for a particular value, and so it is important to find the domain and range. We will now use a different example from above to demonstrate this point.

Let f(x) = x2 + 3

     g(x) = 2x + 1


Q2) Find fg(x) and explain why fg(x) = 1 has no real solution.

Like in Q1) we must find the function fg(x) before we solve it:

fg(x) = f[g(x)]

         = f(2x+1)

         = (2x+1)2 + 3

If we follow the same method as before we will find that fg(x) = 1 has no real solution:

fg(x) = (2x+1)2 + 3 = 1

                (2x+1)2   = -2

The next step we would usually take is to square root the number on the right hand side of the equation but we cannot square root a negative number without giving a complex solution, and so fg(x) does not have a real solution.

The reason for this is that fg(x) = 1 is outside the range of fg(x). To find the range of fg(x) we must imagine what the graph will look like. Since this equation is quadratic, the graph must be a parabola which is a u-shaped curve. Therefore, we must find the vertex, which is the lowest point of the curve, to establish which values fg(x) holds for.

The vertex of (2x+1)2 + 3 is (-½, 3). The x value comes from setting 2x + 1 = 0 and finding x = -½, and the y value comes from the 3 at the end of the expression.

Since the vertex is the lowest point of the curve, this means that any y values below 3 are not real solutions for fg(x) = (2x+1)2 + 3. However, the function has real solutions for all values of x. Therefore, the domain of fg(x) is x ∈ R and the range is fg(x) ≥ 3.

A2) fg(x) = (2x+1)2 + 3

fg(x) = 1 has no real solution because it falls outside the range of fg(x) which is fg(x) ≥ 3.

Lisa G. GCSE Maths tutor, A Level Maths tutor, 13 Plus  Maths tutor

3 years ago

Answered by Lisa, an A Level Maths tutor with MyTutor

Still stuck? Get one-to-one help from a personally interviewed subject specialist


£24 /hr

Aimee F.

Degree: Economics (Bachelors) - Leeds University

Subjects offered:Maths, Further Mathematics + 2 more

Further Mathematics
-Personal Statements-

“Hi, I'm Aimee and I study Economics at the University of Leeds. I am happy to help students in Economics and Math as they are two subjects I really love. I am patient and understanding and will happily go through things as many times ...”

£24 /hr

Sophie H.

Degree: Mathematics (Masters) - Bristol University

Subjects offered:Maths, Further Mathematics

Further Mathematics

“I’ll help anyone finding maths hard. I still struggle now, it's not meant to be easy! Be at my tutorial or (c^2-a^2) <- a maths joke, I apologise.”

£24 /hr

Hinsum W.

Degree: Medicine (Bachelors) - Edinburgh University

Subjects offered:Maths, Chemistry+ 3 more

-Personal Statements-
-Medical School Preparation-

“Hi, I'm a first year medic at Edinburgh. I've had 7 years' worth of experience teaching children Maths and English and have mentored lower school peers, so I'm bound to have an approach that will suit your learning style!”

About the author

£20 /hr

Lisa G.

Degree: BSc Economics and Management (Bachelors) - Bristol University

Subjects offered:Maths


“Top tutor from the renowned Russell university group, ready to help you improve your grades.”

MyTutor guarantee

You may also like...

Other A Level Maths questions

Use the chain rule to differentiate y=1/x^2-2x-1

How do I prove that an irrational number is indeed irrational?

using integration by parts evaluate the integral of xsinx between x=0 and x =pi/2

Write down two reasons for using statistical models

View A Level Maths tutors

We use cookies to improve your site experience. By continuing to use this website, we'll assume that you're OK with this. Dismiss