Functions
Composition, inverses, domains, and piecewise rules.
Pen and paper is fine · no calculator needed why?
Opens at level 27. You're level 1. You can read and practice here now.
the idea
A function is a rule that turns each input into one output: f(x) = 2x + 3 turns 4 into 11.
A piecewise function uses different rules on different stretches of x. A composition, like f(g(3)), feeds one function's output into another. An inverse, written f⁻¹, runs the rule backward: f⁻¹(11) asks which input gave 11. The domain is every input the rule can accept.
techniques
Pick the piece first
- For each input, check which condition it meets.
- At the boundary, look for ≤ or ≥. The piece with the bar under its sign includes the boundary.
- Use only that piece's rule for that input.
worked example
f(x) = x² when x < 1, and 2x + 5 when x ≥ 1. What is f(1) + f(−2)?
- 1 meets x ≥ 1, so f(1) = 2 × 1 + 5 = 7.
- −2 meets x < 1, so f(−2) = (−2)² = 4.
- Total: 7 + 4 = 11.
Answer: 11
Work inside out
- Work out the inside function first.
- Feed that number into the outside function.
- f(g(2)) and g(f(2)) are usually different, so read the order.
worked example
f(x) = 3x − 1 and g(x) = x² + 2. What is f(g(2))?
- Inside first: g(2) = 2² + 2 = 6.
- Then f(6) = 3 × 6 − 1 = 17.
Answer: 17
What the rule allows
- Square root: the inside must be 0 or more.
- Log: the inside must be more than 0.
- Fraction: the bottom cannot be 0.
- Solve that condition for x.
worked example
What is the smallest integer x in the domain of f(x) = log(x − 2)?
- A log needs a positive inside: x − 2 > 0.
- So x > 2, which leaves out 2 itself.
- The smallest integer above 2 is 3.
Answer: 3
watch out for
- Using the wrong piece at the boundary. Check which condition has ≤ or ≥.
- Working f(g(3)) from the outside in. Start with the inside function.
- Working out f(8) when asked for f⁻¹(8). The inverse asks which input gives 8.
- Leaving the boundary out of a square root's domain. The square root of 0 is allowed; it is a log that needs more than 0.
practice
Piecewise functions
worked example
f(x) = 2x + 8 when x ≤ 0, and x² when x > 0. What is f(0) + f(5)?
Answer: 33
- f(0) uses the first rule (x ≤ 0): 2 × 0 + 8 = 0 + 8 = 8.
- f(5) uses the second rule (x > 0): 5² = 25.
- Total: 8 + 25 = 33.
Composition
worked example
f(x) = 2x + 6 and g(x) = x − 4. What is g(f(2))?
Answer: 6
- Work inside out: f(2) = 2 × 2 + 6 = 4 + 6 = 10.
- Then g(10) = 10 − 4 = 6.
Inverse value
worked example
f(x) = 3x − 10. What is f⁻¹(−31)?
Answer: -7
- f⁻¹(−31) is the input that gives −31: solve 3x − 10 = −31.
- 3x = −21, so x = −7.
Domain
worked example
What is the domain of f(x) = √(−2 − x)?
- x ≤ 2
- all real x
- x < −2
- x ≥ −2
- x ≤ −2
Answer: x ≤ −2
- A square root needs a non-negative inside: −2 − x ≥ 0, so x ≤ −2.