One function, several rules
A piecewise function uses different formulas on different parts of its domain. Think of a phone plan: free under 100 minutes, then a per-minute charge above that. Each line of the definition carries a condition telling you which inputs it governs, and the conditions must not overlap.
| x + 1, if x < 0
f(x) = | x^2, if 0 <= x <= 2
| 5, if x > 2
f(-3) : -3 < 0, use x + 1 -> -3 + 1 = -2
f(0) : 0 in [0, 2], use x^2 -> 0^2 = 0
f(2) : 2 in [0, 2], use x^2 -> 2^2 = 4
f(7) : 7 > 2, use 5 -> 5Even functions: mirror across the y-axis
A function is even when f(−x) = f(x) for every x. Plugging in the opposite input gives the same output, so the graph is a mirror image across the y-axis. The model is f(x) = x^2; powers like x^4 and x^6, and the cosine, are even.
f(x) = x^2 - 4 f(-x) = (-x)^2 - 4 = x^2 - 4 = f(x) -> EVEN g(x) = x^4 + 3x^2 + 1 g(-x) = x^4 + 3x^2 + 1 = g(x) -> EVEN
Odd functions, and the test that settles it
A function is odd when f(−x) = −f(x): the opposite input gives the opposite output. The graph has rotational symmetry about the origin — spin it 180° and it lands on itself. The model is f(x) = x^3; odd powers and the sine are odd. Most functions are neither, and that is a perfectly good answer.
- Compute f(−x) by replacing every x with −x, then simplify.
- If f(−x) = f(x), it is even. If f(−x) = −f(x), it is odd.
- If it is neither, say so. Example: f(x) = x^3 + 1 gives f(−x) = −x^3 + 1, which matches neither f(x) nor −f(x) — neither.