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

f(x) = x^{3}

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) = x^{3} 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(x^{3})

= (x^{3})^{3}

= x^{9}

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(x^{3})

= x^{3} + 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) = x^{2} + 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.**