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

2 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


Sahil M. A Level Biology tutor, GCSE Biology tutor, A Level Chemistry...
£22 /hr

Sahil M.

Degree: Medicine (Bachelors) - Manchester University

Subjects offered:Maths, Spanish+ 3 more

-Medical School Preparation-

“Hello! My name is Sahil and I am currently a medical student at the University of Manchester. I am really looking forward to tutoring you in Spanish, Chemistry, Biology or Maths as well as trying to help you during the difficult proce...”

£24 /hr

Tiarnan B.

Degree: MChem (Masters) - York University

Subjects offered:Maths, Geography+ 2 more

-Personal Statements-

“I am a fun, open and qualified tutor. I guarantee by choosing me you will reach where you want to be and beyond, all while enjoying the subject!”

£20 /hr

Juris B.

Degree: Computer Science (Bachelors) - St. Andrews University

Subjects offered:Maths, Computing


“I am a Computer Science at the University of St. Andrews. Before that however, I was a pupil in a school in the North-East of Scotland. With the combined passion and availability of superb teachers - I was given an opportunity to exce...”

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

Find the stationary points on the curve y = x^3 + 3x^2 - 9x - 4

How do you integrate by parts?

How do you find the normal to a curve at a given co-ordinate?

How do you integrate e^x cos x

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