9. Given $\cos (\alpha+\beta)=\cos \alpha+\cos \beta$, find the maximum value of $\cos \alpha$.

Translate the above text into English, please keep the original text's line breaks and format, and output the translation result directly.
From the given, we have: $\cos \alpha \cos \beta-\sin \alpha \sin \beta=\cos \alpha+\cos \beta$, then
$$
(\cos \alpha-1) \cos \beta-\sin \alpha \sin \beta-\cos \alpha=0
$$
4 points
Let point $P(\cos \beta, \sin \beta)$, line $l:(\cos \alpha-1) x-\sin \alpha y-\cos \alpha=0$, then the trajectory equation of point $P$ is the unit circle:
$$
x^{2}+y^{2}=1 \text {, and } P \in l
$$

Thus, the distance from the center $O(0,0)$ to the line $l$ is
$$
d=\frac{|-\cos \alpha|}{\sqrt{(\cos \alpha-1)^{2}+(-\sin \alpha)^{2}}} \leq 1
$$
12 points

Simplifying, we get $\cos ^{2} \alpha+2 \cos \alpha-2 \leq 0$, solving this yields $-1 \leq \cos \alpha \leq \sqrt{3}-1$, hence the maximum value of $\cos \alpha$ is $\sqrt{3}-1$.
16 points