Let $a$ and $b$ be angles such that
\[\cos (a + b) = \cos a + \cos b.\]Find the maximum value of $\cos a.$
From $\cos (a + b) = \cos a + \cos b,$ $\cos a = \cos (a + b) - \cos b.$  Then from sum-to-product,
\[\cos (a + b) - \cos b = -2 \sin \frac{a + 2b}{2} \sin \frac{a}{2}.\]Let $k = \sin \frac{a + 2b}{2},$ so
\[\cos a = -2k \sin \frac{a}{2}.\]Then
\[\cos^2 a = 4k^2 \sin^2 \frac{a}{2} = 4k^2 \cdot \frac{1}{2} (1 - \cos a) = 2k^2 (1 - \cos a),\]so
\[\frac{\cos^2 a}{1 - \cos a} = 2k^2 \le 2.\]Then $\cos^2 a \le 2 - 2 \cos a,$ so
\[\cos^2 a + 2 \cos a + 1 \le 3.\]This means $(\cos a + 1)^2 \le 3,$ so $\cos a + 1 \le \sqrt{3},$ or $\cos a \le \sqrt{3} - 1.$

Equality occurs if we take $a = \arccos (\sqrt{3} - 1)$ and $b = \frac{3 \pi - a}{2}$ (which will make $k = \sin \frac{a + 2b}{2} = -1$), so the maximum value of $\cos a$ is $\boxed{\sqrt{3} - 1}.$
\sqrt{3}-1
Level 5
Precalculus
Problem: Let $a$ and $b$ be angles such that
\[\cos (a + b) = \cos a + \cos b.\]Find the maximum value of $\cos a.$
Solution:<|START_OF_LATENT|><|PRIOR_PREFIX|>To solve the equation \(\cos (a + b) = \cos a + \cos b\), we can use the cosine addition formula, which states that \(\cos (a + b) = \cos a \cos b - \sin a \sin b\). By substituting this into the equation, we have:

\[
\cos a \cos b - \sin a \sin b = \cos a + \cos b.
\]

Rearranging gives:

\[
\cos a \cos b - \cos a - \cos b - \sin a \sin b = 0.
\]

Factoring out \(\cos a\) from the first two terms yields:

\[
\cos a (\cos b - 1) - \cos b - \sin a \sin b = 0.
\]

This can be rearranged to isolate \(\cos a\):

\[
\cos a (\cos b - 1) = \cos b + \sin a \sin b.
\]

Next, we analyze the implications of this equation. If \(\cos b - 1 = 0\), then \(\cos b = 1\) implies \(b = 0\) or multiples of \(2\pi\). In this case, the equation simplifies to \(\cos (a + 0) = \cos a\), which is trivially true for all \(a\). 

Now, consider the case when \(\cos b \neq 1\). We can express \(\cos a\) as:

\[
\cos a = \frac{\cos b + \sin a \sin b}{\cos b - 1}.
\]

To maximize \(\cos a\), we need to analyze the right-hand side. The term \(\sin a \sin b\) can be bounded since \(\sin a\) and \(\sin b\) both range from -1 to 1. Thus, we can express the maximum value of \(\cos a\) in terms of \(\cos b\).

To find the maximum value of \(\cos a\), we can set \(b\) to specific values. If we let \(b = \frac{\pi}{3}\), then \(\cos b = \frac{1}{2}\) and \(\sin b = \frac{\sqrt{3}}{2}\). Substituting these values gives:

\[
\cos a = \frac{\frac{1}{2} + \sin a \cdot \frac{\sqrt{3}}{2}}{\frac{1}{2} - 1} = \frac{\frac{1}{2} + \frac{\sqrt{3}}{2} \sin a}{-\frac{1}{2}} = -1 - \sqrt{3} \sin a.
\]

To maximize \(\cos a\), we minimize \(\sin a\). The minimum value of \(\sin a\) is -1, leading to:

\[
\cos a = -1 + \sqrt{3} = \sqrt{3} - 1.
\]

Thus, the maximum value of \(\cos a\) is \(\sqrt{3} - 1\).<|END_OF_LATENT|> The final answer is $\sqrt{3}-1$.