Problem (Geometry):
Let $A_{1} A_{2} A_{3} A_{4} A_{5} A_{6} A_{7} A_{8}$ be a regular octagon. Let $\mathbf{u}$ be the vector from $A_{1}$ to $A_{2}$ and let $\mathbf{v}$ be the vector from $A_{1}$ to $A_{8}$. The vector from $A_{1}$ to $A_{4}$ can be written as $a \mathbf{u}+b \mathbf{v}$ for a unique ordered pair of real numbers $(a, b)$. Compute $(a, b)$.

Solution:
We can scale the octagon so that $A_{1} A_{2}=\sqrt{2}$. Because the exterior angle of the octagon is $45^{\circ}$, we can place the octagon in the coordinate plane with $A_{1}$ being the origin, $A_{2}=(\sqrt{2}, 0)$, and $A_{8}=(1,1)$.



Then $A_{3}=(1+\sqrt{2}, 1)$ and $A_{4}=(1+\sqrt{2}, 1+\sqrt{2})$. It follows that $\mathbf{u}=\langle\sqrt{2}, 0\rangle, \mathbf{v}=\langle-1,1\rangle$, and

$$
\overrightarrow{A_{1} A_{4}}=\langle 1+\sqrt{2}, 1+\sqrt{2}\rangle=a\langle\sqrt{2}, 0\rangle+b\langle-1,1\rangle=\langle a \sqrt{2}-b, b\rangle .
$$

Thus $b=\sqrt{2}+1$ and $a \sqrt{2}-b=\sqrt{2}+1$, or $a=2+\sqrt{2}$, so $(a, b)=(2+\sqrt{2}, \sqrt{2}+1)$.

Extend $\overline{A_{1} A_{2}}$ and $\overline{A_{5} A_{4}}$ to meet at point $Q$; let $P$ be the intersection of $\widehat{A_{1} Q}$ and $\overleftrightarrow{A_{6} A_{3}}$. Then $A_{1} A_{2}=\|\mathbf{u}\|, A_{2} P=\|\mathbf{u}\| \sqrt{2}$, and $P Q=\|\mathbf{u}\|$, so $A_{1} Q=(2+\sqrt{2})\|\mathbf{u}\|$.



Because $A_{1} Q A_{4}$ is a $45^{\circ}-45^{\circ}-90^{\circ}$ right triangle, $A_{4} Q=\frac{A_{1} Q}{\sqrt{2}}=(\sqrt{2}+1)\|\mathbf{u}\|$. Thus $\overrightarrow{A_{1} A_{4}}=\overrightarrow{A_{1} Q}+\overrightarrow{Q A_{4}}$, and because $\|\mathbf{u}\|=\|\mathbf{v}\|$, we have $(a, b)=(2+\sqrt{2}, \sqrt{2}+\mathbf{1})$.

Final answer: $\quad(2+\sqrt{2}, 1+\sqrt{2})$