A function $f: A \to B$ is a rule that assigns to every element $x$ of the set $A$ exactly one element $f(x)$ of the set $B$. The set $A$ is called the domain, $B$ is the codomain, and the set of values actually attained, $\{f(x) : x \in A\}$, is the range (image) of the function. In YÖS problems the notation $f: A \to B$, $f(x) = \ldots$ is standard: you must be able to find the largest possible domain from a formula and to find the range when the domain is given. If the problem says that $f: A \to B$ is onto (surjective), then $B$ coincides with the range, so finding $B$ means finding the set of all values of $f(x)$ for $x \in A$.
Two basic restrictions when finding the largest domain: (1) an even-degree root $\sqrt[2n]{g(x)}$ requires $g(x) \ge 0$; (2) a fraction requires the denominator to be nonzero. If the expression under the root contains an absolute value, use the standard equivalence $$|x - a| \le c \iff a - c \le x \le a + c \quad (c \ge 0).$$ Many YÖS problems then ask for the number of integer values of $x$ in the domain: the segment $[a, b]$ with integer endpoints contains exactly $b - a + 1$ integers.
For a logarithm $\log_a g(x)$ the argument must be strictly positive: $g(x) > 0$ (and the base must satisfy $a > 0$, $a \ne 1$). An odd-degree root is a completely different case: $\sqrt[3]{t}$ (and any $\sqrt[2n+1]{t}$) is defined for every real $t$, including negative values. Therefore for $$f(x) = \sqrt[3]{\frac{x+2}{x-1}}$$ you must NOT write the sign condition $\frac{x+2}{x-1} \ge 0$ — the only restriction comes from the fraction itself: $x - 1 \ne 0$, so the domain is $\mathbb{R} \setminus \{1\}$. Confusing odd roots with even roots is one of the most common traps in this subtopic.
A linear function $f(x) = mx + b$ with $m > 0$ is increasing, so it maps an interval to an interval of the same type: $$f\big((a, c]\big) = \big(f(a),\ f(c)\big].$$ If $m < 0$, the function is decreasing: the endpoints swap and the bracket types swap with them: $f\big((a, c]\big) = \big[f(c),\ f(a)\big)$. Example: let $f: (-1, 2] \to A$ be onto with $f(x) = 4x - 2$. Since $m = 4 > 0$: $f(-1) = -6$ (not attained, round bracket) and $f(2) = 6$ (attained, square bracket), so $A = (-6, 6]$.
The composition of $f$ and $g$ is defined by $$(g \circ f)(x) = g\big(f(x)\big):$$ first apply the inner function $f$, then apply $g$ to the result. To evaluate $(g \circ f)(2)$, compute $f(2)$ first, then substitute that number into $g$. Composition is not commutative: in general $(g \circ f)(x) \ne (f \circ g)(x)$. In YÖS problems the inner function often contains factorials or sums, so remember $n! = 1 \cdot 2 \cdots n$ and $1 + 2 + \cdots + n = \frac{n(n+1)}{2}$; evaluate these completely before substituting into the outer function.
A function has an inverse $f^{-1}$ exactly when it is one-to-one (each value is attained at most once); on its range the inverse satisfies $$f^{-1}(b) = a \iff f(a) = b.$$ Algorithm for finding $f^{-1}$: (1) write $y = f(x)$; (2) solve this equation for $x$; (3) swap the letters: the resulting expression is $f^{-1}(x)$. Useful shortcut: to find a single value such as $f^{-1}(1)$ you do not need the whole formula — just solve the equation $f(x) = 1$. Also remember the checks $f^{-1}(f(x)) = x$, $f(f^{-1}(x)) = x$, and that the graphs of $f$ and $f^{-1}$ are symmetric about the line $y = x$.
The logarithm and the exponential with the same base are inverses of each other: $$f(x) = \log_a x \implies f^{-1}(x) = a^x, \qquad f(x) = a^x \implies f^{-1}(x) = \log_a x.$$ For example, $f(x) = \log_5 x$ gives $f^{-1}(x) = 5^x$. For a shifted logarithm apply the algorithm: if $f(x) = c + \log_a(x - d)$, then from $y - c = \log_a(x - d)$ we get $x = d + a^{y - c}$, so $$f^{-1}(x) = d + a^{x - c}.$$ In particular, $f(x) = 1 + \log_3(x - 2)$ gives $f^{-1}(x) = 2 + 3^{x - 1}$. Also useful for simplification before inverting: $\ln e^{u} = u$ and $\ln a + \ln b = \ln(ab)$.
A piecewise function is given by different formulas on different parts of the domain, for example $$f(x) = \begin{cases} x + 1, & x < 2 \\ x^2, & x \ge 2 \end{cases}$$ To evaluate $f$ at a point, first check which condition the input satisfies, then use only that branch: here $f(1) = 2$ but $f(2) = 4$. When composing two piecewise functions, work inside-out: compute the inner value completely, and only then choose the branch of the outer function according to that value (not according to the original $x$). Boundary points deserve special care: always check whether the inequality is strict or not.
By definition $|a| = a$ for $a \ge 0$ and $|a| = -a$ for $a < 0$. A key identity: $$\sqrt{a^2} = |a|.$$ Example: $\sqrt{9x^2 - 30x + 25} = \sqrt{(3x-5)^2} = |3x - 5| = |5 - 3x|$ (the absolute value ignores the sign of its argument). To rewrite a sum of absolute values without bars, split the number line at the critical points where each expression vanishes. For $f(x) = |x| + |x - 1|$ the critical points are $0$ and $1$: $$f(x) = \begin{cases} 1 - 2x, & x < 0 \\ 1, & 0 \le x < 1 \\ 2x - 1, & x \ge 1 \end{cases}$$ To evaluate an expression like $|2x - \pi| - |x - e|$ at a specific point, determine the sign of each inner expression using $\pi \approx 3{.}14$ and $e \approx 2{.}72$: for instance at $x = 1$ we get $|2 - \pi| - |1 - e| = (\pi - 2) - (e - 1) = \pi - e - 1$.
The signum function is defined by $$\text{sgn}(x) = \begin{cases} -1, & x < 0 \\ 0, & x = 0 \\ 1, & x > 0 \end{cases}$$ The key identity connecting it to the absolute value is $$x \cdot \text{sgn}(x) = |x|,$$ which turns equations with $\text{sgn}$ into equations with $|x|$. Another frequent YÖS pattern is a recursive definition split by parity of the index: $$f(n+1) = \begin{cases} 2f(n), & n \text{ odd} \\ f(n) + 3, & n \text{ even} \end{cases}$$ Compute term by term, each time checking the parity of the current $n$ (not of $n+1$): with $f(1) = 2$ we get $f(2) = 2f(1) = 4$ (since $n = 1$ is odd), $f(3) = f(2) + 3 = 7$ (since $n = 2$ is even), $f(4) = 2f(3) = 14$.
(a) How many integer values of $x$ are in the domain of $f(x) = \sqrt{5 - |x + 2|}$? Step 1: the expression under the even root must be nonnegative: $5 - |x + 2| \ge 0$, i.e. $|x + 2| \le 5$. Step 2: remove the absolute value: $-5 \le x + 2 \le 5$, so $-7 \le x \le 3$. Step 3: count the integers: $3 - (-7) + 1 = 11$. Answer: $11$. (b) Find the domain of $f(x) = \sqrt[3]{\dfrac{x+2}{x-1}}$. The cube root is defined for all real numbers, so no sign condition is needed; the only restriction is $x - 1 \ne 0$. Answer: $\mathbb{R} \setminus \{1\}$.
(a) Let $f(x) = x! + (1 + 2 + \cdots + x)$ and $g(x) = x^2 - 1$. Find $(g \circ f)(2)$. Step 1: the inner value: $f(2) = 2! + (1 + 2) = 2 + 3 = 5$. Step 2: substitute into the outer function: $g(5) = 25 - 1 = 24$. Answer: $24$. (b) Composition of two piecewise functions: $$f(x) = \begin{cases} x + 1, & x < 2 \\ x^2, & x \ge 2 \end{cases} \qquad g(x) = \begin{cases} 2x, & x \le 3 \\ x - 1, & x > 3 \end{cases}$$ Find $(g \circ f)(3)$. Step 1: since $3 \ge 2$, use the second branch of $f$: $f(3) = 9$. Step 2: choose the branch of $g$ by the value $9$: since $9 > 3$, $g(9) = 9 - 1 = 8$. Answer: $8$.
Let $f(x) = \ln 4 + \ln e^{2x - 1}$. Find $f^{-1}(1)$. Step 1: simplify using $\ln e^{u} = u$: $$f(x) = \ln 4 + 2x - 1.$$ Step 2: use the shortcut $f^{-1}(1) = a \iff f(a) = 1$, so solve $\ln 4 + 2x - 1 = 1$. Step 3: $2x = 2 - \ln 4 = 2 - 2\ln 2$, hence $x = 1 - \ln 2$. Answer: $f^{-1}(1) = 1 - \ln 2$. Check: $f(1 - \ln 2) = \ln 4 + 2(1 - \ln 2) - 1 = \ln 4 - 2\ln 2 + 1 = 1$. Note how much faster this is than deriving the full formula $f^{-1}(x) = \frac{x + 1 - \ln 4}{2}$ — although the formula gives the same value.
(a) Solve $x^2 - 2 = x \, \text{sgn}(x)$. Step 1: use the identity $x \, \text{sgn}(x) = |x|$: the equation becomes $x^2 - 2 = |x|$. Step 2: substitute $t = |x| \ge 0$ and use $x^2 = |x|^2 = t^2$: $t^2 - t - 2 = 0$, so $(t - 2)(t + 1) = 0$, giving $t = 2$ (the root $t = -1$ is rejected since $t \ge 0$). Step 3: $|x| = 2$ gives $x = \pm 2$; the case $x = 0$ fails since $-2 \ne 0$. Answer: $x \in \{-2, 2\}$. (b) Let $f(x) = \dfrac{x}{x + 1}$. Find $\prod_{k=1}^{4} f(k)$. Write out the factors: $$\frac{1}{2} \cdot \frac{2}{3} \cdot \frac{3}{4} \cdot \frac{4}{5}.$$ The product telescopes: every numerator cancels the previous denominator, leaving $\frac{1}{5}$. Answer: $\frac{1}{5}$.
All course topics · Practice problems
Please enable JavaScript to use the practice app.