π― In this section you will learn
- How to add, subtract, multiply, and divide functions
- The domain of combined functions
- Function composition: $(f \circ g)(x) = f(g(x))$
- The difference between composition and arithmetic combinations
π Arithmetic Combinations of Functions
Given two functions $f$ and $g$, we can create new functions using basic arithmetic operations:
$$ (f + g)(x) = f(x) + g(x) $$
$$ (f - g)(x) = f(x) - g(x) $$
$$ (f \cdot g)(x) = f(x) \cdot g(x) $$
$$ \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)} \quad (g(x) \neq 0) $$
π‘ Domain of Combined Functions
The domain of $f \pm g$, $f \cdot g$ is the intersection of the domains of $f$ and $g$. For $f/g$, we also exclude points where $g(x) = 0$.
If $f(x) = x^2 + 1$ and $g(x) = 3x - 2$, find $(f + g)(x)$ and its domain.
β
Add the formulas
$(f + g)(x) = (x^2 + 1) + (3x - 2) = x^2 + 3x - 1$
β‘
Domain
Both $f$ and $g$ have domain $(-\infty, \infty)$, so domain is $(-\infty, \infty)$.
If $f(x) = \sqrt{x}$ and $g(x) = x - 4$, find $(f \cdot g)(x)$ and $\left(\frac{f}{g}\right)(x)$ with their domains.
β
Multiplication
$(f \cdot g)(x) = \sqrt{x} \cdot (x - 4) = (x - 4)\sqrt{x}$
β‘
Domain of multiplication
Domain of $f$: $[0, \infty)$. Domain of $g$: $(-\infty, \infty)$. Intersection: $[0, \infty)$.
β’
Division
$\left(\frac{f}{g}\right)(x) = \frac{\sqrt{x}}{x - 4}$
β£
Domain of division
Need $x \ge 0$ (from $f$) AND $x \neq 4$ (denominator β 0). Domain: $[0, 4) \cup (4, \infty)$.
π Function Composition
Composition is applying one function to the result of another function. The composition of $f$ with $g$ is denoted $f \circ g$ (read "f composed with g" or "f of g of x").
$$ (f \circ g)(x) = f(g(x)) $$
First apply $g$ to $x$, then apply $f$ to the result
π Order Matters!
In general, $f \circ g \neq g \circ f$. Composition is not commutative.
If $f(x) = x^2$ and $g(x) = 2x + 1$, find $(f \circ g)(x)$ and $(g \circ f)(x)$.
β
$(f \circ g)(x)$
$f(g(x)) = f(2x + 1) = (2x + 1)^2 = 4x^2 + 4x + 1$
β‘
$(g \circ f)(x)$
$g(f(x)) = g(x^2) = 2(x^2) + 1 = 2x^2 + 1$
β’
Comparison
$(f \circ g)(x) = 4x^2 + 4x + 1$, $(g \circ f)(x) = 2x^2 + 1$. They are not equal.
If $f(x) = \sqrt{x}$ and $g(x) = x - 2$, find $(f \circ g)(x)$ and its domain.
β
Compute composition
$(f \circ g)(x) = f(g(x)) = f(x - 2) = \sqrt{x - 2}$
β‘
Domain of $g$
$g(x) = x - 2$ has domain $(-\infty, \infty)$
β’
Domain of $f$
$f$ requires input $\ge 0$, so $g(x) \ge 0 \Rightarrow x - 2 \ge 0 \Rightarrow x \ge 2$
β£
Final domain
Domain of $(f \circ g)$ is $[2, \infty)$
π Decomposing Functions
Sometimes we need to express a function as a composition of two simpler functions. This is useful in calculus (especially the chain rule).
Express $h(x) = (3x + 2)^5$ as a composition $f \circ g$.
β
Identify inner function
Let $g(x) = 3x + 2$ (what is inside the parentheses)
β‘
Identify outer function
Let $f(u) = u^5$ (the power function applied to the result)
β’
Check
$(f \circ g)(x) = f(g(x)) = (3x + 2)^5 = h(x)$ β
Express $h(x) = \sqrt{x^2 + 1}$ as a composition $f \circ g$.
β
Inner function
$g(x) = x^2 + 1$
β‘
Outer function
$f(u) = \sqrt{u}$
β’
Check
$(f \circ g)(x) = \sqrt{x^2 + 1} = h(x)$ β
π Summary Table: Arithmetic vs Composition
| Operation | Notation | Meaning | Order |
| Addition | $(f + g)(x)$ | $f(x) + g(x)$ | Same time |
| Subtraction | $(f - g)(x)$ | $f(x) - g(x)$ | Same time |
| Multiplication | $(f \cdot g)(x)$ | $f(x) \cdot g(x)$ | Same time |
| Division | $\left(\frac{f}{g}\right)(x)$ | $\frac{f(x)}{g(x)}$ | Same time |
| Composition | $(f \circ g)(x)$ | $f(g(x))$ | Sequential: $g$ then $f$ |
π Key Takeaway
Composition is like a "function machine" where the output of one function becomes the input of another. In calculus, the chain rule is used to differentiate compositions. Practice identifying inner and outer functions.
π Practice Problems
If $f(x) = 2x$ and $g(x) = x - 5$, find $(f + g)(x)$, $(f - g)(x)$, $(f \cdot g)(x)$, and $\left(\frac{f}{g}\right)(x)$.
Show solution
$(f+g)(x) = 2x + (x-5) = 3x - 5$
$(f-g)(x) = 2x - (x-5) = x + 5$
$(f \cdot g)(x) = 2x(x-5) = 2x^2 - 10x$
$\left(\frac{f}{g}\right)(x) = \frac{2x}{x-5}$
If $f(x) = 3x - 1$ and $g(x) = x^2 + 2$, find $(f \circ g)(x)$ and $(g \circ f)(x)$.
Show solution
$(f \circ g)(x) = f(x^2 + 2) = 3(x^2 + 2) - 1 = 3x^2 + 6 - 1 = 3x^2 + 5$
$(g \circ f)(x) = g(3x - 1) = (3x - 1)^2 + 2 = 9x^2 - 6x + 1 + 2 = 9x^2 - 6x + 3$
If $f(x) = \frac{1}{x}$ and $g(x) = x - 2$, find $(f \circ g)(x)$ and its domain.
Show solution
$(f \circ g)(x) = f(x - 2) = \frac{1}{x - 2}$
Domain: $x \neq 2$ (since denominator cannot be zero) β $(-\infty, 2) \cup (2, \infty)$.
Express $h(x) = \frac{1}{(2x - 3)^4}$ as a composition $f \circ g$.
Show solution
Let $g(x) = 2x - 3$ (inner function). Let $f(u) = u^{-4} = \frac{1}{u^4}$ (outer function). Then $(f \circ g)(x) = \frac{1}{(2x - 3)^4}$.
Express $h(x) = \sin(x^3 + 1)$ as a composition $f \circ g$.
Show solution
Let $g(x) = x^3 + 1$, $f(u) = \sin u$. Then $(f \circ g)(x) = \sin(x^3 + 1)$.
β Back to Module Page