# Composition of functions and substituting

There are many ways of combining functions to creat more complicated functions. We can combine them using algebraic operations (adding, subtracting, multiplying, and dividing), and can substitute one function into another to create a composition.

## Combinations

We can combine functions by adding, subtracting, multiplying or dividing.

Example
Let

Then
 = "twice sin(x) plus the quadratic" = = "one plus the quotient of the quadratic and sin(x)" =

## Compositions

If we substitute one function into another, we can generate functions in which one function can be thought of as "inside" the other.

Example
Let

Then
 = "three plus the square of sin(x)" = = "the sine of the quadratic" =

### Simple substitutions

When we are using the function notation f(x) and something other than the independent variable alone appears in the parentheses, we are being asked to form a new function by substitution.

Example
 think the inside function is () the inside function is (2x) the inside function is (-x) the inside function is (x+h)
Common errors
Do not confuse substitution with performing algebraic operations on the function itself. The letters and symbols may be the same, but the meaning is very different.

Example
Even though f(3x) and 3f(x) each contain the letter f, the number 3 and the letter x, they describe different operations:

 think substitute (3x) into f multiply f by 3
Similarly:
 think the cosine of (x squared) the square of (cosine of x)
And
 think the reciprocal of (x+h) f(x) plus the constant h

### Notational conventions

There are times when it is customary to omit parentheses when writing certain functions.

### Difference quotients

One common operation which requires both the composition and the combination of functions comes up in the calculation of slope, where we have:

The expression

is called a difference quotient.

Example
Let

Find and simplify the difference quotient.

In problems like this, be careful to form the composition f(x+h) correctly, and be sure that the minus sign in the numerator is applied to the entire function f(x).
Practice

Be sure you've gone through each step in the examples above before doing these. Once you've worked them until you're sure that you understand them, go on to the next section. There are more problems of this type in the section test at the end of the section.

Note that you can get new practice problems by clicking the "Refresh" button at the bottom of the practice set.

1. Find and simplify the difference quotient

if f(x) = 6 x + 6.

2. If
Find the difference quotient

3. If f(x) = 6 x + 1, find and simplify

into the form