StudySmarter - The all-in-one study app.
4.8 • +11k Ratings
More than 3 Million Downloads
Free
Americas
Europe
Lerne mit deinen Freunden und bleibe auf dem richtigen Kurs mit deinen persönlichen Lernstatistiken
Jetzt kostenlos anmeldenCombining functions is one way to manipulate functions in AP Calculus. It allows us to create new functions from existing ones. While most of combining functions are the result of algebraic operations (think addition/subtraction and multiplication/division), another way of combining functions is a new method we will discuss called composition of functions.
In this article, we cover all things related to the combining and composing of functions.
We can create a new function by adding, subtracting, multiplying, or dividing functions, just like how these operations form a new number.
The combination of functions is the act of combining multiple functions into a single function. This usually entails using basic mathematical operators such as addition or multiplication.
To start, let's take a look at the easier way to combine functions: arithmetic combination of functions.
Arithmetic combination of functions is the creation of new functions by combining existing functions using basic arithmetic operations such as: addition, subtraction, multiplication, and division.
Just as numbers can be added, subtracted, multiplied, and divided, we can use these same operations on functions!
Consider the functions \(f(x) = 2x + 1\) and \(g(x) = 3x +2\).
What happens when we combine them by addition?
\[(f+g)(x) = f(x) + g(x)\]
Now we can substitute each of the functions.
\[(f + g)(x) = (2x +1) + (3x +2)\]
And finally, collect like terms.
\[(f + g)(x) = 5x + 3\]
Let's consider the same functions again, \(f(x) = 2x + 1\) and \(g(x) = 3x +2\).
What happens when we combine them by subtraction?
\[(f-g)(x) = f(x) - g(x)\]
Now we substitute the functions as before.
\[(f - g)(x) = (2x +1) - (3x +2)\]
And we can collect like terms.
\[(f - g)(x) = -x - 1\]
Let's consider the functions \(f(x) = 2x + 4\) and \(g(x) = x + 2\)
What happens if we multiply them together.
\[(fg)(x) = f(x) \cdot g(x)\]
And substitute in the functions.
\[(fg)(x) = (2x + 4)(x+2)\]
We then multiply out the brackets.
\[(fg)(x) = 2x^2 + 4x + 4x + 8\]
And again we can collect like terms.
\[(fg)(x) = 2x^2 + 8x + 8\]
Let's consider the functions \(f(x) = 2x + 4\) and \(g(x) = x + 2\) once again.
What happens when we combine them by division.
\[(\frac{f}{g})(x) = \frac{f(x)}{g(x)}\]
And substitute in the functions.
\[(\frac{f}{g})(x) = \frac{2x+4}{x+2}\]
Then we simplify algebraically. In the case of these functions, we find a common factor and divide through.
\[(\frac{f}{g})(x) = \frac{2(x+2)}{x+2}\]
\[(\frac{f}{g})(x) = 2\]
In most precalculus maths, the main object we study is numbers. While we also study overall patterns as seen in functions and equations, this usually occurs through examining the numbers themselves.
This changes in calculus. In calculus, the fundamental objects being studied are the functions themselves, which are much more sophisticated mathematical objects than numbers.
It is often helpful to look at a function's formula and observe its algebraic structure. For instance, given the quadratic function,
\[f(x) = -3x^2 + 5x -7\]
we might benefit from thinking of this as the sum of three simpler functions:
Each of the simpler functions: c, l, and q contribute to making f the function that it is.
Likewise, if we were interested in the function,
\[p(x) = (3x^2 + 4)(9-2x^2)\]
it might be natural for us to think about the two simpler functions:
that are multiplied together to produce p.
When we arithmetically combine functions, the domain of the new function will contain the x-values that are common between the original functions. In other words, both functions must be defined at a point for their combination to be defined.
Additionally, when dividing functions, the domain is further restricted so that the denominator isn't equal to zero.
Basically, what this means is when we evaluate combined functions, we can either:
If the domain of a function, f, is the set, A, and the domain of the function, g, is the set, B, then the domain of f + g is the intersection \(A \cap B\) (note that the symbol, \(\cap\), just means "intersection") because both f(x) and g(x) have to be defined.
Let's say we have the functions:
\[f(x) = \sqrt x g(x) = \sqrt{2-x}\]
The domain of f(x) is \(A = [0, \infty )\).
The domain of g(x) is \(B = (-\infty, 2]\).
So, the domain of (f + g)(x) is:
\((f + g) (x) = \sqrt x + \sqrt{2-x}, \text{ Domain of } (f + g)(x) \text{ is }A \cap B = [0, 2]\)
Similarly, the domain of (f - g)(x) is:
\((f - g) (x) = \sqrt x - \sqrt{2-x}, \text{ Domain of } (f - g)(x) \text{ is }A \cap B = [0, 2]\)
As with the addition and subtraction of functions, the domain for the multiplication and division of functions is the intersection \(A \cap B\).
However, when we divide functions, we need to further restrict the domain of the combined function since we can't divide by zero. So, for the division of functions, the domain is \(x \in A \cap B \space | \space g(x) ≠ 0\) . This is read as "the set of all values of x such that x is an element of the intersection of A and B, as long as g(x) does not equal zero." (That is quite the mouthful!)
Let's say we have the functions:
\[f(x) = x^2; \space g(x) = x-1\]
The domain of f(x) is \(A = (-\infty, \infty)\).
The domain of g(x) is \(B = (-\infty, \infty)\).
So, the domain of \((f \cdot g) (x)\) is:
\((fg)(x) = x^2(x-1); \text{ Domain of } (fg)(x) \text{ is } A\cap B = (-\infty, \infty)\)
But, the domain of \((\frac{f}{g})(x)\) is:
\((\frac{f}{g})(x) = \frac{x^2}{x-1}; \text{ Domain of } (\frac{f}{g})(x) \text{ is } A \cap B= (-\infty, 1)\cup (1, \infty)\)
If we consider two functions: f(x) and g(x), then, for the values of x within the domain of both f(x) and g(x), the sum, difference, product, and quotient of the two functions are defined as:
For these next four sections, let's consider the two functions:
\(f(x) = 5x + 2\) and \(g(x) = x^2-1\)
We will also solve each combination where x = 4.
\[f(4) = 5(4) + 2 = 20 + 2 = 22\]
\[g(4) = (4)^2 - 1 = 16-1 = 15\]
What is \((f+g)(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | ||||
\((f+g)(x)\) | \((f+g)(x)= f(x) +g(x)\) | \(= (5x+2) + (x^2 -1)\) | \(= 5x + 2+x^2 -1\) | \(=x^2+5x+1\) | --- | --- | \((-\infty, \infty)\) |
\((f+g)(4)= f(4) +g(4)\) | \(= (5(4)+2) + ((4)^2 -1)\) | \(= 5(4) + 2+(4)^2 -1\) | \(16 + 20 +1\) | \((f+g)(4)= f(4) +g(4)\) | \(=22+15 = 37\) |
What is \((f-g)(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | ||||
\((f-g)(x)\) | \((f-g)(x) = f(x)-g(x)\) | \(= (5x+2) - (x^2 -1)\) | \(=5x + 2 - x^2 + 1\) | \(-x^2+5x+3\) | --- | --- | \((-\infty, \infty)\) |
\((f-g)(4) = f(4)-g(4)\) | \(= -(4)^2 + 5(4) + 3\) | \(=-16 + 20 + 3\) | \(= 7\) | \(f(4) - g(4)\) | \(22-15 = 7\) |
What is \((f \cdot g)(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | ||||
\((f \cdot g)(x)\) | \(= (5x+2) (x^2 -1)\) | \(=5x^3-5x+2x^2-2\) | \(=5x^3+2x^2-5x-2\) | --- | --- | \((-\infty, \infty)\) | |
\((f \cdot g)(4) = f(4) \cdot g(4)\) | \(= 5(4)^3 + 2(4)^2-5(4)-2\) | \(320 +32-20-2\) | \(=330\) | \((f \cdot g)(4)\) | \(22 \cdot 15 = 330\) |
What is \((\frac{f}{g})(x)\)?
Operation | Combine, then Evaluate | Evaluate, then Combine | Domain | |||
\((\frac{f}{g})(x)\) | \((\frac{f}{g})(x) = \frac{5x+2}{x^2-1}\) | --- | --- | --- | --- | \((\infty, -1) \cup (-1, 1) \cup (1, \infty)\) |
\((\frac{f}{g})(4)\) | \((\frac{f}{g})(4)= \frac{5(4)+2}{(4)^2-1}\) | \(\frac{20+2}{16-1}= \frac{22}{15}\) | \(\frac{f(4)}{g(4)}\) | \(\frac{f(4)}{g(4)} = \frac{22}{15}\) |
When we divide functions, the domain is restricted so that the denominator does not equal zero.
Functions can also be combined by a process called function composition (or, the composition of functions, both mean the exact same thing), which is when one function is composed with another by plugging one function into the other and solving.
For instance, say we have the functions:
\[y = f(u) = \sqrt{u} \text{ and } u=g(x)=x^2+1\]
Since y is a function of u and u is a function of x, it follows that y is ultimately a function of x. We can compute this by substitution:
\[y = f(u)= f(g(x)) = f(x^2 +1) = \sqrt{x^2 +1}\]
This process is called composition because the new function is composed of the two original functions, f and g.
In general, if we want to compose any two functions, f and g:
Note that the output of the first function (g(x) in this case) is used as the input to the next function (f(x) in this case).
The result of this composition is the new function \(h(x) = f(g(x))\) which is obtained by substituting g into f. This is called the composition (or composite) of f and g and is denoted by \((f \circ g)\) read as "fog" or "f circle g" or "f of g of x".
Function composition involves taking one function, say \(g(x)\), and plugging it into another function, say \(f(x)\), and either simplifying or solving for a value of x.
The composite function \((f \circ g)\) is defined as:
\((f \circ g)(x) = f(g(x))\)
An important note here: function composition is NOT multiplication!
The image below shows us how to picture \((f \circ g)\) in terms of machines.
The f º g machine is composed of the g machine first and then the f machine, StudySmarter Originals
Let's say we have two functions:
\(f(x) = 2 + 3x - x^2\) and \(g(x) = 2x -1\)
What is \((f \circ g)(x)\)?
Solution:
It is important to note that when combining functions, the order of combination matters. In other words, f(g(x)) does not necessarily equal g(f(x)). In fact, it is a special case when these two are equal!
In the example above, we had two functions and combined them using function composition. What if we reversed the order of the composition of these two functions? Let's take a look!
Let's take the same two functions in the previous example: \(f(x) = 2 + 3x - x^2\) and \(g(x) = 2x -1\)
Only this time, let's find \((g \circ f)(x)\).
Solution:
As we can see, this solution is not the same as the solution from the previous example. When composing functions, the order matters!
It is entirely possible to compose a function with itself!
This looks like: \((f \circ f)(x) = f(f(x))\)
So, if we have a function:
\[f(x) = 2x +3\]
and compose it with itself, we get:
\((f \circ f)(x) = f(f(x)) = f(2x + 3) = 2(2x+3)+3 = 4x + 6 +3 = 4x + 9\)
Don't forget! We need to consider two domains when composing functions. If we are trying to evaluate \((f \circ g)(x)\), we can see that g is evaluated at x, so xmust be in the domain of g. And since fis evaluated at g, g must be in the domain of f. In other words:
Let's consider the functions: \(f(x) = \sqrt{x}\) and \(g(x) = x^2\)
The domain of \(f(x) = \sqrt{x}\) is \([0, \text{ is } \infty)\).
The domain of \(g(x) = x^2\) is \((-\infty, \infty)\)
If we compose them as:
\((f \circ g)(x) = f(g(x))\)
we get:
\(f(g(x)) = f(x^2) = \sqrt{x^2} = x\)
But, if we compose them as:
\[(g \circ f)(x) = g(f(x))\]
we get:
\[g(f(x)) = g(\sqrt x) = (\sqrt{x})^2 = x\]
With all this talk about composing functions, it is worth mentioning that we can go the other way and decompose functions as well. This can be helpful if we are working on a more complicated function. Function decomposition is the term for breaking up a function into multiple, simpler functions.
Much like there's no wrong way to eat a Reese's, there is often more than one way to decompose a function!
Let's write the function:
\[f(x) = \sqrt{5 -x^2}\]
as the composition of two simpler functions.
Solution 1:
We are trying to break up, or decompose, f(x) into two simpler functions that we will call g(x) and h(x). So,
\[f(x) = g(h(x))\]
Solution 2:
Function composition is not the same as multiplying functions
Despite what the notation looks like, when we compose functions, we are not simply multiplying them together. When we compose functions, we are replacing the variable of the "outer" function with the "inner" function and evaluating.
Say we want to compose two functions:
\[f(x) = \sqrt x; \space g(x) = x-1\]
If we want to compose them as \((f \circ g)(x)\):
If we compare the composition, \((f \circ g)(x)\), to the multiplication, \((f \cdot g)(x)\), (this could also be written as (fg)(x) we see that the answers are not the same.
Unlike combining functions, function composition is not commutative.
\[(f \circ g)(x) ≠ (g \circ f) (x)\]
Now, it must be said that there are some special cases where \((f \circ g)(x)\) does equal \((g \circ f)(x)\). If this is the case, that means the two functions are inverse functions.
Function composition is, however, associative.
If we have three functions that can be composed with each other, the associative property applies.
Given f, g, and h: \((f \circ (g \circ h))(x) = f((g \circ h)(x)) = f(g(h(x))) = (f \circ g)(h(x)) = ((f \circ g) \circ h)(x)\)
So, \(f \circ(g \circ h) = (f \circ g) \circ h\)
When combining piecewise functions, we follow all the same rules as when combining any other functions, except:
Say we have two piecewise functions:
\(f(x) = \begin{cases} 2 & x > 2 \\ 2 & x < 2 \end{cases}\) and \(g(x) = \begin{cases} -2 & x \geq 2 \\ 2 & x<2 \end{cases}\)
And we want to calculate g(x) - f(x).
Solution:
For this piecewise function, we need to split it into cases.
Here are some more examples of combining functions!
If \(f(x) = x^2 - 2x - 3\) and \(g(x) = x + 1\), find the following:
Solutions:
Find \((f+g), (f-g), (fg),\text{ and } \left( \frac{f}{g} \right)\) for the functions:
\[f(x) = x^2 + 3g(x) = x-1\]
Solutions:
The graph of two piecewise functions, StudySmarter Originals
The graph of the function f is shown in blue, and the graph of the function g is shown in green. Use the graphs to solve each quantity.
Solutions:
If \(f(x) = x^2 + 10\) and \(g(x) = \sqrt{x-1}\), find the following:
Solutions:
If \(f(x) = \sqrt x\) and \(g (x) = \sqrt{2-x}\), find each composition and its domain.
Solutions:
We can also compose three or more functions! For instance, the composite function \(f \circ g \circ h\) can be found by first applying h, then g, and then f like so:
\[(f \circ g\circ h)(x) = f(g(h(x)))\]
So, find \((f \circ g \circ h)(x)\) if:
\[f(x) = \frac{x}{x+1} \qquad g(x) = x^{10} \qquad h(x) = x +3 \]
Solution:
\[(f \circ g \circ h)(x) = f(g(h(x))) = f(g(x+3)) = f \left( (x+3)^{10}\right) = \frac{(x+3)^{10}}{(x+3)^{10}+1}\]
Given the function:
\[F(x) = \cos^2(x+9)\]
Find functions f, g, and h such that \(F = f \circ g \circ h\).
Solution:
Graphing combinations of functions can be done simply in two steps:
Combine the relevant functions into a single function.
Graph the newly created function.
What is really interesting, however, is seeing how combining two functions will alter the original graphs of those functions. For instance, if we combined the functions \(f(x) = 3x + 4\) and \(g(x) = x\), how do you think the graph of our combined function would compare to the graph of f(x)? Let's work through it and find out.
First, let's simply combine the functions f(x) and g(x) into a single function h(x) by addition.
\[h(x) = (f+g)(x) = f(x) + g(x)\]
And next as always we substitute in our functions f(x) and g(x).
\[h(x) = 3x + 4+ x\]
And as before, we simply gather like terms to find our final combined function.
\[h(x) = 4x +4\]
Plotting the two original functions on a graph with the new combined function gives us the plot below. What can we notice about how h(x) relates to f(x) and g(x)? Well, as we can see, h(x) has a greater gradient than either f(x) or g(x). In fact, the gradient of h(x) is equal to the gradients of f(x) and g(x) combined!
When we consider what we are really doing in combining functions, this makes perfect sense. The output of a combined function (the number on the vertical axis) for a given input (the number on the horizontal axis) is simply a combination of the outputs of each original function.
To test this, pick a value on the x-axis, and find the y-axis value for each of the functions. Does the y-axis value for h(x) equal the y-axis values for f(x) and g(x) added together?
\((f+g)(x)= f(x) +g(x)\)g(g(x)) = g(\sqrt{2-x}) = \sqrt{2 - \sqrt{2-x}}\)
There are two main ways to combine functions:
Arithmetic combination is when you combine functions using arithmetic means:
Function composition is when you plug one function into another function and evaluate.
These can be combined in the same manner as any other two functions:
However, exponential and logarithmic functions are inverses of each other, meaning they can "undo" each other if they share the same base.
If you plug an exponential function into a logarithmic function of the same base, you get the same answer if you reversed the order.
Piecewise functions follow the same rules as when combining any other type of function, except:
Combination of functions is the creation of new functions by combining existing functions. This can be done by basic arithmetic:
Functions can also be combined by a process called function composition, which is when one function is composed with another.
So, if we have two functions, f and g, and we want to compose them, we do so by plugging one function into the other and solving.
Let's say we want to compose f and g by plugging g into f.
Let's say you buy something at a hardware store, but what you buy is too big to fit in your car. For a fee, you can have the hardware store deliver your purchase for you. You pay for your purchase, plus the sales taxes, plus the fee. Taxes are 7.5%, the fee is $20.
Write a function t(x) for the total, after taxes, on the purchase amount x.
Write another function f(x) for the total, including the delivery fee, on the purchase amount x.
Calculate and interpret (f ∘ t)(x) and (t ∘ f)(x). Which results in a lower cost to you?
This sort of calculation actually comes up in real life, and is used for programming the cash registers.
Be perfectly prepared on time with an individual plan.
Test your knowledge with gamified quizzes.
Create and find flashcards in record time.
Create beautiful notes faster than ever before.
Have all your study materials in one place.
Upload unlimited documents and save them online.
Identify your study strength and weaknesses.
Set individual study goals and earn points reaching them.
Stop procrastinating with our study reminders.
Earn points, unlock badges and level up while studying.
Create flashcards in notes completely automatically.
Create the most beautiful study materials using our templates.
Sign up to highlight and take notes. It’s 100% free.
Over 10 million students from across the world are already learning smarter.
Get Started for Free