Cheatsheet 03 - Functions
Mathematics for Master Students
Function Basics
A function \(f: A \to B\) assigns to each input \(x \in A\) exactly one output \(f(x) \in B\); \(x \mapsto f(x)\) reads “\(x\) maps to \(f(x)\)”. Same input, same output. Every time.
| Set | Meaning | Example for \(f: \mathbb{R} \to \mathbb{R}\), \(f(x) = x^2\) |
|---|---|---|
| Domain \(A\) | All allowed inputs | \(\mathbb{R}\) |
| Codomain \(B\) | Where outputs are declared to land | \(\mathbb{R}\) |
| Range \(f(A)\) | Outputs that actually occur: \(\{f(x) : x \in A\}\); always \(f(A) \subseteq B\) | \([0, \infty)\) |
Evaluating: substitute the input everywhere the variable appears, negatives and whole expressions in parentheses: \(f(a + h) = (a + h)^2\), not \(a^2 + h\).
Vertical line test: a curve is the graph of a function \(\Leftrightarrow\) every vertical line hits it at most once.
Function Gallery
| Type | Form | Shape / behavior | Business use |
|---|---|---|---|
| Linear | \(mx + b\) | Constant slope \(m\); intercept \(b = f(0)\) | Fixed + variable cost |
| Quadratic | \(ax^2 + bx + c\) | Parabola, vertex at \(x = -\frac{b}{2a}\); opens up if \(a > 0\), down if \(a < 0\) | Revenue trade-off |
| Polynomial | \(a_n x^n + \dots + a_0\) | Up to \(n\) roots, \(n - 1\) turns; leading term dominates | Cubic cost curves |
| Rational | \(\frac{p(x)}{q(x)}\) | Undefined where \(q(x) = 0\); asymptotes | Cost per unit |
| Exponential | \(a \cdot b^x\), \(b > 0\) | Growth if \(b > 1\), decay if \(0 < b < 1\); \(a = f(0)\); never reaches \(0\) | Interest, depreciation |
| Logarithm | \(\ln x\) | Only for \(x > 0\); slow growth; undoes \(e^x\) | Solving for time |
Vertex form via completing the square: \(ax^2 + bx + c = a(x - h)^2 + k\) with \(h = -\frac{b}{2a}\), \(k = c - \frac{b^2}{4a}\).
Exponent & Log Rules
Exponent rules: same base, and repeated multiplication becomes a power:
\[a^x \cdot a^y = a^{x+y} \qquad \frac{a^x}{a^y} = a^{x-y} \qquad (a^x)^y = a^{xy}\]
Log rules: logs turn products into sums and powers into multiples:
\[\ln(xy) = \ln x + \ln y \qquad \ln\frac{x}{y} = \ln x - \ln y \qquad \ln(x^k) = k \ln x\]
\[y = \ln x \quad \Leftrightarrow \quad x = e^y \qquad \ln 1 = 0 \quad \ln e = 1 \qquad \log_b x = \frac{\ln x}{\ln b} \quad \text{(any base via } \ln\text{)}\]
Solving for the exponent: take \(\ln\), pull the unknown down with the power rule:
- \(1.05^t = 2 \quad \Rightarrow \quad t \ln 1.05 = \ln 2 \quad \Rightarrow \quad t = \frac{\ln 2}{\ln 1.05} \approx 14.2\)
- Continuous growth \(K_0 e^{rt}\) doubles at \(t = \frac{\ln 2}{r} \approx \frac{0.693}{r}\) (doubling time)
- For inequalities: dividing by \(\ln b\) with \(0 < b < 1\) flips the direction, since \(\ln b < 0\) (e.g. \(0.85^t < 0.25 \Rightarrow t > \ln 0.25 / \ln 0.85\))
Maximal Domain: Three Red Flags
If no domain is stated, take the largest set of reals on which the formula is defined:
| Red flag | Requirement | Example | Maximal domain |
|---|---|---|---|
| Division | Denominator \(\neq 0\) | \(\frac{1}{x - 3}\) | \(\mathbb{R} \setminus \{3\}\) |
| Even root | Inside \(\geq 0\) | \(\sqrt{2x + 6}\) | \([-3, \infty)\) |
| Logarithm | Inside \(> 0\) (strictly!) | \(\ln(5 - x)\) | \((-\infty, 5)\) |
Polynomials and exponentials are safe on all of \(\mathbb{R}\). Collect every restriction, then intersect. Note the brackets: \(\sqrt{0}\) is fine (square bracket), \(\ln 0\) is not (round bracket).
Composition & Inverses
Composition: apply \(g\) first, then \(f\); read from the inside out:
\[(f \circ g)(x) = f(g(x)) \qquad \text{order matters: } f \circ g \neq g \circ f \text{ in general}\]
Inverse \(f^{-1}\) undoes \(f\): \(\;f(a) = b \Leftrightarrow f^{-1}(b) = a\). It exists only if \(f\) is one-to-one (every horizontal line hits the graph at most once); strictly monotone \(\Rightarrow\) one-to-one.
Swap-and-solve recipe: write \(y = f(x)\) → solve for \(x\) → read the result as a function of the output.
- Example: \(y = 2x - 2 \quad \Rightarrow \quad x = \frac{y + 2}{2}\), so \(f^{-1}(x) = \frac{x + 2}{2}\)
- Domain and range swap; the graph of \(f^{-1}\) is the mirror image of \(f\) across \(y = x\)
\(f^{-1}(x)\) is the inverse function, not \(\frac{1}{f(x)}\). For functions, the exponent \(-1\) means undo, not divide.
Properties
| Property | Definition | Examples |
|---|---|---|
| Increasing | \(x_1 < x_2 \Rightarrow f(x_1) \leq f(x_2)\) (strictly: \(<\)) | \(e^x\), costs in quantity |
| Decreasing | \(x_1 < x_2 \Rightarrow f(x_1) \geq f(x_2)\) (strictly: \(>\)) | \(0.85^x\), demand in price |
| Bounded | Above: \(f(x) \leq M\) for all \(x\); below: \(f(x) \geq m\) | \(e^x > 0\): bounded below |
| Convex | Chord between two graph points lies above the graph | \(x^2\), \(e^x\) |
| Concave | Chord lies below the graph: diminishing returns | \(\ln x\), \(\sqrt{x}\) |
A straight line is both convex and concave (chords lie on the graph). Strictly monotone \(\Rightarrow\) invertible: that is why \(e^x\) has an inverse but \(x^2\) on \(\mathbb{R}\) does not.
Common Pitfalls
- \(f(a + h) \neq f(a) + f(h)\): substitute the whole expression, in parentheses.
- \(\ln(x + y) \neq \ln x + \ln y\): the log rules work for products, not sums.
- \(f \circ g \neq g \circ f\) in general: always check which function acts first.
- \(\ln\) needs \(> 0\) strictly; an even root is happy with \(\geq 0\) (round vs square bracket).
- Two inputs may share one output, but one input can never have two outputs.