Pre-Calculus: Composition of Functions
AI-Generated Content
Pre-Calculus: Composition of Functions
Think of functions as machines that process inputs. Composition of functions is the process of connecting two such machines so the output of the first immediately becomes the input of the second, creating an entirely new, more complex function. Mastering this concept is not just an algebraic exercise; it is fundamental to modeling multi-step processes in engineering, computer science, and physics, where systems are often built from simpler, interconnected parts.
Understanding the Notation and Process
The core idea is sequential application. Given two functions, $f(x)$ and $g(x)$, we can create a new function called the composition of $f$ and $g$. The notation $(f \circ g)(x)$ is read as "$f$ of $g$ of $x$" and is defined as $f(g(x))$. The order is critical: you always start with the input $x$, apply the inner function $g$ first, and then apply the outer function $f$ to that result.
An everyday analogy is an assembly line. Imagine $g$ is a machine that paints a part, and $f$ is a machine that polishes the painted part. The composition $(f \circ g)$ represents the entire process: a raw part ($x$) goes into the painter ($g$), producing a painted part ($g(x)$). This painted part is then fed into the polisher ($f$), resulting in a finished, polished part ($f(g(x))$). The process $(g \circ f)$ would be nonsensical—you can't polish a part before it's painted.
Evaluating Compositions Numerically and Algebraically
You can work with compositions in two primary ways: by plugging in specific numbers or by finding a general formula.
Numerical Evaluation: This is straightforward if you know, or can calculate, the output of the inner function. Given $f(x) = x^2 + 1$ and $g(x) = 2x - 3$, to find $(f \circ g)(4)$:
- Evaluate the inner function
$g$at$x=4$:$g(4) = 2(4) - 3 = 5$. - Evaluate the outer function
$f$at this result:$f(5) = 5^2 + 1 = 26$.
Thus, $(f \circ g)(4) = 26$.
Finding a General Formula (Symbolic Evaluation): To find the algebraic rule for $(f \circ g)(x)$, you substitute the entire rule for $g(x)$ into the input of $f(x)$. Using the same functions:
$$(f \circ g)(x) = f(g(x)) = f(2x - 3) = (2x - 3)^2 + 1$$
You then simplify: $(2x - 3)^2 + 1 = 4x^2 - 12x + 9 + 1 = 4x^2 - 12x + 10$.
Notice that $(g \circ f)(x)$ yields a completely different formula: $g(f(x)) = g(x^2 + 1) = 2(x^2 + 1) - 3 = 2x^2 - 1$. This confirms composition is not commutative; order matters profoundly.
Determining the Domain of a Composite Function
The domain of a composite function $(f \circ g)(x)$ is not simply the domain of the final formula. You must consider restrictions from both stages of the composition. The domain consists of all $x$ such that:
$x$is in the domain of the inner function$g$.- The output
$g(x)$is in the domain of the outer function$f$.
Let's determine the domain of $(f \circ g)(x)$ where $g(x) = \sqrt{x}$ and $f(x) = 1/(x-4)$.
- Step 1: The domain of
$g$is$x \ge 0$. - Step 2: The domain of
$f$is all$x$except$4$(since division by zero is undefined). Therefore, for the composition, we require$g(x) \neq 4$. - Step 3: Set
$g(x) = 4$:$\sqrt{x} = 4 \Rightarrow x = 16$. - Step 4: Combine conditions.
$x$must be$\ge 0$(from Step 1) AND$x$cannot be$16$(from Step 3).
Thus, the domain of $(f \circ g)(x)$ is $[0, 16) \cup (16, \infty)$. The value $x=16$ is excluded because it would make $g(16)=4$, and $f(4)$ is undefined.
Decomposing a Composite Function
Decomposition is the reverse process: taking a complex function $h(x)$ and identifying two (or more) simpler functions $f$ and $g$ such that $h(x) = f(g(x))$. This skill is crucial for calculus, particularly the Chain Rule. Look for an "inner" operation and an "outer" operation.
To decompose $h(x) = \sin(5x^2)$:
- Identify the innermost operation performed on
$x$. Here, it's the multiplication by 5 and squaring:$5x^2$. - Let the inner function be
$g(x) = 5x^2$. - The outer function
$f$then takes the sine of its input. So,$f(x) = \sin(x)$.
Check: $f(g(x)) = f(5x^2) = \sin(5x^2) = h(x)$. Common choices for the inner function include expressions inside parentheses, under radicals, or in denominators.
Common Pitfalls
- Reversing the Order: The most frequent error is applying functions in the wrong sequence. Remember,
$(f \circ g)(x)$means$g$acts first. A good habit is to verbally say "$f$of$g$of$x$" as you write$f(g(x))$.
- Correction: Always start with the function closest to the input variable
$x$.
- Incorrect Domain Analysis: Assuming the domain is just the domain of the final simplified algebraic expression. For
$(f \circ g)(x)$, you must ensure the output of$g$is valid for$f$.
- Correction: Use the two-step process: 1) Find valid inputs for
$g$, 2) From those, exclude any$x$that make$g(x)$an invalid input for$f$.
- Algebra Mistakes in Simplification: When finding
$(f \circ g)(x)$, errors often occur in squaring binomials, distributing negatives, or simplifying fractions.
- Correction: Proceed step-by-step. For
$f(g(x))$, first write the rule for$f$with a placeholder:$f(\square) = (\square)^2 + ...$. Then replace$\square$with$g(x)$in its entirety, inside parentheses, before simplifying.
- Overlooking Function Properties in Decomposition: Trying to decompose a function that isn't truly a composition or missing a valid decomposition.
- Correction: There is often more than one correct answer. A valid decomposition must rebuild the original function exactly. For
$h(x) = (x+1)^2$, both$g(x)=x+1, f(x)=x^2$and$g(x)=x, f(x)=(x+1)^2$are technically correct, but the first is more useful for calculus.
Summary
- Composition
$(f \circ g)(x) = f(g(x))$creates a new function by applying$g$to$x$, then applying$f$to the result. The order of application is non-negotiable and non-commutative. - Evaluation can be done numerically (work from the inside out with a specific number) or algebraically (substitute the rule of
$g$into$f$and simplify). - The domain of
$(f \circ g)$must be found through a two-part test:$x$must be in the domain of$g$, and$g(x)$must be in the domain of$f$. - Decomposition is the skill of breaking a complex function
$h(x)$into simpler functions$f$and$g$such that$h(x) = f(g(x))$. Look for an obvious "inner" function. - Mastery of composition is essential for future topics like function transformations, inverses, and, most importantly, the Chain Rule in calculus.