Understanding Function Composition: How to Evaluate $ g(f(4)) $ Step by Step

Function composition is a powerful concept in mathematics that allows us to build complex transformations by combining simpler functions. In this article, we’ll explore a clear example of computing $ g(f(4)) $, using step-by-step calculations to illustrate the process.


Understanding the Context

Step 1: Compute $ f(4) $

We begin by evaluating the inner function $ f(x) $. Although the exact definition of $ f(x) $ isn’t provided in this example, our scenario assumes a straightforward linear function:

$$
f(x) = 3x - 7
$$

Now substitute $ x = 4 $ into the function:

Key Insights

$$
f(4) = 3(4) - 7 = 12 - 7 = 5
$$

This first evaluation is crucial — it feeds the output of $ f $ directly into the next function.


Step 2: Substitute $ f(4) $ into $ g(x) $

Next, we use the result $ f(4) = 5 $ as the input for the function $ g(x) $. According to the problem, $ g(x) $ is defined as:

Final Thoughts

$$
g(x) = x^2 + 2x
$$

Now substitute $ x = 5 $ into $ g(x) $:

$$
g(5) = (5)^2 + 2(5) = 25 + 10 = 35
$$


Final Result

Putting it all together:

$$
g(f(4)) = g(5) = 35
$$

Thus, the final value is:

$$
oxed{35}
$$