# Functions, Composite Functions, and Function Inverses

On this page we hope to demonstrate the following:

How to evaluate a function, and deal with different variables _{<1>}

How to compose functions _{<2>}

Ex: f(x) = x^{2} - 4x + 4; g(x) = x + 1; Find

How to find function inverses _{<3>}

Ex: ; Find f^{-1}(x)

### Evaluating Functions

^{<home>}

Evaluating and dealing with functions by themselves is an easy
task. Suppose you have the statement,

Find f(3)

This may or may not seem apparent and frankly, quite boring if you have
already seen functions, but it is important to understand what each
part of this expression tells us.

The blue part of the statement is a definition of our
function, f. We can think of a function as a set of rules to be
followed - it tells us what to do with a an inputted value. This
particular function takes our input value, cubes it, and then
multiplies it by the sin of our input value. t simply represents the dummy variable. It stands in
for any number - it just lets us know that wherever there is a t in the definition, if we replace
it with the input value, we will get the value of the function.

We can choose whatever we want for the dummy variable, even a smiley
face, but there are a few generally accepted precedents that you may
come across. Functions that usually take in values of angles use
θ as a dummy variable, and we usually do not use letters early in the
alphabet, like a, b, c, etc., as well as letters usually associated
with constants, like g for gravity or h for planck's constant.
Use your own judgment: if you're studying math you're probably smart
enough to figure out an appropriate variable!

The reddish part of the statement asks us to find f(3). All this
means is that we have to find the value of the function f at the point
t = 3. In otherwords, we look at the function definition, and
input 3 instead of t. This yields , and that
gives us our answer. Easy! However, some people get
confused when strange dummy variables are used or functions get longer
and more complicated, so simply be wary and take your time and you
should be comfortable with most any function.

## Composite Functions

^{<home>}

Suppose we had two functions, , and . When we **compose **functions, we essentially nest one inside the other. The notation for a composite function looks like , which actually is just the notation for a function, , that takes in a variable, *x*.

is simply a composition of functions, and it is very easy to deal with. An equivalent way of writing is , which we read as "f of g of x," and this notation reveals how we treat a composite function. Notice that actually describes a function, f, with its dummy variable as g(x). Then, in our example, we have . Yet, we know what g(x) is, so we can replace g(x) on the right-hand side of the equation to get a function entirely of x: .

In general, whenever you get a composition of functions in the form , it may help to write it as , write f as a function of g(x), and then replace g(x) with its equivalent function of x. **Always remember to put the inner function in the outer function.** In our example, we put g(x) inside f(x) when we composed the two, because in the notation, , the function g is closer to x. If we were instead told to find , we would put f(x) inside g(x). Similarly, to find , we put i(x) inside g(x), then we put that composition inside of h(x), then we put *that* composition inside f(x).

Examples: Evaluate the following composite functions.

1. ;; Find and

2. *f(x) = x ^{2} - 4x + 4; g(x) = x + 1*; Find and

3. ; ; Find

4. ; ; ; Find and

Note how the order of composition changes the value; i.e. and may be different.

1. = f(g(x)) = g(x) + 4 = x - 4 + 4 = **x**

= g(f(x)) = f(x) - 4 = x + 4 - 4 = **x**

2. = f(g(x)) = g(x)^{2} - 4g(x) + 4 = (x + 1)^{2} - 4(x + 1) + 4 = x^{2} + 2x + 1 - 4x - 4 + 4 = **x ^{2} - 2x + 1**

= g(f(x)) = f(x) + 1 = x^{2} - 4x + 4 + 1 = **x ^{2} - 4x + 5**

3. = g(h(x)) =

4. = f(g(h(x))) = f(g(2x - 2)) = f((2x - 2)/2 - 4) = f(x - 5) = sin((x - 5)^{2}) = **sin(x ^{2} - 10x + 25)**

= f(h(g(x))) = f(h(x/2 - 4)) = f(2(x/2 - 4) - 2) = f(x - 10) = sin((x - 10)^{2}) = **sin(x ^{2} - 20x + 100)**

### Function Inverses

A function inverse can be thought of as the reversal of whatever our function does to its input. For example, suppose we have the function f(x) = x^{2}, so that f brings 3 to 9 (since f(3) = 3^{2} = 9). The inverse function, denoted f^{-1}(x), would have to bring 9 to 3, since it essentially reverses the process executed by the function, bringing us back to square one. It would also have to bring every output of our function f to the input that we started. As you probably already know, the opposite of squaring something is to take the square root of it, so f(x) = sqrt(x). Similarly, we know that the opposite of addition (+) is subtraction (-), and the opposite of multiplication (x) is division (÷).

We can often intuitively find a function inverse just by our knowledge of opposite operations like multiplication and division. We begin with the outermost operation in our function, f, and then do the opposite operation on *x*, continuing to work outwards. Watch the following flash demo to see an example and a better explanation:

### Method for obtaining inverses

^{<home>}

This method utilizes the fact that f(f^{-1}(x)) = f^{-1}(f(x)) = x. This may seem confusing, but it is a result of the most basic principles of function inverses. Think of a function as some sort of process that we put x through, and it outputs some term. A functions inverse is simply the reverse process. So if we put x through a process, f, then put it through the reverse process, f^{-1}, we end up with just x again.

Suppose we had to find the inverse of f(x) = (7x + 4)/12. Remember that x is just a dummy variable - we can write f(a) = (7a + 4)/12 or f(&) = (7& + 4)/12. Instead, we decide to make the dummy variable f^{-1}(x), so that we end up with f(f^{-1}(x)) = (7f^{-1}(x)+4)/12. However, we know that f(f^{-1}(x)) = x, so we end up with x = (7f^{-1}(x) + 4)/12. Now, we just solve the algebraic equation to get f^{-1}(x) by itself in terms of x. Check out the following flash animation to see this process more clearly:

The methodical approach can be summarized in the following steps:

**1. Replace x with f ^{-1}(x)**

**on both sides of the equation.**

At this point, you should have a f(f

^{-1}(x) )on one side of your equation and then a function of f

^{-1}(x) on the other.

2. Substitute in f(f^{-1}(x)) = x.

If we take the inverse of a function on the output of the function, f(x), we are left with the input. Therefore, if we take f(f^{-1}(x)), we are left with the original input, which is x. Therefore we know f(f^{-1}(x)) = x. Remember that, since the two expressions are equal, we can just replace f(f^{-1}(x)) with x.

3. Solve for f^{-1}(x) in terms of x.

At this point, we have an x on one side of the equation, and then a function of f^{-1}(x) on the other side. Try to solve for f^{-1}(x) by getting it by itself on one side of the equation. This will tell you what the inverse function is.

**Examples:** Find the inverses for the following functions.

1. f(x) = x + 4

2. f(x) = (x + 4)^{2} - 5

3.

4.

5.

1. f(x) = x + 4

Step 1:f(f^{-1}(x)) = f^{-1}(x) + 4

Step 2:x = f^{-1}(x) + 4

Step 3:x - 4 = f^{-1}(x)

Therefore f^{-1}(x) = x - 4

2. f(x) = (x + 4)^{2} - 5

f(f

^{-1}(x)) = (f^{-1}(x) + 4)^{2}- 5

x = (f^{-1}(x) + 4)^{2}- 5

x + 5 = (f^{-1}(x) + 4)^{2}^{ }

Therefore

3.

Therefore

4.

Therefore

5.

For this problem, you may need some knowledge of trigonometry and inverse trig functions.

Therefore