🎯 In this section you will learn

πŸ“Œ 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$.
Example 1Adding Functions

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)$.
Example 2Multiplying and Dividing Functions

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.
Example 3Composition of Functions

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.
Example 4Composition with Domain Restrictions

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).

Example 5Decomposing a Function

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)$ βœ“
Example 6Another Decomposition

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

OperationNotationMeaningOrder
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

Problem 1Arithmetic Combination

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}$

Problem 2Composition

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$

Problem 3Domain of Composition

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)$.

Problem 4Decompose

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}$.

Problem 5Decompose

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