## Function Composition

When you see something like $f(g(x))$ or $(f \circ g) x$, you have function composition.

The idea behind function composition is that we start with two separate functions, like $f(x) = x+5$ and $g(x) = x^2$. Then, one function acts as the input for another function.

So, see how $f(x) = x+5$ has input $x$? When we have a composition like $f(g(x))$, the input becomes $g(x)$. This means we need to replace every $x$ with $g(x)$.

It's like how cute Sonic replaced creepy Sonic in every scene of the movie after the trailer dropped.

Similarly, we need to replace every $x$ with $g(x)$. Try it out! Enter in two functions and see what the composition looks like:

#### We start by replacing every $x$ you see with $g(x)$

#### Since the function you entered for $f(x)$ doesn't have any $x$'s in it, there's nothing to replace on the right side, so we can just finish our calculation and be done!

#### Then, replace every $g(x)$ on the right side with the function you entered for $g(x)$.

#### Since the function you entered for $g(x)$ doesn't have any $x$'s in it, we can just finish our calculation, and we're done!

And that's function composition! Now, let's plug in a value for $x$.

#### There seems to be an issue with one of your functions. Make sure you have valid numbers and variables - no dollar signs, percents, or any other non-math symbols.

#### This value gets plugged in for every $x$ we see. So, we get:

#### We can first simplify $$ if possible, and then replace each blue part we see with the result.

#### Then, we just do our final calculation and we're done!