Quarry School

Decompose by naming the inside and outside jobs

Explain it like I am five

Imagine receiving a finished sandwich and describing its preparation in two jobs: assemble it, then wrap it. You can split a long calculation the same way. For h(1) = 5−12, you square 1, subtract that from 5 to get 4, then take the root to get 2. The last job, taking the root, becomes the outer function f. Everything before it becomes the inner function g. Naming these jobs is decomposition. The two named rules are component functions. This helps you calculate in two passes and see where a root or division limits the allowed starts. More than one split may rebuild the same function.

xg: inside jobg(x)f: outside jobh(x)firstsecond
The two jobs together rebuild the original rule.
Reminder
  • Composition. f(g(x)) means calculate g first, then apply f to its whole output.
  • Substitution. Putting the whole input 5x − 4 into x3 gives (5x − 4)3.
  • Squares and bounds. x2 ≤ 5 means −5 ≤ x ≤ 5, because both signs can have that distance from zero.
  • Reciprocal. The reciprocal of 5 is 15; the reciprocal of 0 is undefined.
  • Absolute value. |−2| = 2, because distance from zero is nonnegative.
  • Domain. A decomposition must preserve accepted inputs; 5−x2 accepts [−5, 5].
  • Input-slot names. f(u) = u and f(x) = x describe the same rule. u helps separate the outer slot from the x inside g.
Why it works. Composition substitutes the inside rule into the outside input slot. Decomposition reverses that substitution by choosing an expression to treat as one complete input. The outside rule describes the remaining work. Different choices can work, so there need not be one unique split. Naming the stages makes a long calculation easier to follow and exposes which stage causes a restriction. Recomposition proves that your rules rebuild the original formula. Comparing domains checks that no newly introduced division has removed a start the original function accepted. These jobs also prepare you for calculus, which studies how an output changes when its input changes.
RuleTo write h(x) = f(g(x)), choose g as the inside job and f as the job applied to its output.
Check by substitution and preserve h's original domain.
The same idea, five ways
Say it

Split h into an inside job g and an outside job f.

Write it

Doing g first and then f must give back the original function h, with its original allowed starts.

In math
  • h(x) = f(g(x))
  • h = f ∘ g
  • g makes the inside; f performs the remaining outside work
Like

Assemble the sandwich, then wrap it.

See it
xg: inside jobg(x)f: outside jobh(x)firstsecond
The two jobs together rebuild the original rule.
The same idea, other ways
As preparing and wrapping

One job prepares the completed input. The next finishes it. For (5x − 4)3 at input 2, first build 10 − 4 = 6, then cube 6 to get 216. The finishing operation is the outer function.

25x − 46cube216firstsecond
The cube is the last job, so it belongs in the outer function.
As undoing substitution

Cover the expression 5 − x2 inside the root with the word input. The outside rule becomes input. The covered expression is g, and the remaining rule is f.

Start: 5−x2
Inside package: 5 − x2
Outside rule: input
Covering the inside package reveals the outer rule.
As the last calculator step

For 5−12, your calculator first builds 4 and then takes its root. The last calculator step is f. The steps making 4 are g. This gives g(x) = 5 − x2 and f(u) = u.

15 − x²4root2firstsecond
Watch your numerical steps to choose the two jobs.
.1Square-root outside

If the last job is taking a square root, let the inner function build its radicand. The outer function can be the basic root rule x.

  • For h(x) = x+9, one choice is g(x) = x + 9 and f(x) = x.
  • The original radicand condition remains part of the function.
xadd 9x + 9root√(x + 9)firstsecond
The root operates on a completed radicand.
Worked exampleSplit a shifted root

Decompose h(x) = x+9. You want an inside expression and the root operation applied to it. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

0add 99root3firstsecond
A number check confirms the chosen order.
  1. Choose g(x) = x + 9 and f(x) = x.Addition builds the radicand before the root is taken.
  2. f(g(x)) = x+9, with x ≥ −9.Recomposition restores the original root and its nonnegative-radicand requirement.
Answer
  • g(x) = x + 9
  • f(x) = x.
  • Domain: [−9, ∞).
Check At 0, the inner output is 9 and the outer output is 3, matching h(0) = 9 = 3.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: For x+9, choose g(x) = x and f(u) = u + 9.
At start 16 this gives 4 + 9 = 13, whereas 16+9 = 5.
✓ Instead: Choose g(x) = x + 9 and f(u) = u.
Tips and tricks
  • Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
.2Cube outside

A cube is the product of three copies of the complete input. The inner function makes the expression that will be cubed; the outer function does the cubing.

  • x3 means x × x × x.
  • For h(x) = (3x + 2)3, take g(x) = 3x + 2 and f(x) = x3.
x3x + 23x + 2cube(3x + 2)³firstsecond
The cube acts on the entire inner output.
Worked exampleSplit a cube without expanding it

Decompose h(x) = (3x + 2)3. You want two functions that produce this cube in sequence. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

13x + 25cube125firstsecond
Cubing is the finishing job.
  1. Choose g(x) = 3x + 2 and f(x) = x3.The parentheses show which whole expression is cubed.
  2. f(g(x)) = (3x + 2)3.Substitution places the inner expression into the cube's input slot.
Answer
  • g(x) = 3x + 2
  • f(x) = x3.
  • Domain: (−∞, ∞).
Check At 1, g(1) = 5 and f(5) = 5 × 5 × 5 = 125; h(1) gives the same cube.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: For (3x + 2)3, choose g(x) = x3 and f(u) = 3u + 2.
This gives 3x3 + 2. At start 1 it is 5, whereas the original is 125.
✓ Instead: Build 3x + 2 first, then cube the result.
Tips and tricks
  • Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
.3Reciprocal outside

A reciprocal is 1 divided by the input. Build the denominator first, then take its reciprocal. Check which starting input would build a zero denominator.

  • For h(x) = 1x−6, take g(x) = x − 6 and f(x) = 1x.
x ≠ 6subtract 6x − 6reciprocal1/(x − 6)firstsecond
The denominator is the package sent into the reciprocal rule.
Worked exampleSplit a shifted reciprocal

Decompose h(x) = 1x−6. You want to identify the denominator-building job and the division job. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

8subtract 62reciprocal1/2firstsecond
The original formula and its two jobs give the same output.
  1. Choose g(x) = x − 6 and f(x) = 1x.Subtraction builds the denominator before the reciprocal is taken.
  2. f(g(x)) = 1x−6, with x ≠ 6.The outer reciprocal must not receive zero.
  3. Set x − 6 = 0 to find the failed reciprocal input. Add 6: x = 6. Plug back in: 6 − 6 = 0. Exclude 6.This solve step identifies the start whose inside job makes the outside bottom zero.
Answer
  • g(x) = x − 6
  • f(x) = 1x.
  • Domain: (−∞, 6) ∪ (6, ∞).
Check At 8 the path is 8 to 2 to 12, matching the original denominator 8 − 6 = 2.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: For 1x−6, choose g(x) = 1x and f(u) = u − 6.
At start 8 this gives 18 − 6 = −478, whereas the original is 12.
✓ Instead: Choose g(x) = x − 6 and f(u) = 1u.
Tips and tricks
  • Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
.4Absolute-value outside

Absolute value gives the distance of a number from zero. Make the signed inside expression first, then find its distance. Negative intermediate numbers are allowed; their distances are nonnegative.

  • For h(x) = |3x + 1|, take g(x) = 3x + 1 and f(x) = |x|.
  • |−2| = 2 because −2 is two units from zero.
−13x + 1−2absolute value2firstsecond
Absolute value is applied after the signed expression is finished.
Worked exampleSplit an absolute value

Decompose h(x) = |3x + 1|. You want a linear inside job followed by an absolute-value outside job. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

−1g−2absolute value2firstsecond
A negative inside output has a valid nonnegative distance.
  1. Choose g(x) = 3x + 1 and f(x) = |x|.The expression between the bars is the input to the distance rule.
  2. f(g(x)) = |3x + 1|.The whole inner output replaces f's input.
Answer
  • g(x) = 3x + 1
  • f(x) = |x|.
  • Domain: (−∞, ∞).
Check At −1, g(−1) = −2 and f(−2) = 2; the original function gives |3(−1) + 1| = |−2| = 2.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: For |3x + 1|, choose g(x) = |x| and f(u) = 3u + 1.
At start −1 this gives 4, whereas |−3 + 1| = 2.
✓ Instead: Build 3x + 1 first, then take its distance from zero.
Tips and tricks
  • Test a permitted small input after symbolically recomposing f(g(x)). At a start the original excludes, test a different number.
Strategy: step by step
  1. 1. Work out h at a permitted small input. The final job you perform suggests the outer function; everything before it suggests the inner function.
  2. 2. Define g(x) as that package, which will be calculated first.
  3. 3. Define f(x) as the operation applied to one input package.
  4. 4. Substitute g(x) into f and show that f(g(x)) recreates h(x).
  5. 5. Check the composite domain against the original domain. A formula match alone can hide a lost input.
  6. 6. If another split is requested, choose a different package and repeat the same checks.
Strategy
Find a useful inside and outside split
1
Is the final operation a root?
YesLet g build everything under the root and let f(u) take that root.
NoLook for a power or fraction.
↓
2
Is the final operation a power of a whole group?
YesLet g build the group and let f(u) raise it to that power.
NoLook for a reciprocal or absolute value.
↓
3
Is there a constant top divided by an expression?
YesLet g build the entire bottom and let f(u) divide that constant by u. This choice assumes the top is constant.
NoA changing top may need a different split; check the whole formula.
↓
4
Are absolute-value bars the final operation?
YesLet g build the expression between the bars and let f(u) = |u|.
NoTry a different dividing point between operations.
↓
5
Does f(g(x)) reproduce both the formula and its original domain?
YesThe split represents the original function. Check one permitted number too.
NoChange the split or explicitly state the smaller domain on which it works.
  1. Work out the given function at a permitted small input. Notice the final operation you perform.
  2. Choose g(x) to do the work before that final operation. Choose f(u) to perform the remaining job on one completed input u.
  3. Substitute g(x) into every u in f(u). The resulting expression must be exactly h(x).
  4. Compare the original domain with the two-stage domain. Test a permitted number as an arithmetic check.
  5. If you need a second split, move the dividing point between operations and repeat the same checks.
Worked exampleThree decompositions

Write each as f(g(x)): (a) h(x) = 5−x2; (b) h(x) = (5x − 4)3; (c) h(x) = 1x+8. You want an inside calculation followed by the finishing operation. Plan: name everything before the last operation as g, name the last operation as f, then recompose and compare domains.

15 − x²4root2firstsecond
Part (a) builds the radicand before taking its root.
15x − 41cube1firstsecond
Part (b) builds the whole expression before cubing it.
1x + 89reciprocal1/9firstsecond
Part (c) builds a nonzero bottom before taking its reciprocal.
  1. (a) Choose g(x) = 5 − x2 and f(u) = u. Recompose: f(g(x)) = 5−x2.The inside builds the radicand; the outside takes its root. u is another name for f’s input slot.
  2. Require 5 − x2 ≥ 0. Rearrange to x2 ≤ 5, so −5 ≤ x ≤ 5.This finds the starts whose radicand is nonnegative. Their distance from zero is at most 5 ≈ 2.24.
  3. Test x = 2 and x = −2: both give radicand 5 − 4 = 1. Start 3 gives 5 − 9 = −4 and fails.These tests show why both a lower and an upper boundary are needed.
  4. (b) Choose g(x) = 5x − 4 and f(u) = u3. Recompose: f(g(x)) = (5x − 4)3.Build the whole parenthesized expression first, then cube it. Neither stage restricts real starts.
  5. (c) Choose g(x) = x + 8 and f(u) = 1u. Recompose: f(g(x)) = 1x+8.Addition builds the bottom before taking the reciprocal.
  6. Locate the failed bottom by solving x + 8 = 0: subtract 8, giving x = −8. Plug back in: −8 + 8 = 0. Exclude −8.This equation finds the one start whose inside answer cannot enter the reciprocal.
Answer
  • (a) g(x) = 5 − x2
  • f(u) = u.
  • Domain: [−5, 5].
  • (b) g(x) = 5x − 4
  • f(u) = u3.
  • Domain: (−∞, ∞).
  • (c) g(x) = x + 8
  • f(u) = 1u.
  • Domain: (−∞, −8) ∪ (−8, ∞).
Check At start 1, (a) gives inside 4 then root 2; (b) gives inside 1 then cube 1; (c) gives inside 9 then reciprocal 19. Direct substitution into each original function gives the same answer. The symbolic recompositions verify every allowed start, and the domains match the original root and bottom requirements.
Ladder: from easy to exam-hard. Press Try it first on any rung to hide its steps and use them as hints.
Rung 1Rung 1: a shifted square

Decompose h(x) = (x + 3)2. You want addition followed by squaring. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

1add 34square16firstsecond
The addition comes before the square.
  1. Take g(x) = x + 3 and f(x) = x2.The whole sum is squared.
  2. f(g(x)) = (x + 3)2.Replacing the outer input restores the formula.
Answer
  • g(x) = x + 3
  • f(x) = x2, with all real inputs.
Check At 1 the two stages give 4 then 16, matching (1 + 3)2.
Rung 2Rung 2: a denominator package

Decompose h(x) = 1x+7. You want to build the denominator before division. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

1add 78reciprocal1/8firstsecond
The inner output becomes the denominator.
  1. Take g(x) = x + 7 and f(x) = 1x.The reciprocal acts on the entire denominator.
  2. f(g(x)) = 1x+7, with x ≠ −7.The outer function must not receive zero.
  3. To locate the zero bottom, solve x + 7 = 0: x = −7. Plug back in: −7 + 7 = 0.This identifies and confirms the one start the reciprocal must exclude.
Answer
  • g(x) = x + 7
  • f(x) = 1x.
  • Exclude x = −7.
Check At 1 the inner output is 8 and the final output is 18, matching h(1).
Rung 3Rung 3: a linear package under a cube

Decompose h(x) = (4x − 3)3. You want a linear inside function and a cube outside function. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

04x − 3−3cube−27firstsecond
A negative package remains negative when cubed.
  1. Take g(x) = 4x − 3 and f(x) = x3.The parentheses mark the expression cubed as one unit.
  2. f(g(x)) = (4x − 3)3.The cube receives the complete inner output.
Answer
  • g(x) = 4x − 3
  • f(x) = x3, with all real inputs.
Check At 0 the inner output is −3 and its cube is −27, matching h(0).
Rung 4Rung 4: a quadratic package under a root

Decompose h(x) = 10−x2 and give its domain. The expression 10 − x2 is quadratic: its highest input power is x2. You want the radicand-building job, the root job, and the permitted starts. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

allowed x10 − x²10 − x² ≥ 0root√(10 − x²)firstsecond
The quadratic package must remain nonnegative.
  1. Take g(x) = 10 − x2 and f(x) = x.The quadratic expression is the package inside the root.
  2. f(g(x)) = 10−x2.The entire radicand fills the outer input slot.
  3. Require 10 − x2 ≥ 0, so x2 ≤ 10 and −10 ≤ x ≤ 10.The distance of x from zero must be no more than 10.
  4. Starts 3 and −3 give inside 10 − 9 = 1 and work. Starts 4 and −4 give 10 − 16 = −6 and fail. Since 10 ≈ 3.16, both boundaries lie between those pairs.This makes the two-sided distance bound concrete.
Answer
  • g(x) = 10 − x2
  • f(x) = x.
  • Domain: [−10, 10].
Check At x = 1 the stages give 9 then 3, matching the original 10−1 = 9 = 3. At both endpoints x2 = 10 and the root is zero, so both are included.
Rung 5Rung 5: a different valid split

Find another decomposition of h(x) = 10−x2. This time make squaring the whole first job. Plan: identify the last operation, name the earlier work as g, then recompose and check the allowed starts.

xsquarex²√(10 − u)√(10 − x²)firstsecond
A different intermediate package can produce the same original formula and domain.
  1. Take g(x) = x2 and f(x) = 10−x.After squaring, the remaining operations are subtracting from 10 and taking a root.
  2. f(g(x)) = 10−x2.Replacing the input of f with x2 restores the original function.
  3. The inner square accepts all x, and the outer function requires x2 ≤ 10.The outer radicand is 10 minus the intermediate square.
Answer
  • g(x) = x2
  • f(x) = 10−x.
  • Domain: [−10, 10], the same as the original.
Check At x = 1 the stages are 1 then 3. The previous split had intermediate 9 then 3; different middle answers can give the same final function.
Rung 6Rung 6: a root inside a fraction bottom, two splits

Decompose h(x) = 36−x+1 in two ways and give its domain. You want different pairs of jobs that both rebuild the root in the bottom. Plan: first split after the root; then split after the whole bottom; verify both formulas and find where the root or division fails.

−135[−1, 35) ∪ (35, ∞)
Both splits include −1 and exclude 35, preserving the original root and division requirements.
8√(x + 1)33/(6 − u)1firstsecond
First split: the root answer is the handoff.
86 − √(x + 1)33/u1firstsecond
Second split: the completed bottom is the handoff.
  1. First split: g₁(x) = x+1 and f₁(u) = 36−u. Read g₁ as g sub 1, the name of the first choice.The inside job takes the root; the outside subtracts its answer from 6 and divides 3 by that result.
  2. f₁(g₁(x)) = 36−x+1.Substitution rebuilds the entire original bottom, including its root.
  3. Second split: g₂(x) = 6 − x+1 and f₂(u) = 3u. Here sub 2 labels the second choice.The inside builds the whole bottom and the outside divides 3 by it.
  4. f₂(g₂(x)) = 36−x+1.The second pair rebuilds the same original expression.
  5. The root requires x + 1 ≥ 0, hence x ≥ −1. Locate a zero bottom: 6 − x+1 = 0 gives x+1 = 6.This finds starts where the root exists, then starts where division fails.
  6. Both sides are nonnegative, so square: x + 1 = 36. Subtract 1: x = 35. Plug back in: 36 = 6 and the bottom is 6 − 6 = 0. Exclude 35.Squaring locates the candidate, and substitution confirms the original failure.
  7. At −1 the bottom is 6 − 0 = 6, so the root boundary is included. Both splits have the same restrictions.The root exists at zero and the resulting fraction bottom is nonzero.
Answer
  • First: g₁(x) = x+1
  • f₁(u) = 36−u.
  • Second: g₂(x) = 6 − x+1
  • f₂(u) = 3u.
  • Domain: [−1, 35) ∪ (35, ∞).
Check At start 8, the first split gives root 3 then 36−3 = 1. The second gives bottom 3 then 33 = 1. The original formula also gives 1, although the inside jobs differ.
Rung 7Rung 7: the top also depends on the starting input

Decompose h(x) = 3x+7x−6 using g(x) = x − 6. You want an outside rule written only in its own input u. Plan: call the inside output u, express x in terms of u, rewrite both top and bottom in u, then recompose.

7g: x − 61(3u + 25)/u28firstsecond
A changing top must be rewritten using the same outer input u as the bottom.
  1. Write u = x − 6. Add 6 to both sides: x = u + 6.This solve step recovers the original start from the chosen inside answer, so the outside rule can use u alone.
  2. The top 3x + 7 becomes 3(u + 6) + 7 = 3u + 18 + 7 = 3u + 25. The bottom x − 6 becomes u.Both parts of the original fraction must be expressed through the same completed inside output.
  3. Choose f(u) = 3u+25u. Then f(g(x)) = 3(x−6)+25x−6 = 3x−18+25x−6 = 3x+7x−6.The recomposition proves the outside rule rebuilds the whole original fraction.
  4. The original and recomposed bottoms both fail when x − 6 = 0. Add 6 to find x = 6. Plug back in: 6 − 6 = 0. Exclude 6.This locates and confirms the failed division, and shows the split preserves the original domain.
Answer
  • g(x) = x − 6.
  • f(u) = 3u+25u.
  • Domain: (−∞, 6) ∪ (6, ∞).
Check At start 7, the inside answer is u = 1. The outside gives 3+251 = 28. The original gives 21+77−6 = 28. The reconstruction x = u + 6 gives 1 + 6 = 7 as well.
Counterexamples: what it is not, and the tempting wrong moves
✗ Not this: For (5x − 4)3, choose g(x) = x3 and f(u) = 5u − 4.
This gives 5x3 − 4. At start 2 it is 36, whereas (10 − 4)3 = 216.
✓ Instead: Choose g(x) = 5x − 4 and f(u) = u3.
✗ Not this: The unrestricted h(x) = x can be decomposed into two reciprocal functions on its entire domain.
Both reciprocal stages fail at zero, so the resulting composition loses an input of h.
✓ Instead: That split represents x only on x ≠ 0. A full-domain split is g(x) = x + 1 and f(x) = x − 1.
✗ Not this: For 36−x+1, choose g(x) = x + 1 and f(u) = 36−u.
This gives 35−x, losing the root. At start 8 it gives −1, while the original gives 1.
✓ Instead: Keep the root in one of the two jobs, as in either split above.
✗ Not this: For 3x+7x−6, choose g(x) = x − 6 and f(u) = 3x+7u.
The proposed outside rule still depends on the original x, so it does not describe a rule using its input u alone. Choosing the bottom as g requires rewriting a changing top too.
✓ Instead: From u = x − 6 obtain x = u + 6. Then choose f(u) = 3u+25u, as shown in the final rung.
Tips and tricks
  • Understand, then rebuild: cover the inside package and read what the outside operation does to one input.
  • Always write f(g(x)) as the check. Do not rely on recognizing the two pieces by sight.
  • More than one answer may be correct; formula and domain checks decide.
  • The last calculator step is the outer function. Use this memory cue to choose the finishing job.
Trap. Giving the two correct component formulas in the wrong order. Recompose f(g(x)) on paper before accepting your decomposition.