The Art of Problem Solving
Volume 1
Exercise. Pipe A can fill a pool in 5 hours, while pipe B can fill it in 4 hours. How long will it take to fill the pool if both are operating at the same time?
Solution.
Combined rate: $\frac{1}{5} + \frac{1}{4} = \frac{9}{20}$ pools per hour, so $t = \frac{20}{9} \approx 2.22$ hours.
Exercise. It is 4 o'clock now. How many minutes will pass before the minutes and hour hands of a clock are coincident?
Solution.
Minute hand: $6°$/min, hour hand: $0.5°$/min. At 4:00, the hour hand is at $120°$. The hands coincide when $6t = 120 + 0.5t$, i.e. $5.5t = 120$, so $t = \frac{240}{11} \approx 21.82$ minutes.
Exercise. Find the unit digit of $7^{42} + 42^7$.
Solution.
Unit digits of powers of 7 cycle with period 4: $7, 9, 3, 1, \ldots$ Since $42 \equiv 2 \pmod{4}$, the unit digit of $7^{42}$ is $9$.
Unit digits of powers of 2 cycle with period 4: $2, 4, 8, 6, \ldots$ Since $7 \equiv 3 \pmod{4}$, the unit digit of $42^7$ is $8$.
Therefore the unit digit of $7^{42} + 42^7$ is $9 + 8 = 17$, i.e. $\mathbf{7}$.
Exercise. It takes 3 days for 4 people to paint 5 houses. How long will it take for 2 people to paint 6 houses?
Solution.
One person paints $\frac{5}{4 \times 3} = \frac{5}{12}$ houses per day. Two people paint $\frac{5}{6}$ houses per day, so 6 houses takes $\frac{6}{5/6} = \frac{36}{5} = 7.2$ days.
Exercise. Let $p_k$ denote the $k$-th prime. Show that $p_1 p_2 \cdots p_n + 1$ cannot be a perfect square.
Solution.
Method 1 (2-adic valuation): Suppose $p_1 \cdots p_n + 1 = k^2$, so $p_1 \cdots p_n = (k-1)(k+1)$. Since $p_1 = 2$, the left side is even, so $(k-1)(k+1)$ is even. As $k-1$ and $k+1$ have the same parity, they must both be even, giving $v_2((k-1)(k+1)) \geq 2$. But $v_2(p_1 \cdots p_n) = 1$ since 2 appears exactly once, a contradiction.Method 2 (mod 4): Suppose $p_1 \cdots p_n + 1 = k^2$. Since the product is even, $k$ is odd. Writing $k = 2m+1$, we get $k^2 = 4m(m+1) + 1 \equiv 1 \pmod{4}$, which forces $p_1 \cdots p_n \equiv 0 \pmod{4}$. But $p_1 \cdots p_n \equiv 2 \pmod{4}$, a contradiction.
Exercise. Show that a number is divisible by 4 (resp. 8) if and only if its last 2 (resp. 3) digits are.
Solution.
Any integer $n$ can be written as $n = 100q + r$ where $r$ is the number formed by its last 2 digits. Since $4 \mid 100$, we have $4 \mid n \iff 4 \mid r$. Similarly, $n = 1000q + r'$ where $r'$ is the last 3 digits, and since $8 \mid 1000$, we have $8 \mid n \iff 8 \mid r'$.Exercise. Show that a number is divisible by 3 (resp. 9) if and only if the sum of its digits is.
Solution.
Write $n = \sum_{i=0}^{k} d_i \cdot 10^i$. Since $10 \equiv 1 \pmod{9}$, we have $10^i \equiv 1 \pmod{9}$ for all $i$, so $n \equiv \sum_{i=0}^{k} d_i \pmod{9}$. Thus $9 \mid n \iff 9 \mid \sum d_i$, and since $3 \mid 9$, the same holds for 3.Exercise. Prove that the sum of 3 consecutive perfect squares cannot be a perfect square.
Solution.
$(n-1)^2 + n^2 + (n+1)^2 = 3n^2 + 2$. Suppose $3n^2 + 2 = k^2$. Then $k^2 \equiv 2 \pmod{3}$. But squares mod 3 are only 0 or 1, a contradiction.Exercise. If $a$ and $b$ satisfy $\frac{a+b}{a} = \frac{b}{a+b}$, show that $a$ and $b$ cannot both be real.
Solution.
Cross-multiplying gives $(a+b)^2 = ab$, i.e. $a^2 + ab + b^2 = 0$. Seen as a quadratic in $a$, its discriminant is $b^2 - 4b^2 = -3b^2 \leq 0$, with equality only when $b = 0$, which forces $a = 0$ and makes the fractions undefined. So there are no valid real solutions.Exercise. If an integer $q$ can be expressed as the sum of two integer squares, show that $2q$ can as well.
Solution.
If $q = a^2 + b^2$, then $(a+b)^2 + (a-b)^2 = 2a^2 + 2b^2 = 2q$.Exercise. Prove that $\lfloor 2x \rfloor + \lfloor 2y \rfloor \geq \lfloor x \rfloor + \lfloor y \rfloor + \lfloor x+y \rfloor$.
Solution.
Let $\alpha = \{x\}$, $\beta = \{y\}$. Since $\lfloor 2t \rfloor = 2\lfloor t \rfloor + \lfloor 2\{t\} \rfloor$ and $\lfloor x+y \rfloor = \lfloor x \rfloor + \lfloor y \rfloor + \lfloor \alpha + \beta \rfloor$, the inequality reduces to $\lfloor 2\alpha \rfloor + \lfloor 2\beta \rfloor \geq \lfloor \alpha + \beta \rfloor$. If $\lfloor \alpha + \beta \rfloor = 0$ this is trivial. If $\lfloor \alpha + \beta \rfloor = 1$, then $\alpha + \beta \geq 1$, so $\alpha \geq \frac{1}{2}$ or $\beta \geq \frac{1}{2}$, giving $\lfloor 2\alpha \rfloor + \lfloor 2\beta \rfloor \geq 1$.Exercise. Find a closed form for the sum $S = a + (a+d) + (a+2d) + \cdots + (a+(n-1)d)$.
Solution.
Write $S$ in two ways: $$S = a \quad\quad + (a+d) \quad + \cdots + (a+(n-1)d)$$ $$S = (a+(n-1)d) + (a+(n-2)d) + \cdots + a$$ Adding term by term, each pair sums to $2a + (n-1)d$, and there are $n$ such pairs, so $2S = n(2a+(n-1)d)$, giving: $$S = \frac{n}{2}(2a + (n-1)d)$$Exercise. Find a closed form for the sum $S = a + ar + ar^2 + \cdots + ar^{n-1}$.
Solution.
Multiply $S$ by $r$: $Sr = ar + ar^2 + \cdots + ar^n$. Subtracting gives $S - Sr = a - ar^n$, i.e. $S(1-r) = a(1-r^n)$, so: $$S = \frac{a(1-r^n)}{1-r} \quad (r \neq 1)$$ If $r = 1$, then $S = na$.Exercise. Prove that $\sum_{k=1}^{\infty} \frac{1}{k}$ diverges.
Solution.
Group the terms in blocks of size $1, 1, 2, 4, 8, \ldots$: $$1 + \frac{1}{2} + \left(\frac{1}{3}+\frac{1}{4}\right) + \left(\frac{1}{5}+\cdots+\frac{1}{8}\right) + \cdots$$ Each block of $2^n$ terms satisfies $\frac{1}{2^n+1} + \cdots + \frac{1}{2^{n+1}} \geq 2^n \cdot \frac{1}{2^{n+1}} = \frac{1}{2}$, so the sum of the first $2^n$ terms is $\geq \frac{n}{2}$, which diverges.Exercise. Prove that any two consecutive Fibonacci numbers are relatively prime.
Solution.
By induction. $\gcd(F_1, F_2) = \gcd(1,1) = 1$. Assuming $\gcd(F_n, F_{n+1}) = 1$, since $F_{n+2} = F_{n+1} + F_n$ we have $\gcd(F_{n+1}, F_{n+2}) = \gcd(F_{n+1}, F_{n+1} + F_n) = \gcd(F_{n+1}, F_n) = 1$.Exercise. How many 5-digit numbers ending with 1, 2 or 4 are there with no repeated digit?
Solution.
Fix the last digit: 3 choices. The first digit cannot be 0 or equal to the last digit (which is nonzero), leaving 8 choices. The remaining three positions are filled from the 8 unused digits: $8 \times 7 \times 6$ ways. Total: $3 \times 8 \times 8 \times 7 \times 6 = 8064$.Exercise. Find the largest $n$ such that $2^n \mid 100!$.
Solution.
By Legendre's formula, $v_2(100!) = \sum_{k \geq 1} \lfloor \frac{100}{2^k} \rfloor$. Computing: $50 + 25 + 12 + 6 + 3 + 1 = 97$.Exercise. Two identical dice are rolled. How many distinct outcomes are there? (e.g. $(1,2)$ and $(2,1)$ count as the same outcome)
Solution.
Since the dice are indistinguishable, $(a, b)$ and $(b, a)$ count as the same outcome. There are 6 doubles (both dice equal) and $\binom{6}{2} = 15$ outcomes with distinct values, for a total of $6 + 15 = 21$.Exercise. A word consists of $n$ letters, where letter $i$ appears $k_i$ times, with $k_1 + \cdots + k_r = n$. Find a closed form for the number of distinct arrangements of this word.
Solution.
If all $n$ letters were distinct there would be $n!$ arrangements. Since permuting the $k_i$ copies of letter $i$ among themselves yields no new arrangement, we divide by $k_i!$ for each $i$, giving $\frac{n!}{k_1!\, k_2!\, \cdots\, k_r!}$.Exercise. Find the unit digit of $\sum_{k=1}^{15} k!$
Solution.
For $k \geq 5$, $k!$ is divisible by 10 so contributes 0 to the unit digit. Thus the unit digit equals that of $1! + 2! + 3! + 4! = 1 + 2 + 6 + 24 = 33$, which is $\mathbf{3}$.Exercise. Given 5 lines and 2 circles in a plane, what is the maximum number of intersection points?
Solution.
Count each type of intersection separately. Line-line: each pair of lines meets in at most 1 point, and there are $\binom{5}{2} = 10$ pairs, giving 10 points. Circle-circle: 2 circles meet in at most 2 points, giving 2. Line-circle: each of the 5 lines meets each of the 2 circles in at most 2 points, giving $5 \times 2 \times 2 = 20$. Total: $10 + 2 + 20 = \mathbf{32}$.Exercise. A 5-card hand is dealt from a standard 52-card deck. What is the probability that it contains exactly two aces?
Solution.
Choose 2 aces from 4 and 3 non-aces from the remaining 48: $\frac{\binom{4}{2}\binom{48}{3}}{\binom{52}{5}}$.Exercise. A 4-digit number not beginning with 0 is chosen at random. What is the probability that all 4 digits are distinct?
Solution.
There are $9 \times 10^3$ valid 4-digit numbers. For all digits distinct: 9 choices for the first digit (1–9), then 9, 8, 7 for the remaining, giving $\frac{9 \times 9 \times 8 \times 7}{9 \times 10^3}$.Exercise. A 5-card hand is dealt from a standard 52-card deck. What is the probability that it contains exactly one pair (two cards of the same value, with the other three cards all of different values)?
Solution.
Choose the pair value (13 ways), its 2 suits ($\binom{4}{2}$), the 3 remaining values from the other 12 ($\binom{12}{3}$), and a suit for each ($4^3$), giving $\frac{13 \cdot \binom{4}{2} \cdot \binom{12}{3} \cdot 4^3}{\binom{52}{5}}$.Exercise. A box contains 3 red balls and 3 green balls. Two balls are drawn one after the other without replacement. What is the probability that the first is red and the second is green?
Solution.
$\frac{3}{6} \times \frac{3}{5} = \frac{3}{10}$.Exercise. A box contains 3 red balls and 3 green balls. Two balls are chosen simultaneously. What is the probability that one is red and one is green?
Solution.
$\frac{\binom{3}{1}\binom{3}{1}}{\binom{6}{2}}$.Exercise. Two digits are selected independently and uniformly at random from 1 to 9. What is the probability that their product is a multiple of 3?
Solution.
The product is a multiple of 3 iff at least one digit is. By complement, $1 - \left(\frac{6}{9}\right)^2 = 1 - \frac{4}{9} = \frac{5}{9}$.Exercise. Five dice are tossed simultaneously. What is the probability that the total is at least 29?
Solution.
The maximum total is 30, so we need totals of 29 or 30. Total = 30: all five dice show 6, giving 1 outcome. Total = 29: exactly one die shows 5 and the rest show 6, giving 5 outcomes. So the probability is $\frac{6}{6^5} = \frac{1}{1296}$.Exercise. 4 girls and 4 boys are seated at random around a circular table. What is the probability that boys and girls alternate?
Solution.
Total circular arrangements: $7!$. Fix one girl; the remaining 3 girls fill the 3 remaining girl seats ($3!$ ways) and the 4 boys fill the 4 boy seats ($4!$ ways), giving $\frac{3! \cdot 4!}{7!} = \frac{1}{35}$.Exercise. The integers from 1 to 10 are partitioned at random into two sets of 5. What is the probability that 1 and 2 are in the same set?
Solution.
Given that 1 is placed, there are 9 remaining spots of which 4 are in the same set. So the probability that 2 lands in the same set as 1 is $\frac{4}{9}$.Exercise. Three men rent a room and each pays 15, for a total of 45. Later, the manager realizes they were overcharged and sends 5 back with a messenger. The messenger, unable to split 5 three ways, pockets 2 and gives each man 1 back. So each man effectively paid 14, totaling 42. Add the 2 the messenger kept: 42 + 2 = 44. But the men originally paid 45. Where is the missing dollar?
Solution.
There is no missing dollar. The reasoning is flawed. The 42 already includes the 2 kept by the messenger (40 to the manager + 2 to the messenger). Adding the 2 again is double-counting. The correct accounting is: 45 paid $-$ 3 returned $=$ 42 $=$ 40 (room) $+$ 2 (messenger).Exercise. Prove that a positive integer has an odd number of distinct divisors if and only if it is a perfect square.
Solution.
Method 1 (pairing): Pair each divisor $d$ of $n$ with $n/d$. Two distinct divisors $d \neq n/d$ form a pair, contributing 2 to the count. A divisor is unpaired iff $d = n/d$, i.e. $d^2 = n$. So the total count is odd iff there is exactly one unpaired divisor, which happens iff $n$ is a perfect square.Method 2 (prime factorization): Write $n = p_1^{a_1} \cdots p_k^{a_k}$. The number of divisors is $\tau(n) = (a_1+1)\cdots(a_k+1)$. This product is odd iff every factor $(a_i+1)$ is odd, iff every $a_i$ is even, iff $n$ is a perfect square.
Exercise. Prove that $n^5 - n$ is divisible by 10 for all integers $n$.
Solution.
Factor: $n^5 - n = n(n-1)(n+1)(n^2+1)$. It suffices to show divisibility by 2 and 5.Divisibility by 2: $(n-1)n$ is a product of 2 consecutive integers, hence even.
Divisibility by 5: Method 1 (Fermat): $n^5 \equiv n \pmod{5}$ by Fermat's little theorem. Method 2 (cases mod 5): if $n \equiv 0, 1, 4 \pmod{5}$ then one of $n, n-1, n+1$ is divisible by 5. If $n \equiv 2$ or $3 \pmod{5}$, then $n^2 \equiv 4 \pmod{5}$ so $n^2 + 1 \equiv 0 \pmod{5}$.
Exercise. A 100-meter-long train heading east at 10 m/s passes a train heading west at 15 m/s. If the two trains take 30 seconds to completely pass each other, how long is the second train?
Solution.
Since the trains travel in opposite directions, their relative speed is $10 + 15 = 25$ m/s. For the trains to fully pass each other, the total distance covered equals the sum of their lengths. Thus $25 \times 30 = 100 + L$, giving $L = 750 - 100 = \mathbf{650}$ meters.Exercise. A law firm with 4 senior partners and 3 junior partners wishes to form a committee. In how many ways can such a committee be formed if it must include at least 2 senior partners and at most 1 junior partner?
Solution.
A valid committee has $s \geq 2$ senior and $j \leq 1$ junior partners. Summing over all valid $(s, j)$: $$\binom{4}{2}\binom{3}{0} + \binom{4}{2}\binom{3}{1} + \binom{4}{3}\binom{3}{0} + \binom{4}{3}\binom{3}{1} + \binom{4}{4}\binom{3}{0} + \binom{4}{4}\binom{3}{1}$$ $$= 6 + 18 + 4 + 12 + 1 + 3 = \mathbf{44}.$$Exercise. Two players take turns removing between 1 and 5 sticks from a pile of 59. The player forced to take the last stick loses. How many sticks should the first player remove on the opening move to guarantee a win?
Solution.
A position is losing for the player to move iff the opponent can always respond to maintain control. If there is 1 stick, the current player must take it and loses. With 2–6 sticks, the current player can leave exactly 1 for the opponent. With 7 sticks, any move leaves 2–6 (a winning position for the opponent), so 7 is again a losing position. In general, the losing positions are $1, 7, 13, \ldots$, i.e. those congruent to $1 \pmod{6}$.The losing positions are $1, 7, 13, \ldots, 55, 61, \ldots$ The nearest one below 59 is 55, so the first player takes $\mathbf{4}$ sticks. From then on, whenever the second player takes $n$ sticks, the first player takes $6 - n$, keeping the pile on $49, 43, \ldots, 7, 1$ and forcing the second player to take the last stick.
Exercise. Let $a$ and $b$ be positive real numbers such that $x^2 + ax + 2b = 0$ and $x^2 + 2bx + a = 0$ both have real roots. Find the smallest possible value of $a + b$.
Solution.
For real roots, the discriminants must be non-negative: $$a^2 - 8b \geq 0 \quad \text{and} \quad 4b^2 - 4a \geq 0,$$ giving $b \leq \frac{a^2}{8}$ and $b \geq \sqrt{a}$ (since $b > 0$). To minimize $a + b$, take $b$ as small as possible, i.e. $b = \sqrt{a}$. This is compatible with the first constraint only when $\sqrt{a} \leq \frac{a^2}{8}$, i.e. $a^{3/2} \geq 8$, so $a \geq 4$.Since $f(a) = a + \sqrt{a}$ is increasing, the minimum is at $a = 4$, $b = 2$, where both discriminants vanish. The smallest possible value is $a + b = \mathbf{6}$.
Volume 2
Exercise. (Rational Root Theorem) Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0$ be a polynomial with integer coefficients, $a_n \neq 0$ and $a_0 \neq 0$. Show that if $\frac{p}{q} \in \mathbb{Q}$ is a root of $P$, with $p, q \in \mathbb{Z}$ coprime and $q > 0$, then $p \mid a_0$ and $q \mid a_n$.
Solution.
Since $P\!\left(\frac{p}{q}\right) = 0$, multiplying by $q^n$ gives $$a_n p^n + a_{n-1} p^{n-1} q + \cdots + a_1 p q^{n-1} + a_0 q^n = 0.$$
Isolating $a_0 q^n$: $$a_0 q^n = -p \left( a_n p^{n-1} + a_{n-1} p^{n-2} q + \cdots + a_1 q^{n-1} \right),$$ so $p \mid a_0 q^n$. Since $\gcd(p, q) = 1$, we have $\gcd(p, q^n) = 1$, hence $p \mid a_0$.
Isolating $a_n p^n$: $$a_n p^n = -q \left( a_{n-1} p^{n-1} + a_{n-2} p^{n-2} q + \cdots + a_0 q^{n-1} \right),$$ so $q \mid a_n p^n$. Since $\gcd(q, p^n) = 1$, we conclude $q \mid a_n$.
Exercise. Find the roots of $2x^3 - 5x^2 + 4x - 1$.
Solution.
By the rational root theorem, any rational root $\frac{p}{q}$ (in lowest terms) satisfies $p \mid 1$ and $q \mid 2$, so the candidates are $\pm 1, \pm \frac{1}{2}$.
Testing $x = 1$: $2 - 5 + 4 - 1 = 0$, so $1$ is a root. Polynomial division yields $$2x^3 - 5x^2 + 4x - 1 = (x - 1)(2x^2 - 3x + 1) = (x - 1)^2 (2x - 1).$$
The roots are $x = 1$ (double) and $x = \frac{1}{2}$.
Exercise. (Vieta's formulas) Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_0$ be a polynomial of degree $n$ over $\mathbb{C}$, with roots $r_1, \ldots, r_n$ (counted with multiplicity). For $1 \leq k \leq n$, define the $k$-th elementary symmetric sum of the roots as $$e_k = \sum_{1 \leq i_1 < i_2 < \cdots < i_k \leq n} r_{i_1} r_{i_2} \cdots r_{i_k}.$$ Show that $$e_k = (-1)^k \frac{a_{n-k}}{a_n}.$$
Solution.
Since $P$ has roots $r_1, \ldots, r_n$ and leading coefficient $a_n$, we have $$P(x) = a_n \prod_{i=1}^{n} (x - r_i).$$
Expanding the product, the coefficient of $x^{n-k}$ is obtained by choosing $x$ from $n - k$ of the factors and $-r_i$ from the remaining $k$ factors, summed over all such choices: $$\prod_{i=1}^{n} (x - r_i) = \sum_{k=0}^{n} \left( \sum_{1 \leq i_1 < \cdots < i_k \leq n} \prod_{j=1}^{k} (-r_{i_j}) \right) x^{n-k} = \sum_{k=0}^{n} (-1)^k e_k \, x^{n-k},$$ with the convention $e_0 = 1$.
Therefore $$P(x) = \sum_{k=0}^{n} (-1)^k a_n e_k \, x^{n-k}.$$ Identifying with $P(x) = \sum_{k=0}^{n} a_{n-k} x^{n-k}$ gives $a_{n-k} = (-1)^k a_n e_k$, hence $$e_k = (-1)^k \frac{a_{n-k}}{a_n}.$$
Exercise. Three of the roots of $x^4 + Ax^2 + Bx + C$ are $-1$, $2$, and $3$. What is the value of $2C - AB$?
Solution.
Let $r$ be the fourth root. Since the coefficient of $x^3$ is $0$, Vieta's formulas give $e_1 = 0$: $$-1 + 2 + 3 + r = 0 \implies r = -4.$$
The polynomial factors as $$(x+1)(x-2)(x-3)(x+4) = (x^2 - x - 2)(x^2 + x - 12) = x^4 - 15 x^2 + 10 x + 24.$$ So $A = -15$, $B = 10$, $C = 24$.
Therefore $2C - AB = 48 - (-15)(10) = 48 + 150 = \mathbf{198}$.
Exercise. Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_0$ with $a_n, a_0 \neq 0$. Show that the polynomial whose roots are the reciprocals of the roots of $P$ is the polynomial with reversed coefficients: $$Q(x) = a_0 x^n + a_1 x^{n-1} + \cdots + a_{n-1} x + a_n.$$
Solution.
For any $x \neq 0$, $$x^n P\!\left(\frac{1}{x}\right) = x^n \left( a_n x^{-n} + a_{n-1} x^{-(n-1)} + \cdots + a_0 \right) = a_n + a_{n-1} x + \cdots + a_0 x^n = Q(x).$$
Since $a_0 \neq 0$, no root of $P$ is $0$. If $r$ is a root of $P$, then $r \neq 0$ and $$Q(1/r) = (1/r)^n P(r) = 0,$$ so $1/r$ is a root of $Q$. Conversely, $a_0 \neq 0$ ensures $\deg Q = n$, so $Q$ has $n$ roots (with multiplicity) just like $P$. Hence the roots of $Q$ are exactly $\{1/r : r \text{ root of } P\}$.
Exercise. Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_0$ and let $k \neq 0$. Find a polynomial whose roots are $k$ times the roots of $P$.
Solution.
If $r$ is a root of $P$, we want $kr$ to be a root of the new polynomial $Q$, i.e. $Q(kr) = 0$. This suggests $Q(x) = P(x/k)$: $$P(x/k) = a_n \frac{x^n}{k^n} + a_{n-1} \frac{x^{n-1}}{k^{n-1}} + \cdots + a_0.$$
Multiplying by $k^n$ to clear denominators gives the polynomial $$Q(x) = a_n x^n + a_{n-1} k \, x^{n-1} + a_{n-2} k^2 \, x^{n-2} + \cdots + a_0 k^n = \sum_{i=0}^{n} a_i k^{n-i} x^i.$$
By construction, $Q(kr) = k^n P(r) = 0$ for every root $r$ of $P$, and since $\deg Q = n$, these are all the roots.
Exercise. The roots of $x^3 + x^2 - x - 3 = 0$ are $a$, $b$, $c$. Find the value of $$\frac{1}{a+3} + \frac{1}{b+3} + \frac{1}{c+3}.$$
Solution.
Set $y = \frac{1}{x+3}$, so $x = \frac{1-3y}{y}$. The roots of $P$ in $x$ map to $\frac{1}{a+3}, \frac{1}{b+3}, \frac{1}{c+3}$ in $y$, which are the roots of $y^3 \cdot P\!\left(\frac{1-3y}{y}\right)$: $$(1-3y)^3 + (1-3y)^2 y - (1-3y) y^2 - 3 y^3 = -18 y^3 + 20 y^2 - 8 y + 1.$$
By Vieta's, the sum of roots is $\displaystyle -\frac{20}{-18} = \mathbf{\frac{10}{9}}$.
Exercise. (Newton's sums) Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_0$ have roots $r_1, \ldots, r_n$ (counted with multiplicity), and define the $k$-th power sum $$s_k = r_1^k + r_2^k + \cdots + r_n^k, \qquad k \geq 0.$$ Show that for every $k \geq n$, $$a_n s_k + a_{n-1} s_{k-1} + \cdots + a_1 s_{k-n+1} + a_0 s_{k-n} = 0,$$ with the convention $s_0 = n$.
Solution.
For each root $r_i$, $P(r_i) = 0$: $$a_n r_i^n + a_{n-1} r_i^{n-1} + \cdots + a_0 = 0.$$ Multiplying by $r_i^{k-n}$ (valid since $k \geq n$) gives $$a_n r_i^k + a_{n-1} r_i^{k-1} + \cdots + a_0 r_i^{k-n} = 0.$$
Summing over $i = 1, \ldots, n$: $$a_n s_k + a_{n-1} s_{k-1} + \cdots + a_0 s_{k-n} = 0.$$ (For $k = n$, the last term is $a_0 s_0 = a_0 n$.)
Exercise. Let $r_1, \ldots, r_{1000}$ be the roots of $x^{1000} - 10x + 10 = 0$. Find $\sum_{i=1}^{1000} r_i^{1000}$.
Solution.
Apply Newton's sums with $k = n = 1000$: $$a_{1000} s_{1000} + a_{999} s_{999} + \cdots + a_1 s_1 + a_0 \cdot 1000 = 0.$$ Here $a_{1000} = 1$, $a_1 = -10$, $a_0 = 10$, and all other coefficients vanish, so $$s_{1000} - 10 s_1 + 10000 = 0.$$
By Vieta's, $s_1 = \sum r_i = -a_{999}/a_{1000} = 0$. Therefore $$s_{1000} = -10000.$$
Exercise. (Newton's sum for $s_2$) Let $P(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_0$ have roots $r_1, \ldots, r_n$ with $n \geq 2$. Show that $$a_n s_2 + a_{n-1} s_1 + 2 a_{n-2} = 0,$$ where $s_k = r_1^k + \cdots + r_n^k$.
Solution.
Expanding the square of $s_1$: $$s_1^2 = \left( \sum_{i=1}^{n} r_i \right)^2 = \sum_{i=1}^{n} r_i^2 + 2 \sum_{i \lt j} r_i r_j = s_2 + 2 e_2,$$ where $e_2 = \sum_{i \lt j} r_i r_j$ is the second elementary symmetric sum. Hence $s_2 = s_1^2 - 2 e_2$.
By Vieta's, $s_1 = e_1 = -\frac{a_{n-1}}{a_n}$ and $e_2 = \frac{a_{n-2}}{a_n}$, so $$s_2 = \frac{a_{n-1}^2}{a_n^2} - \frac{2 a_{n-2}}{a_n}.$$ Multiplying by $a_n$ and rearranging: $$a_n s_2 = \frac{a_{n-1}^2}{a_n} - 2 a_{n-2} = -a_{n-1} s_1 - 2 a_{n-2},$$ i.e. $a_n s_2 + a_{n-1} s_1 + 2 a_{n-2} = 0$.
Exercise. Let $r$, $s$, $t$ be the roots of $x^3 - 6x^2 + 5x - 7 = 0$. Find $\displaystyle \frac{1}{r^2} + \frac{1}{s^2} + \frac{1}{t^2}$.
Solution.
Reversing the coefficients gives the polynomial whose roots are $\frac{1}{r}, \frac{1}{s}, \frac{1}{t}$ (since $x^3 P(1/x) = -7 x^3 + 5 x^2 - 6 x + 1$ vanishes at $1/r$ whenever $P(r) = 0$): $$Q(x) = -7 x^3 + 5 x^2 - 6 x + 1.$$ We want $s_2$ for $Q$. Applying Newton's identity $a_n s_2 + a_{n-1} s_1 + 2 a_{n-2} = 0$ with $a_3 = -7$, $a_2 = 5$, $a_1 = -6$: $$-7 s_2 + 5 s_1 - 12 = 0.$$
By Vieta's on $Q$, $s_1 = -\frac{a_2}{a_3} = \frac{5}{7}$, so $$-7 s_2 = 12 - 5 \cdot \frac{5}{7} = \frac{59}{7} \implies s_2 = \mathbf{-\frac{59}{49}}.$$
Exercise. Let $P(x) = a_n x^n + \cdots + a_0$ with integer coefficients. Show that if $P(0)$ and $P(1)$ are both odd, then $P$ has no integer root.
Solution.
Since $P$ has integer coefficients, $a \equiv b \pmod 2 \implies P(a) \equiv P(b) \pmod 2$.
Suppose $r \in \mathbb{Z}$ is a root of $P$. Then $P(r) = 0$ is even. But $r$ is either even or odd:
- if $r$ is even, $P(r) \equiv P(0) \equiv 1 \pmod 2$;
- if $r$ is odd, $P(r) \equiv P(1) \equiv 1 \pmod 2$.
Exercise. Find the product of the $n$-th roots of unity, using Vieta's formula.
Solution.
The $n$-th roots of unity are the roots of $P(x) = x^n - 1$. By Vieta's, $$\prod_{k=0}^{n-1} \omega_k = (-1)^n \frac{a_0}{a_n} = (-1)^n \cdot (-1) = (-1)^{n+1}.$$
So the product is $1$ if $n$ is odd, and $-1$ if $n$ is even.
Exercise. Let $c, d$ be nonzero constants such that two of the roots of $4x^3 - 12x^2 + cx + d$ add to $0$. Find $\frac{d}{c}$.
Solution.
Let the roots be $r$, $-r$, $s$. By Vieta's, $r + (-r) + s = \frac{12}{4} = 3$, so $s = 3$.
Method 1 (more Vieta's): The other two Vieta relations give $$r(-r) + rs + (-r)s = -r^2 = \frac{c}{4}, \qquad r \cdot (-r) \cdot s = -3 r^2 = -\frac{d}{4}.$$ So $r^2 = -\frac{c}{4} = \frac{d}{12}$, hence $d = -3c$ and $\displaystyle \frac{d}{c} = \mathbf{-3}$.
Method 2 (plug in the known root): Since $s = 3$ is a root, $P(3) = 0$: $$4(27) - 12(9) + 3c + d = 108 - 108 + 3c + d = 3c + d = 0,$$ so $d = -3c$ and $\displaystyle \frac{d}{c} = \mathbf{-3}$.
Exercise. Find the remainder of $x^{13} + 1$ divided by $x - 1$.
Solution.
Method 1 (remainder theorem): The remainder of $P(x)$ divided by $x - a$ is $P(a)$. Here $P(x) = x^{13} + 1$ and $a = 1$, so the remainder is $P(1) = 1 + 1 = \mathbf{2}$.
Method 2 (explicit division): Using the geometric series identity $x^{13} - 1 = (x-1)(x^{12} + x^{11} + \cdots + x + 1)$, we get $$x^{13} + 1 = (x-1)\underbrace{(x^{12} + x^{11} + \cdots + x + 1)}_{Q(x)} + \underbrace{2}_{R}.$$
Exercise. Let $(1 + x + x^2)^n = a_0 + a_1 x + a_2 x^2 + \cdots + a_{2n} x^{2n}$. Find $a_0 + a_2 + a_4 + \cdots + a_{2n}$ in terms of $n$.
Solution.
Set $P(x) = (1 + x + x^2)^n$. Then $$P(1) = a_0 + a_1 + \cdots + a_{2n}, \qquad P(-1) = a_0 - a_1 + a_2 - \cdots + a_{2n}.$$ Adding and dividing by $2$ isolates the even-indexed coefficients: $$a_0 + a_2 + \cdots + a_{2n} = \frac{P(1) + P(-1)}{2} = \frac{3^n + 1^n}{2} = \mathbf{\frac{3^n + 1}{2}}.$$
Exercise. Find the remainder of $x^{203} - 1$ divided by $x^4 - 1$.
Solution.
Method 1 (congruences): Since $x^4 \equiv 1 \pmod{x^4 - 1}$ and $203 = 4 \cdot 50 + 3$, $$x^{203} = (x^4)^{50} \cdot x^3 \equiv x^3 \pmod{x^4 - 1}.$$ So $x^{203} - 1 \equiv x^3 - 1 \pmod{x^4 - 1}$, and the remainder is $\mathbf{x^3 - 1}$.
Method 2 (evaluate at roots): Write the Euclidean division as $x^{203} - 1 = (x^4 - 1) Q(x) + R(x)$ with $R(x) = a x^3 + b x^2 + c x + d$. The roots of $x^4 - 1$ are $1, -1, i, -i$, and at each root the left side equals $R$ evaluated there. Using $i^{203} = i^{4 \cdot 50 + 3} = i^3 = -i$:
- $x = 1$: $0 = a + b + c + d$,
- $x = -1$: $-2 = -a + b - c + d$,
- $x = i$: $-i - 1 = -a i - b + c i + d$,
- $x = -i$: $i - 1 = a i - b - c i + d$.
From the first two: $b + d = -1$ and $a + c = 1$. From the last two (real and imaginary parts): $-b + d = -1$ and $a - c = 1$. Solving: $a = 1$, $b = 0$, $c = 0$, $d = -1$, giving $R(x) = \mathbf{x^3 - 1}$.
Exercise. Let $k \geq 2$ be a positive integer. Find all real polynomials $P$ such that $P(P(X)) = P(X)^k$.
Solution.
Set $Y = P(X)$. The equation becomes $P(Y) = Y^k$ for every $Y$ in the image of $P$.
Case 1: $P$ non-constant. Then $P$ takes infinitely many values, so $P(Y) - Y^k$ vanishes at infinitely many points, hence $P(Y) = Y^k$ as polynomials. Conversely, $P(X) = X^k$ satisfies $P(P(X)) = (X^k)^k = X^{k^2} = P(X)^k$.
Case 2: $P$ constant, $P(X) = c$. Then $c = c^k$, i.e. $c(c^{k-1} - 1) = 0$. Over $\mathbb{R}$, this gives $c = 0$, $c = 1$, or $c = -1$ (the last only when $k$ is odd, so that $k-1$ is even).
The real solutions are therefore $P(X) = X^k$, $P(X) = 0$, $P(X) = 1$, and (for odd $k$) $P(X) = -1$.
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $f(xy) = x f(y)$ for all $x, y \in \mathbb{R}$.
Solution.
Setting $y = 1$ gives $f(x) = x f(1)$, so $f(x) = cx$ with $c = f(1)$.
Conversely, $f(x) = cx$ satisfies $f(xy) = c(xy) = x (cy) = x f(y)$. So the solutions are exactly $f(x) = cx$, $c \in \mathbb{R}$.
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $y f(x) = x f(y)$ for all $x, y \in \mathbb{R}$.
Solution.
Method 1: Setting $y = 1$ gives $f(x) = x f(1)$. Writing $c = f(1)$, we get $f(x) = cx$ for all $x$.
Method 2: For $x, y \neq 0$, dividing both sides by $xy$ gives $\frac{f(x)}{x} = \frac{f(y)}{y}$. So $g(t) = \frac{f(t)}{t}$ takes the same value for every nonzero $t$, i.e. $g$ is constant on $\mathbb{R} \setminus \{0\}$. Call this constant $c$; then $f(t) = ct$ for all $t \neq 0$. For $t = 0$, setting $x = 0$ and any $y \neq 0$ in the original equation gives $y f(0) = 0$, hence $f(0) = 0 = c \cdot 0$.
Conversely, any $f(x) = cx$ satisfies $y \cdot cx = x \cdot cy$. So the solutions are exactly the linear maps $f(x) = cx$, $c \in \mathbb{R}$.
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $f(x + y) + f(x - y) = 2 x^2 + 2 y^2$ for all $x, y \in \mathbb{R}$.
Solution.
Method 1: Setting $y = 0$ gives $2 f(x) = 2 x^2$, so $f(x) = x^2$.
Method 2: Setting $x = y = 0$ gives $2 f(0) = 0$, so $f(0) = 0$. Setting $x = y$ then gives $f(2x) + f(0) = 4 x^2$, so $f(2x) = (2x)^2$, i.e. $f(u) = u^2$ for all $u \in \mathbb{R}$.
Conversely, $f(x) = x^2$ satisfies $(x+y)^2 + (x-y)^2 = 2x^2 + 2y^2$. So $f(x) = x^2$ is the unique solution.
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $f(x + y) + f(x - y) = 2 x^2 - 2 y^2$ for all $x, y \in \mathbb{R}$.
Solution.
Setting $y = 0$ gives $2 f(x) = 2 x^2$, so $f(x) = x^2$. Setting $x = 0$ gives $f(y) + f(-y) = -2 y^2$, but $f(y) + f(-y) = y^2 + y^2 = 2 y^2$, forcing $4 y^2 = 0$ for all $y$, a contradiction.
Hence no such function exists.
Exercise. Find all functions $f : \mathbb{R}^* \to \mathbb{R}$ such that $f(x) + 2 f\!\left(\frac{1}{x}\right) = x$ for all $x \neq 0$.
Solution.
Substituting $x \to \frac{1}{x}$ in the equation gives a second relation: $$f(x) + 2 f(1/x) = x, \qquad f(1/x) + 2 f(x) = \frac{1}{x}.$$
This is a linear system in $f(x)$ and $f(1/x)$. Multiplying the second by $2$ and subtracting the first: $$3 f(x) = \frac{2}{x} - x \implies f(x) = \frac{2 - x^2}{3 x}.$$
Conversely, this $f$ satisfies the equation: $\displaystyle \frac{2 - x^2}{3x} + 2 \cdot \frac{2 - 1/x^2}{3/x} = \frac{2 - x^2 + 4 x^2 - 2}{3 x} = x.$
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $f\!\left(\frac{1+a}{2}\right) = f\!\left(\frac{1-a}{2}\right) + a$ for all $a \in \mathbb{R}$.
Solution.
Note that $a = \frac{1+a}{2} - \frac{1-a}{2}$, so the equation rewrites as $$f\!\left(\frac{1+a}{2}\right) - \frac{1+a}{2} = f\!\left(\frac{1-a}{2}\right) - \frac{1-a}{2}.$$ Defining $g(x) = f(x) - x$, this says $g\!\left(\frac{1+a}{2}\right) = g\!\left(\frac{1-a}{2}\right)$ for all $a$, i.e. $g(u) = g(1 - u)$ for all $u$ (since $\frac{1+a}{2} + \frac{1-a}{2} = 1$).
Now define $h(x) = g\!\left(x + \tfrac{1}{2}\right)$. The condition $g(u) = g(1-u)$ becomes $$h\!\left(u - \tfrac{1}{2}\right) = h\!\left(\tfrac{1}{2} - u\right),$$ i.e. $h(t) = h(-t)$: $h$ must be even.
Hence the solutions are exactly $$f(x) = x + h\!\left(x - \tfrac{1}{2}\right),$$ where $h : \mathbb{R} \to \mathbb{R}$ is any even function. (Taking $h(t) = t^2$ recovers $f(x) = x + (x - \tfrac{1}{2})^2 = x^2 + \tfrac{1}{4}$.)
Exercise. Find all functions $f : \mathbb{R}^* \to \mathbb{R}^*$ such that $\displaystyle \frac{f(x)}{f(y)} = \frac{y}{x}$ for all $x, y \in \mathbb{R}^*$.
Solution.
Cross-multiplying gives $x f(x) = y f(y)$ for all $x, y$. So $x f(x)$ is independent of $x$: there is a constant $c$ with $x f(x) = c$, i.e. $f(x) = \frac{c}{x}$. Since $f$ is $\mathbb{R}^*$-valued, $c \neq 0$.
Conversely, $f(x) = c/x$ satisfies $\frac{c/x}{c/y} = \frac{y}{x}$. So the solutions are $f(x) = \frac{c}{x}$ for $c \in \mathbb{R}^*$.
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $f(x + y) - f(x - y) = 4 x y$ for all $x, y \in \mathbb{R}$.
Solution.
Setting $x = y$ gives $f(2x) - f(0) = 4 x^2$, so $f(u) = u^2 + f(0)$ for all $u \in \mathbb{R}$.
Conversely, $f(x) = x^2 + c$ satisfies $(x+y)^2 - (x-y)^2 = 4xy$. So the solutions are $f(x) = x^2 + c$, $c \in \mathbb{R}$.
Exercise. Find all functions $f : \mathbb{R} \to \mathbb{R}$ such that $f(1 - x) = f(x) + 1 - 2 x$ for all $x \in \mathbb{R}$.
Solution.
Since $1 - 2x = (1-x) - x$, the equation rewrites as $$f(1-x) - (1-x) = f(x) - x.$$ Define $g(x) = f(x) - x$; then $g(1-x) = g(x)$, so $g$ is symmetric about $\tfrac{1}{2}$.
Equivalently, letting $h(t) = g(t + \tfrac{1}{2})$, the condition $g(1-x) = g(x)$ becomes $h(-t) = h(t)$: $h$ is even.
Hence the solutions are exactly $$f(x) = x + h\!\left(x - \tfrac{1}{2}\right),$$ where $h : \mathbb{R} \to \mathbb{R}$ is any even function.
Exercise. Plot the function $\displaystyle f(x) = \frac{2 x^3 - 3 x^2 + x - 6}{x^2 - 3 x + 2}$.
Solution.
Factor the denominator: $x^2 - 3x + 2 = (x-1)(x-2)$. Testing $x = 2$ in the numerator: $16 - 12 + 2 - 6 = 0$, so $x - 2$ divides the numerator: $$2 x^3 - 3 x^2 + x - 6 = (x - 2)(2 x^2 + x + 3).$$ Hence for $x \neq 2$, $$f(x) = \frac{2 x^2 + x + 3}{x - 1}.$$ The quadratic $2x^2 + x + 3$ has discriminant $1 - 24 \lt 0$, so it has no real roots and $f$ has no $x$-intercepts.
Polynomial division yields $$f(x) = 2 x + 3 + \frac{6}{x - 1}.$$ Key features:
- Removable discontinuity at $x = 2$: the factor $x - 2$ cancels, so $f$ extends by continuity with $f(2) = 13$ (a "hole" in the graph if we keep the original domain).
- Vertical asymptote $x = 1$: $f \to -\infty$ as $x \to 1^-$, $f \to +\infty$ as $x \to 1^+$.
- Oblique asymptote $y = 2 x + 3$.
- $y$-intercept: $f(0) = -3$.
Exercise. Show that $\displaystyle \lim_{x \to 0} \frac{\sin x}{x} = 1$.
Solution.
Recognize the limit as a derivative at $0$: $$\lim_{x \to 0} \frac{\sin x}{x} = \lim_{x \to 0} \frac{\sin x - \sin 0}{x - 0} = \sin'(0) = \cos(0) = 1.$$
Exercise. Compute $\displaystyle \lim_{x \to 0} \frac{\tan 3 x}{4 x}$.
Solution.
Write $\tan 3x = \frac{\sin 3x}{\cos 3x}$ and rearrange: $$\frac{\tan 3 x}{4 x} = \frac{\sin 3 x}{3 x} \cdot \frac{3 x}{4 x \cos 3 x}.$$ As $x \to 0$, $\frac{\sin 3x}{3x} \to 1$ and $\cos 3x \to 1$, so the limit is $\displaystyle 1 \cdot \frac{3}{4} = \mathbf{\frac{3}{4}}$.
Exercise. Show that $\displaystyle \lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^n = e$.
Solution.
Take the log: $$\ln\!\left(1 + \tfrac{1}{n}\right)^n = n \ln\!\left(1 + \tfrac{1}{n}\right) = \frac{\ln(1 + 1/n) - \ln 1}{1/n}.$$ As $n \to \infty$, $h = 1/n \to 0$, and this is the difference quotient for $\ln$ at $1$: $$\frac{\ln(1+h) - \ln 1}{h} \longrightarrow \ln'(1) = 1.$$ By continuity of $\exp$, $\displaystyle \left(1 + \tfrac{1}{n}\right)^n = e^{n \ln(1 + 1/n)} \longrightarrow e^1 = e$.
Exercise. I deposit one dollar in the bank at $100\%$ annual interest. If the interest is compounded once, after one year I have $2$ dollars. If it is compounded twice (every 6 months), I have $\left(1 + \tfrac{1}{2}\right) + \tfrac{1}{2}\left(1 + \tfrac{1}{2}\right)$ dollars. If the interest is compounded continuously (infinitely often), how much do I have after one year?
Solution.
With $n$ equal compounding periods, the balance after one year is $\left(1 + \tfrac{1}{n}\right)^n$. Letting $n \to \infty$ gives $\displaystyle \lim_{n \to \infty} \left(1 + \tfrac{1}{n}\right)^n = e \approx 2.718$ dollars.
Exercise. Compute $\displaystyle \lim_{x \to \infty} \left(1 + \frac{2}{x}\right)^{3 x}$.
Solution.
Let $u = x/2$, so $\frac{2}{x} = \frac{1}{u}$ and $3 x = 6 u$: $$\left(1 + \frac{2}{x}\right)^{3 x} = \left(1 + \frac{1}{u}\right)^{6 u} = \left(\left(1 + \frac{1}{u}\right)^{u}\right)^{6}.$$ As $x \to \infty$, $u \to \infty$, and $\left(1 + \frac{1}{u}\right)^u \to e$, so the limit is $\mathbf{e^6}$.
Exercise. Compute $\displaystyle \lim_{x \to -2} \frac{x^3 + 8}{x + 2}$.
Solution.
Factor using the sum of cubes: $x^3 + 8 = (x + 2)(x^2 - 2 x + 4)$, so for $x \neq -2$, $$\frac{x^3 + 8}{x + 2} = x^2 - 2 x + 4.$$ Taking $x \to -2$: $(-2)^2 - 2(-2) + 4 = \mathbf{12}$.
Exercise. Find the equations of the asymptotes of $\displaystyle f(x) = \frac{x^2 - x - 2}{x + 2}$.
Solution.
Polynomial division gives $$f(x) = x - 3 + \frac{4}{x + 2}.$$ As $x \to \pm \infty$, $\frac{4}{x+2} \to 0$, so the oblique asymptote is $\mathbf{y = x - 3}$. Since the numerator does not vanish at $x = -2$ (it equals $4$ there), $f$ also has a vertical asymptote at $\mathbf{x = -2}$.
Exercise. Compute $\displaystyle \lim_{x \to 0} \frac{1 - \cos x}{x}$.
Solution.
Recognize the negative of a difference quotient for $\cos$ at $0$: $$\lim_{x \to 0} \frac{1 - \cos x}{x} = -\lim_{x \to 0} \frac{\cos x - \cos 0}{x - 0} = -\cos'(0) = \sin(0) = \mathbf{0}.$$
Exercise. Find all asymptotes of $\displaystyle f(x) = \frac{x^3}{x^2 - 1}$.
Solution.
Polynomial division: $x^3 = x(x^2 - 1) + x$, so $$f(x) = x + \frac{x}{x^2 - 1}.$$ As $x \to \pm \infty$, $\frac{x}{x^2 - 1} \to 0$, giving the oblique asymptote $\mathbf{y = x}$.
The denominator $x^2 - 1 = (x-1)(x+1)$ vanishes at $x = \pm 1$ while the numerator does not, so there are vertical asymptotes at $\mathbf{x = 1}$ and $\mathbf{x = -1}$.
Exercise. Find all cube roots of $4 + 4 i \sqrt{3}$.
Solution.
Convert to polar form: $$|4 + 4 i \sqrt{3}| = \sqrt{16 + 48} = 8, \qquad \arg = \arctan(\sqrt{3}) = \frac{\pi}{3}.$$ So $4 + 4 i \sqrt{3} = 8 e^{i \pi / 3}$.
The three cube roots are $$w_k = 8^{1/3} \, e^{i(\pi/3 + 2 \pi k)/3} = 2 \, e^{i(\pi/9 + 2 \pi k / 3)}, \qquad k = 0, 1, 2.$$ Explicitly: $\displaystyle 2 e^{i \pi / 9}, \; 2 e^{i 7 \pi / 9}, \; 2 e^{i 13 \pi / 9}$.
Exercise. Express $\cos(3 \theta)$ in terms of $\cos \theta$.
Solution.
By De Moivre's theorem, $(\cos \theta + i \sin \theta)^3 = \cos(3\theta) + i \sin(3\theta)$. Expanding the left side: $$\cos^3 \theta + 3 i \cos^2 \theta \sin \theta - 3 \cos \theta \sin^2 \theta - i \sin^3 \theta.$$ Taking the real part and using $\sin^2 \theta = 1 - \cos^2 \theta$: $$\cos(3 \theta) = \cos^3 \theta - 3 \cos \theta (1 - \cos^2 \theta) = \mathbf{4 \cos^3 \theta - 3 \cos \theta}.$$
Exercise. Let $\omega$ be an $n$-th root of unity with $\omega \neq 1$. Show that $1 + \omega + \omega^2 + \cdots + \omega^{n-1} = 0$.
Solution.
This is a geometric series with ratio $\omega \neq 1$, so $$1 + \omega + \omega^2 + \cdots + \omega^{n-1} = \frac{1 - \omega^n}{1 - \omega}.$$ Since $\omega$ is an $n$-th root of unity, $\omega^n = 1$, so the numerator vanishes while the denominator $1 - \omega \neq 0$. Hence the sum is $\mathbf{0}$.
Exercise. Let $\omega$ be a root of $x^3 - 1$. Find the product $(1 - \omega + \omega^2)(1 + \omega - \omega^2)$.
Solution.
Case $\omega = 1$: the product is $(1)(1) = 1$.
Case $\omega \neq 1$ (a primitive cube root): then $1 + \omega + \omega^2 = 0$, so $\omega^2 = -1 - \omega$. Substituting, $$1 - \omega + \omega^2 = (1 + \omega + \omega^2) - 2\omega = -2\omega, \qquad 1 + \omega - \omega^2 = (1 + \omega + \omega^2) - 2\omega^2 = -2\omega^2.$$ Hence the product is $(-2\omega)(-2\omega^2) = 4\omega^3 = 4$ (using $\omega^3 = 1$).
Exercise. Find the product of the $n$-th roots of unity, using their complex form.
Solution.
The $n$-th roots of unity are $\omega_k = e^{2\pi i k / n}$ for $k = 0, 1, \ldots, n-1$. Their product is $$\prod_{k=0}^{n-1} e^{2\pi i k / n} = e^{\frac{2\pi i}{n} \sum_{k=0}^{n-1} k} = e^{\frac{2\pi i}{n} \cdot \frac{n(n-1)}{2}} = e^{\pi i (n-1)} = (-1)^{n+1}.$$ So the product is $1$ if $n$ is odd, and $-1$ if $n$ is even.
Exercise. Expand $(a + b + c)^3$ without multiplying out explicitly.
Solution.
By the multinomial theorem, $$(a + b + c)^3 = \sum_{i+j+k=3} \binom{3}{i,\,j,\,k} a^i b^j c^k, \qquad \binom{3}{i,\,j,\,k} = \frac{3!}{i!\,j!\,k!}.$$ Group the terms by the shape of $(i, j, k)$:
- $(3,0,0)$ and permutations: coefficient $\frac{3!}{3!} = 1$, giving $a^3 + b^3 + c^3$;
- $(2,1,0)$ and permutations: coefficient $\frac{3!}{2!\,1!} = 3$, giving $3(a^2 b + a^2 c + b^2 a + b^2 c + c^2 a + c^2 b)$;
- $(1,1,1)$: coefficient $\frac{3!}{1!\,1!\,1!} = 6$, giving $6abc$.
Hence $$(a + b + c)^3 = a^3 + b^3 + c^3 + 3(a^2 b + a^2 c + b^2 a + b^2 c + c^2 a + c^2 b) + 6abc.$$
Exercise. Find $x, y, z$ such that $x + y + z = 7$, $xy + yz + zx = -14$, and $xyz = -120$. How many solutions $(x, y, z)$ are there?
Solution.
The three quantities are the elementary symmetric sums of $x, y, z$, so by Vieta's formulas $x, y, z$ are the roots of $$t^3 - 7 t^2 - 14 t + 120 = 0.$$ By the rational root theorem, any rational root divides $120$. Testing $t = 5$: $125 - 175 - 70 + 120 = 0$, so $t = 5$ is a root. Factoring, $$t^3 - 7 t^2 - 14 t + 120 = (t - 5)(t^2 - 2 t - 24) = (t - 5)(t - 6)(t + 4).$$ Hence $\{x, y, z\} = \{5, 6, -4\}$. Since the three values are distinct and the system is symmetric, every ordering gives a valid solution, so there are $3! = \mathbf{6}$ ordered solutions $(x, y, z)$.
Exercise. Prove, using a polynomial in $c$, that $$\frac{1}{a(a-b)(a-c)} + \frac{1}{b(b-c)(b-a)} + \frac{1}{c(c-a)(c-b)} = \frac{1}{abc},$$ where $a, b, c$ are distinct and nonzero.
Solution.
Multiply both sides by the common denominator $L = abc\,(a-b)(a-c)(b-c)$, which is nonzero. The identity is then equivalent to $f(c) = 0$, where $$f(c) = bc(b-c) - ac(a-c) + ab(a-b) - (a-b)(a-c)(b-c).$$
Regard $a, b$ as fixed and $f$ as a polynomial in $c$. Each term is at most quadratic in $c$, so $\deg f \leq 2$. We check that $f$ vanishes at three distinct points:
- $f(0) = ab(a-b) - (a-b)\,a\,b = 0$;
- $f(a) = ab(b-a) + ab(a-b) = 0$ (the other two terms carry a factor $a-a$);
- $f(b) = -ab(a-b) + ab(a-b) = 0$ (the other two terms carry a factor $b-b$).
A polynomial of degree at most $2$ with three distinct roots $c = 0, a, b$ is identically zero. Hence $f \equiv 0$, and dividing back by $L$ gives the identity.
Exercise. Let $a, b, c$ be real numbers with $a^2 + b^2 + c^2 = 1$. Find the minimum value of $ab + bc + ca$.
Solution.
Since the square of a real number is non-negative, $$0 \leq (a + b + c)^2 = a^2 + b^2 + c^2 + 2(ab + bc + ca) = 1 + 2(ab + bc + ca),$$ so $ab + bc + ca \geq -\frac{1}{2}$.
Equality holds when $a + b + c = 0$ together with $a^2 + b^2 + c^2 = 1$, for instance $a = \frac{1}{\sqrt 2}$, $b = -\frac{1}{\sqrt 2}$, $c = 0$. So the minimum value is $\mathbf{-\frac{1}{2}}$.
Exercise. For what real values of $n$ does the system $$nx + y = 1, \qquad ny + z = 1, \qquad x + nz = 1$$ have no solution?
Solution.
The coefficient matrix is $$M = \begin{pmatrix} n & 1 & 0 \\ 0 & n & 1 \\ 1 & 0 & n \end{pmatrix}, \qquad \det M = n^3 + 1.$$ If $\det M \neq 0$ the system has a unique solution. When $\det M = 0$ the system is not guaranteed to be solvable: it has either no solution or infinitely many. So the only candidate for "no solution" is $n^3 + 1 = 0$, i.e. (over the reals) $n = -1$, and we must check which case occurs there.
For $n = -1$ the system is $$-x + y = 1, \qquad -y + z = 1, \qquad x - z = 1.$$ Adding the three equations, the left side is $(-x+y) + (-y+z) + (x-z) = 0$, while the right side is $3$. This gives $0 = 3$, a contradiction, so the system is inconsistent.
Hence the system has no solution exactly when $\mathbf{n = -1}$.
Exercise. Find the minimum value of $x^2 + 2x + 2$.
Solution.
Complete the square: $$x^2 + 2x + 2 = (x + 1)^2 + 1.$$ Since $(x+1)^2 \geq 0$, the expression is at least $1$, with equality at $x = -1$. So the minimum value is $\mathbf{1}$.
Exercise. (AM–GM inequality) For positive reals $a_1, \ldots, a_n$, the arithmetic mean is at least the geometric mean: $$\frac{a_1 + a_2 + \cdots + a_n}{n} \geq \sqrt[n]{a_1 a_2 \cdots a_n}.$$ Prove this.
Solution.
We use the single elementary fact that $e^{t} \geq 1 + t$ for all real $t$. To justify it, let $g(t) = e^t - 1 - t$. Then $g'(t) = e^t - 1$, which is negative for $t \lt 0$ and positive for $t \gt 0$, so $g$ is decreasing on $(-\infty, 0]$ and increasing on $[0, \infty)$. Thus $g$ attains its global minimum at $t = 0$, where $g(0) = 0$. Hence $g(t) \geq 0$, i.e. $e^t \geq 1 + t$, with equality only at $t = 0$. Replacing $t$ by $t - 1$, this reads $e^{\,t-1} \geq t$.
Let $A = \dfrac{a_1 + \cdots + a_n}{n}$ be the arithmetic mean. Apply the inequality with $t = \dfrac{a_i}{A}$ for each $i$: $$e^{\,a_i/A - 1} \geq \frac{a_i}{A}.$$ Multiplying these $n$ inequalities (all sides positive), $$\exp\!\left( \frac{a_1 + \cdots + a_n}{A} - n \right) \geq \frac{a_1 a_2 \cdots a_n}{A^n}.$$ Since $a_1 + \cdots + a_n = nA$, the exponent on the left is $n - n = 0$, so the left side is $e^0 = 1$. Hence $$a_1 a_2 \cdots a_n \leq A^n \implies \sqrt[n]{a_1 a_2 \cdots a_n} \leq A,$$ which is exactly the claim. Equality requires $e^{\,t-1} = t$ at each step, i.e. every $a_i/A = 1$, so all the $a_i$ are equal.
Exercise. Show that $x^2 + y^2 + z^2 \geq xy + yz + zx$ for all real $x, y, z$.
Solution.
Apply AM–GM to the non-negative pairs $x^2, y^2$ etc. For any two reals, $$\frac{x^2 + y^2}{2} \geq \sqrt{x^2 y^2} = |xy| \geq xy, \qquad\text{so}\qquad x^2 + y^2 \geq 2xy.$$ Likewise $y^2 + z^2 \geq 2yz$ and $z^2 + x^2 \geq 2zx$. Adding the three inequalities, $$2(x^2 + y^2 + z^2) \geq 2(xy + yz + zx),$$ hence $x^2 + y^2 + z^2 \geq xy + yz + zx$, with equality if and only if $x = y = z$.
Exercise. (Cauchy–Schwarz inequality) For real numbers $a_1, \ldots, a_n$ and $b_1, \ldots, b_n$, $$\left( \sum_{i=1}^{n} a_i b_i \right)^2 \leq \left( \sum_{i=1}^{n} a_i^2 \right) \left( \sum_{i=1}^{n} b_i^2 \right).$$ Prove this.
Solution.
If every $a_i = 0$ both sides are $0$ and the inequality holds. Otherwise $\sum a_i^2 \gt 0$, and we consider the function $$f(t) = \sum_{i=1}^{n} (a_i t + b_i)^2 = \left( \sum a_i^2 \right) t^2 + 2 \left( \sum a_i b_i \right) t + \left( \sum b_i^2 \right).$$ Being a sum of squares, $f(t) \geq 0$ for every real $t$. So this quadratic in $t$ (with positive leading coefficient) has at most one real root, which forces its discriminant to be $\leq 0$: $$\left( 2 \sum a_i b_i \right)^2 - 4 \left( \sum a_i^2 \right) \left( \sum b_i^2 \right) \leq 0.$$ Dividing by $4$ rearranges to $$\left( \sum a_i b_i \right)^2 \leq \left( \sum a_i^2 \right) \left( \sum b_i^2 \right),$$ which is the inequality. Equality holds iff $f$ has a real root, i.e. $a_i t + b_i = 0$ for all $i$ at some $t$, meaning the vectors $(a_i)$ and $(b_i)$ are proportional.
Exercise. Show that $\displaystyle 1^2 + 2^2 + \cdots + n^2 \geq \frac{\left( 1 + 2 + \cdots + n \right)^2}{n}$.
Solution.
Work backwards. Multiplying by $n \gt 0$, the claim is equivalent to $$n \left( 1^2 + 2^2 + \cdots + n^2 \right) \geq (1 + 2 + \cdots + n)^2.$$ Writing $n = 1^2 + 1^2 + \cdots + 1^2$, this reads $$\left( 1^2 + \cdots + n^2 \right)\left( 1^2 + \cdots + 1^2 \right) \geq (1\cdot 1 + \cdots + n \cdot 1)^2,$$ which is Cauchy–Schwarz with $a_k = k$, $b_k = 1$. As the steps are equivalences, the original holds.
Exercise. Given $xyz = 27$ with $x, y, z \geq 0$, find the minimum value of $x + y + z$.
Solution.
By AM–GM, $$\frac{x + y + z}{3} \geq \sqrt[3]{xyz} = \sqrt[3]{27} = 3,$$ so $x + y + z \geq 9$, with equality when $x = y = z = 3$. The minimum value is $\mathbf{9}$.
Exercise. With $96$ square meters of wrapping paper, what is the volume of the largest rectangular box you can fully cover?
Solution.
Let the box have edge lengths $x, y, z \gt 0$. Covering it uses paper equal to its surface area, so $$2(xy + yz + zx) = 96 \implies xy + yz + zx = 48.$$ We maximize the volume $V = xyz$. By AM–GM applied to the three positive numbers $xy, yz, zx$, $$\frac{xy + yz + zx}{3} \geq \sqrt[3]{(xy)(yz)(zx)} = \sqrt[3]{(xyz)^2},$$ so $16 \geq (xyz)^{2/3}$, giving $xyz \leq 16^{3/2} = 64$.
Equality holds when $xy = yz = zx$, i.e. $x = y = z$; then $6x^2 = 96$ gives $x = 4$ (a cube). The largest box has volume $\mathbf{64}$ cubic meters.
Exercise. Let $x$ and $y$ be real numbers with $x + y = 4$. Find the maximum value of $\min(x, y)$.
Solution.
Method 1 (average bound): Since the smaller of two numbers is at most their average, $$\min(x, y) \leq \frac{x + y}{2} = 2,$$ with equality precisely when $x = y$, i.e. $x = y = 2$. So the maximum value of $\min(x, y)$ is $\mathbf{2}$.
Method 2 (order the variables): Without loss of generality, assume $x \geq y$, so $\min(x, y) = y$. Then $x + y \geq 2y$, i.e. $4 \geq 2y$, giving $y \leq 2$. So $\min(x, y) \leq 2$, with equality when $x = y = 2$, and the maximum is $\mathbf{2}$.
Exercise. (RMS–AM inequality) For real numbers $a_1, \ldots, a_n$, show that the root mean square is at least the arithmetic mean: $$\sqrt{\frac{a_1^2 + a_2^2 + \cdots + a_n^2}{n}} \geq \frac{a_1 + a_2 + \cdots + a_n}{n}.$$
Solution.
By the Cauchy–Schwarz inequality with $b_i = 1$ for all $i$, $$\left( \sum_{i=1}^{n} a_i \right)^2 = \left( \sum_{i=1}^{n} a_i \cdot 1 \right)^2 \leq \left( \sum_{i=1}^{n} a_i^2 \right) \left( \sum_{i=1}^{n} 1^2 \right) = n \sum_{i=1}^{n} a_i^2.$$ Dividing by $n^2$ gives $$\left( \frac{a_1 + \cdots + a_n}{n} \right)^2 \leq \frac{a_1^2 + \cdots + a_n^2}{n}.$$ The right-hand side is non-negative, so taking square roots, $$\frac{a_1 + \cdots + a_n}{n} \leq \left| \frac{a_1 + \cdots + a_n}{n} \right| \leq \sqrt{\frac{a_1^2 + \cdots + a_n^2}{n}},$$ which is the claim. Equality requires the Cauchy–Schwarz vectors to be proportional, i.e. all the $a_i$ equal, and the arithmetic mean to be non-negative.
Exercise. (GM–HM inequality) For positive reals $a_1, \ldots, a_n$, show that the geometric mean is at least the harmonic mean: $$\sqrt[n]{a_1 a_2 \cdots a_n} \geq \frac{n}{\frac{1}{a_1} + \frac{1}{a_2} + \cdots + \frac{1}{a_n}}.$$
Solution.
Apply AM–GM to the positive reals $\frac{1}{a_1}, \ldots, \frac{1}{a_n}$: $$\frac{\frac{1}{a_1} + \cdots + \frac{1}{a_n}}{n} \geq \sqrt[n]{\frac{1}{a_1} \cdots \frac{1}{a_n}} = \frac{1}{\sqrt[n]{a_1 \cdots a_n}}.$$ Both sides are positive, so taking reciprocals reverses the inequality: $$\frac{n}{\frac{1}{a_1} + \cdots + \frac{1}{a_n}} \leq \sqrt[n]{a_1 \cdots a_n},$$ which is exactly $\mathrm{HM} \leq \mathrm{GM}$. Equality holds iff all the $\frac{1}{a_i}$ are equal, i.e. all the $a_i$ are equal.
Exercise. Let $x, y$ be real numbers with $x^2 + y^2 = 1$. Find the maximum value of $(x + y)^2$, and the values of $x, y$ where it is attained.
Solution.
Method 1 (AM–GM): Expand using the constraint: $$(x + y)^2 = x^2 + 2xy + y^2 = 1 + 2xy.$$ Since $x^2 + y^2 \geq 2xy$ for all reals (it rearranges to $(x - y)^2 \geq 0$), we have $2xy \leq x^2 + y^2 = 1$, so $$(x + y)^2 = 1 + 2xy \leq 2.$$ Equality requires $x = y$; combined with $x^2 + y^2 = 1$ this gives $x = y = \pm\frac{1}{\sqrt 2}$. The maximum value is $\mathbf{2}$.
Method 2 (trigonometry): Since $x^2 + y^2 = 1$, write $x = \cos\theta$, $y = \sin\theta$. Then $$(x + y)^2 = (\cos\theta + \sin\theta)^2 = 1 + 2\sin\theta\cos\theta = 1 + \sin 2\theta.$$ Since $\sin 2\theta \leq 1$, we get $(x + y)^2 \leq 2$, with equality when $\sin 2\theta = 1$, i.e. $\theta = \frac{\pi}{4}$ (so $x = y = \frac{1}{\sqrt 2}$) or $\theta = \frac{5\pi}{4}$ (so $x = y = -\frac{1}{\sqrt 2}$). The maximum value is $\mathbf{2}$.
Exercise. Let $x, y, z$ be positive reals with $xyz = 1$. Show that $\min(x + y, \, x + z, \, y + z)$ has no maximum value.
Solution.
It suffices to exhibit a family of valid $(x, y, z)$ on which the minimum grows without bound. For a parameter $n \gt 1$, take $$x = y = n, \qquad z = \frac{1}{n^2},$$ which is positive and satisfies $xyz = n \cdot n \cdot \frac{1}{n^2} = 1$.
The three pairwise sums are $$x + y = 2n, \qquad x + z = y + z = n + \frac{1}{n^2}.$$ For $n \gt 1$ we have $\frac{1}{n^2} \lt n$, so $n + \frac{1}{n^2} \lt 2n$, and therefore $$\min(x + y, \, x + z, \, y + z) = n + \frac{1}{n^2} \gt n.$$ As $n \to \infty$ this exceeds any fixed bound, so $\min(x + y, x + z, y + z)$ is unbounded above and has no maximum.
Exercise. Let $x, y, z$ be positive reals with $xyz = 1$. Show that $\min\big(\max(x + y, \, x + z, \, y + z)\big) = 2$, where the minimum is taken over all such triples.
Solution.
Method 1 (sum of the pairwise sums): Write $M = \max(x + y, \, x + z, \, y + z)$. Each of the three pairwise sums is at most $M$, and adding them gives $$2(x + y + z) = (x + y) + (x + z) + (y + z) \leq 3M,$$ so $M \geq \frac{2}{3}(x + y + z)$.
By AM–GM, $x + y + z \geq 3\sqrt[3]{xyz} = 3$, hence $$M \geq \frac{2}{3} \cdot 3 = 2.$$ So no triple makes the maximum smaller than $2$. The value $2$ is attained at $x = y = z = 1$ (where $xyz = 1$ and all three pairwise sums equal $2$), so the minimum of $\max(x + y, x + z, y + z)$ is exactly $\mathbf{2}$.
Method 2 (order the variables): Without loss of generality, assume $x \leq y \leq z$. Then the largest pairwise sum is the sum of the two largest variables, so $M = y + z$.
Since $x$ is the smallest, $x \leq 1$: otherwise $x \gt 1$ would force $y, z \gt 1$ as well, giving $xyz \gt 1$, a contradiction. By AM–GM, $x + y + z \geq 3\sqrt[3]{xyz} = 3$, so $$M = y + z = (x + y + z) - x \geq 3 - x \geq 2,$$ with equality at $x = y = z = 1$. Hence the minimum is $\mathbf{2}$.
Exercise. Let $x, y, z$ be positive reals with $x + y + z = 3$. Find $\max\big(\min(xy, \, xz, \, yz)\big)$, the maximum over all such triples of the smallest pairwise product.
Solution.
Without loss of generality, assume $x \leq y \leq z$. Then the smallest pairwise product is that of the two smallest variables, so $\min(xy, xz, yz) = xy$.
Since $z$ is the largest, $z \geq 1$ (the largest of three numbers averaging $1$), so $x + y = 3 - z \leq 2$. By AM–GM, $$xy \leq \left(\frac{x + y}{2}\right)^2 \leq 1,$$ with equality at $x = y = z = 1$. Hence the maximum is $\mathbf{1}$.
Exercise. For non-negative reals $a, b$, show that $$\frac{(a + b)^2}{2} \geq \sqrt{2ab(a^2 + b^2)}.$$
Solution.
Apply AM–GM to the two non-negative numbers $2ab$ and $a^2 + b^2$: $$\sqrt{2ab(a^2 + b^2)} \leq \frac{2ab + (a^2 + b^2)}{2} = \frac{(a + b)^2}{2},$$ which is the claim. Equality holds when $2ab = a^2 + b^2$, i.e. $a = b$.
Exercise. Let $r_1, r_2, \ldots, r_n \geq 0$ and let $x \gt 0$. Prove that $$(x + r_1)(x + r_2) \cdots (x + r_n) \leq \left(x + \frac{r_1 + r_2 + \cdots + r_n}{n}\right)^n.$$
Solution.
The $n$ numbers $x + r_1, \ldots, x + r_n$ are positive, so AM–GM applies: $$\sqrt[n]{(x + r_1)(x + r_2) \cdots (x + r_n)} \leq \frac{(x + r_1) + (x + r_2) + \cdots + (x + r_n)}{n} = x + \frac{r_1 + \cdots + r_n}{n}.$$ Raising both sides to the $n$-th power gives the claim. Equality holds when all the $x + r_i$ are equal, i.e. all the $r_i$ are equal.
Exercise. The polynomial $x^3 - 12x^2 + ax - 64$ has three real, non-negative roots. Find $a$.
Solution.
Let the roots be $p, q, r \geq 0$. By Vieta's formulas, $$p + q + r = 12, \qquad pq + qr + rp = a, \qquad pqr = 64.$$ By AM–GM, $$\frac{p + q + r}{3} \geq \sqrt[3]{pqr} \quad\Longrightarrow\quad 4 \geq \sqrt[3]{64} = 4.$$ Equality holds, which forces $p = q = r = 4$. Therefore $$a = pq + qr + rp = 3 \cdot 16 = \mathbf{48}.$$
Exercise. Prove that $\sqrt{n} \leq \sqrt[n]{n!}$ for every positive integer $n$.
Solution.
Raising both sides to the $2n$-th power, the claim is equivalent to $n^n \leq (n!)^2$. Write $$(n!)^2 = \prod_{k=1}^{n} k \cdot \prod_{k=1}^{n} (n + 1 - k) = \prod_{k=1}^{n} k(n + 1 - k),$$ where the second product just runs over the same factors in reverse order. For each $k$ with $1 \leq k \leq n$, $$k(n + 1 - k) - n = (k - 1)(n - k) \geq 0,$$ so $k(n + 1 - k) \geq n$. Multiplying these $n$ inequalities gives $(n!)^2 \geq n^n$, which is the claim.
Exercise. Prove that $\binom{n}{k}\binom{k}{m} = \binom{n}{m}\binom{n - m}{k - m}$ for integers $0 \leq m \leq k \leq n$. (Combinatorial proof.)
Solution.
Count pairs $(A, B)$ with $A \subseteq B \subseteq \{1, \ldots, n\}$, $|B| = k$, $|A| = m$ in two ways.
Picking $B$ then $A$: $\binom{n}{k}$ ways for $B$, then $\binom{k}{m}$ for $A$ inside $B$.
Picking $A$ then $B$: $\binom{n}{m}$ ways for $A$, then $\binom{n - m}{k - m}$ for the remaining elements of $B$, chosen from outside $A$.
Exercise. Prove that $\sum_{k=0}^{n} k\binom{n}{k} = n \cdot 2^{n-1}$.
Solution.
Let $S = \sum_{k=0}^{n} k\binom{n}{k}$. Using $\binom{n}{k} = \binom{n}{n-k}$ and reindexing, write the same sum in reverse: $$S = \sum_{k=0}^{n} (n - k)\binom{n}{n - k} = \sum_{k=0}^{n} (n - k)\binom{n}{k}.$$ Adding the two expressions for $S$, $$2S = \sum_{k=0}^{n} \big(k + (n - k)\big)\binom{n}{k} = n \sum_{k=0}^{n} \binom{n}{k} = n \cdot 2^n,$$ so $S = n \cdot 2^{n-1}$.
Exercise. Prove that $\sum_{k=0}^{n} \binom{n}{k}^2 = \binom{2n}{n}$.
Solution.
Count the ways to choose an $n$-element committee from a group of $n$ men and $n$ women, which is $\binom{2n}{n}$.
Split by the number $k$ of men chosen: pick $k$ of the $n$ men in $\binom{n}{k}$ ways and $n - k$ of the $n$ women in $\binom{n}{n - k} = \binom{n}{k}$ ways, giving $\binom{n}{k}^2$ committees. Summing over $k$ from $0$ to $n$ counts every committee once, so $\sum_{k=0}^{n} \binom{n}{k}^2 = \binom{2n}{n}$.
Exercise. Find the constant term in the expansion of $\left(x^2 + \frac{1}{x}\right)^6$.
Solution.
The general term is $$\binom{6}{k}(x^2)^{6 - k}\left(\frac{1}{x}\right)^k = \binom{6}{k} x^{12 - 3k}.$$ The exponent vanishes when $12 - 3k = 0$, i.e. $k = 4$, giving the constant term $\binom{6}{4} = \mathbf{15}$.
Exercise. Find the coefficient of $x^2 y^3 z w^4$ in the expansion of $(x + y + z + w)^{10}$.
Solution.
The exponents $2 + 3 + 1 + 4 = 10$ match the power, so the coefficient is the multinomial coefficient $$\binom{10}{2,\,3,\,1,\,4} = \frac{10!}{2!\,3!\,1!\,4!} = \mathbf{12600}.$$
Exercise. Write the expansion of $(x + y + z)^n$ in sigma notation.
Solution.
$$(x + y + z)^n = \sum_{\substack{i + j + k = n \\ i,\, j,\, k \geq 0}} \frac{n!}{i!\,j!\,k!}\, x^i y^j z^k,$$ where the sum runs over all non-negative integer triples $(i, j, k)$ with $i + j + k = n$.
Exercise. Prove that $\sum_{k=0}^{n} \binom{n}{k}\binom{m}{k} = \binom{n + m}{n}$.
Solution.
Count the $m$-element subsets of an $(n + m)$-element set partitioned into a part $X$ of size $n$ and a part $Y$ of size $m$. There are $\binom{n + m}{m} = \binom{n + m}{n}$ of them.
Split by the number $k$ of elements taken from $X$: pick $k$ from $X$ in $\binom{n}{k}$ ways and the remaining $m - k$ from $Y$ in $\binom{m}{m - k} = \binom{m}{k}$ ways, giving $\binom{n}{k}\binom{m}{k}$ subsets. Summing over $k$ counts every $m$-subset once.
Exercise. Evaluate $\displaystyle\sum_{i=1}^{10} \sum_{k=1}^{i} \binom{i}{k}$.
Solution.
The inner sum is $\sum_{k=1}^{i} \binom{i}{k} = 2^i - \binom{i}{0} = 2^i - 1$. Therefore $$\sum_{i=1}^{10} (2^i - 1) = \sum_{i=1}^{10} 2^i - 10 = (2^{11} - 2) - 10 = 2046 - 10 = \mathbf{2036}.$$
Exercise. Prove that $$\binom{n - 1}{0} + \binom{n}{1} + \binom{n + 1}{2} + \cdots + \binom{n + k}{k + 1} = \binom{n + k + 1}{k + 1}.$$
Solution.
Start from the right-hand side and repeatedly apply Pascal's rule $\binom{m}{j} = \binom{m - 1}{j} + \binom{m - 1}{j - 1}$, each time splitting off one term of the sum: $$\binom{n + k + 1}{k + 1} = \binom{n + k}{k + 1} + \binom{n + k}{k} = \binom{n + k}{k + 1} + \binom{n + k - 1}{k} + \binom{n + k - 1}{k - 1} = \cdots$$ Splitting the rightmost binomial each step peels off the terms $\binom{n + k}{k + 1}, \binom{n + k - 1}{k}, \ldots, \binom{n}{1}$ in turn, and the last remainder is $\binom{n}{0} = \binom{n - 1}{0}$. Collecting these is exactly the left-hand side.
Alternative proof by counting subsets. The right-hand side $\binom{n + k + 1}{k + 1} = \binom{n + k + 1}{n}$ counts the $n$-element subsets of $\{1, 2, \ldots, n + k + 1\}$. Classify each subset by its largest element $m$: the other $n - 1$ elements lie in $\{1, \ldots, m - 1\}$, giving $\binom{m - 1}{n - 1}$ subsets, and $m$ ranges from $n$ to $n + k + 1$. Writing $m = n + j$ for $j = 0, \ldots, k + 1$, this term is $\binom{n - 1 + j}{n - 1} = \binom{n - 1 + j}{j}$, the $j$-th term of the left-hand side. Summing over $m$ counts every subset once.
Exercise. Find the sum of all coefficients in the expansion of $(a + b + c + d)^{10}$.
Solution.
The sum of the coefficients is the value of the expansion at $a = b = c = d = 1$, namely $(1 + 1 + 1 + 1)^{10} = \mathbf{4^{10}}$.
Exercise. Evaluate $\binom{n}{1} + 3\binom{n}{3} + 5\binom{n}{5} + \cdots$ for $n \geq 2$.
Solution.
The sum is $\sum_{k \text{ odd}} k\binom{n}{k}$. Using the absorption identity $k\binom{n}{k} = n\binom{n - 1}{k - 1}$, $$\sum_{k \text{ odd}} k\binom{n}{k} = n \sum_{k \text{ odd}} \binom{n - 1}{k - 1} = n \sum_{j \text{ even}} \binom{n - 1}{j}.$$ The even-indexed binomial coefficients of any positive integer $m$ sum to $2^{m - 1}$; with $m = n - 1$ this gives $\mathbf{n \cdot 2^{n-2}}$.
Alternative proof. Let $S_{\text{odd}} = \sum_{k \text{ odd}} k\binom{n}{k}$ and $S_{\text{even}} = \sum_{k \text{ even}} k\binom{n}{k}$. From the earlier identity $\sum_{k} k\binom{n}{k} = n \cdot 2^{n-1}$, $$S_{\text{odd}} + S_{\text{even}} = n \cdot 2^{n-1}.$$ For the difference, use $k\binom{n}{k} = n\binom{n - 1}{k - 1}$: $$S_{\text{even}} - S_{\text{odd}} = \sum_{k} (-1)^k\, k\binom{n}{k} = n \sum_{k} (-1)^k \binom{n - 1}{k - 1} = -n\,(1 - 1)^{n-1} = 0$$ for $n \geq 2$. Hence $S_{\text{odd}} = S_{\text{even}}$, and adding the two relations gives $S_{\text{odd}} = n \cdot 2^{n-2}$.
Exercise. Evaluate $\displaystyle\sum_{k=1}^{n} \binom{n}{k}\binom{n}{k - 1}$.
Solution.
Count the $(n + 1)$-element subsets of a set split into two parts $X$ and $Y$ of size $n$ each, of which there are $\binom{2n}{n + 1}$. Splitting by the number $k$ of elements taken from $X$: pick $k$ from $X$ in $\binom{n}{k}$ ways and the remaining $n + 1 - k$ from $Y$ in $\binom{n}{n + 1 - k} = \binom{n}{k - 1}$ ways. Summing over $k$ gives $$\sum_{k=1}^{n} \binom{n}{k}\binom{n}{k - 1} = \binom{2n}{n + 1}.$$
Exercise. Prove that $\displaystyle\sum_{k=0}^{m} \binom{n}{k}\binom{n - k}{m - k} = 2^m \binom{n}{m}$ for $m \leq n$.
Solution.
Both sides count the pairs $(A, B)$ with $A \subseteq B \subseteq \{1, \ldots, n\}$ and $|B| = m$.
Picking $A$ then $B$: choose $A$ of size $k$ in $\binom{n}{k}$ ways, then the remaining $m - k$ elements of $B$ from the $n - k$ elements outside $A$ in $\binom{n - k}{m - k}$ ways. Summing over $k = 0, \ldots, m$ gives the left-hand side.
Picking $B$ then $A$: choose the $m$-element set $B$ in $\binom{n}{m}$ ways, then any subset $A \subseteq B$ in $2^m$ ways, giving the right-hand side.
Exercise. Find $\displaystyle\sum_{k=1}^{n} k^2$ using the identity $k^2 = k(k - 1) + k$.
Solution.
Split the sum with $k^2 = k(k - 1) + k$: $$\sum_{k=1}^{n} k^2 = \sum_{k=1}^{n} k(k - 1) + \sum_{k=1}^{n} k.$$ Since $k(k - 1) = 2\binom{k}{2}$, the hockey-stick identity $\sum_{i=r}^{n} \binom{i}{r} = \binom{n + 1}{r + 1}$ gives $\sum_{k=1}^{n} k(k - 1) = 2\sum_{k=1}^{n} \binom{k}{2} = 2\binom{n + 1}{3}$, and $\sum_{k=1}^{n} k = \binom{n + 1}{2}$. Therefore $$\sum_{k=1}^{n} k^2 = 2\binom{n + 1}{3} + \binom{n + 1}{2} = \frac{n(n + 1)(2n + 1)}{6}.$$
Exercise. Find the partial fraction decomposition of $\dfrac{2x - 1}{x^2 - 4x + 3}$.
Solution.
Factor the denominator as $x^2 - 4x + 3 = (x - 1)(x - 3)$ and write $$\frac{2x - 1}{(x - 1)(x - 3)} = \frac{A}{x - 1} + \frac{B}{x - 3}, \qquad 2x - 1 = A(x - 3) + B(x - 1).$$ Setting $x = 1$ gives $1 = -2A$, so $A = -\frac{1}{2}$; setting $x = 3$ gives $5 = 2B$, so $B = \frac{5}{2}$. Therefore $$\frac{2x - 1}{x^2 - 4x + 3} = -\frac{1}{2(x - 1)} + \frac{5}{2(x - 3)}.$$
Exercise. Determine whether $\sum_{n=1}^{\infty} \dfrac{n}{(n+1)(n+2)}$ converges.
Solution.
Write $n = (n+1) - 1$ in the numerator: $$\frac{n}{(n+1)(n+2)} = \frac{(n+1) - 1}{(n+1)(n+2)} = \frac{1}{n+2} - \frac{1}{(n+1)(n+2)}.$$ The second piece telescopes: $\dfrac{1}{(n+1)(n+2)} = \dfrac{1}{n+1} - \dfrac{1}{n+2}$, so $\displaystyle\sum_{n=1}^{\infty} \frac{1}{(n+1)(n+2)} = \frac{1}{2}$ converges. The first piece $\displaystyle\sum_{n=1}^{\infty} \frac{1}{n+2}$ is a tail of the harmonic series, which diverges. A convergent series minus a divergent one diverges, so the sum diverges.
Exercise. Find $\sum_{n=1}^{\infty} \dfrac{2n}{3^{n+1}}$.
Solution.
Let $S = \displaystyle\sum_{n=1}^{\infty} \frac{2n}{3^{n+1}}$ and subtract a shifted copy: $$S = \frac{2}{3^2} + \frac{4}{3^3} + \frac{6}{3^4} + \cdots, \qquad \frac{S}{3} = \frac{2}{3^3} + \frac{4}{3^4} + \cdots.$$ Subtracting term by term, each numerator difference is $2$: $$S - \frac{S}{3} = \frac{2}{3^2} + \frac{2}{3^3} + \frac{2}{3^4} + \cdots = 2\sum_{k=2}^{\infty} \frac{1}{3^k} = 2 \cdot \frac{1/9}{1 - 1/3} = \frac{1}{3}.$$ Thus $\dfrac{2}{3}S = \dfrac{1}{3}$, giving $S = \dfrac{1}{2}$.
Exercise. Let $n$ be a multiple of $4$. Evaluate $1 + 2i + 3i^2 + \cdots + (n+1)i^n$, where $i^2 = -1$.
Solution.
The powers of $i$ repeat with period $4$: $i^0 = 1$, $i^1 = i$, $i^2 = -1$, $i^3 = -i$. Group the terms into blocks of four starting at $k = 4m$. Using $i^{4m} = 1$, the block is $$(4m+1) + (4m+2)i - (4m+3) - (4m+4)i = -2 - 2i,$$ the same constant for every block. Since $n$ is a multiple of $4$, the terms $k = 0, \ldots, n-1$ form exactly $\frac{n}{4}$ complete blocks, leaving the final term $(n+1)i^n = n+1$. Therefore $$S = \frac{n}{4}(-2 - 2i) + (n+1) = \frac{(n+2) - ni}{2}.$$
Exercise. Let $a_1 = 2$ and $a_{n+1} = a_n + 2n$. Find $a_{100}$.
Solution.
Summing the recurrence from $1$ to $n-1$ telescopes: $$a_n = a_1 + \sum_{k=1}^{n-1} 2k = 2 + (n-1)n = n^2 - n + 2.$$ Hence $a_{100} = 100^2 - 100 + 2 = 9902$.
Exercise. In how many ways can we buy $n$ items chosen from $r$ types, where any number of each type may be taken (order does not matter)?
Solution.
A purchase is determined by how many of each type we take: nonnegative integers $x_1, x_2, \ldots, x_r$ with $$x_1 + x_2 + \cdots + x_r = n.$$ Encode such a solution as a row of $n$ stars and $r - 1$ bars: the stars before the first bar give $x_1$, those between the first and second bar give $x_2$, and so on. Every arrangement of $n$ stars and $r - 1$ bars corresponds to exactly one solution and vice versa. There are $n + r - 1$ symbols, and a purchase is fixed by choosing which $r - 1$ of them are bars, so the number of ways is $$\binom{n + r - 1}{r - 1} = \binom{n + r - 1}{n}.$$
Exercise. How many solutions does $x_1 + x_2 + \cdots + x_r = n$ have in nonnegative integers $x_i$?
Solution.
Represent a solution by $n$ stars split into $r$ groups by $r - 1$ bars, where the number of stars in the $i$-th group is $x_i$: $$\underbrace{\star\cdots\star}_{x_1}\;\big|\;\underbrace{\star\cdots\star}_{x_2}\;\big|\;\cdots\;\big|\;\underbrace{\star\cdots\star}_{x_r}.$$ Each arrangement of the $n + r - 1$ symbols gives exactly one solution, so the count is the number of ways to place the $r - 1$ bars among the $n + r - 1$ positions: $$\binom{n + r - 1}{r - 1} = \binom{n + r - 1}{n}.$$
Exercise. In how many ways can $5$ people be seated in a row of $20$ chairs so that no two of them sit next to each other?
Solution.
First choose the $5$ occupied chairs so that no two are adjacent, then seat the $5$ distinct people in them. Line up the $15$ empty chairs; they create $16$ gaps (one before each empty chair, one after the last) into which the occupied chairs may be inserted. Choosing $5$ of these gaps, at most one per gap, guarantees no two occupied chairs are adjacent, so there are $\binom{16}{5}$ valid sets of chairs. The $5$ people can then be arranged in $5!$ ways, giving $$\binom{16}{5}\cdot 5!.$$