For reasons I'm not going to get too into, I'm interested in a number of the form $p+q \cos(\tfrac \pi{18})$, where $p^2,q^2$ are rational. A question that occurred to me is whether or not such a representation is unique, namely could there exist some different $p',q'$ such that $p'+q'\cos(\tfrac \pi{18})$ is equal to the same value.
If this were to occur, then we could write $$\cos \left(\frac \pi{18} \right)=\frac{p-p^{\prime}}{q^{\prime}-q}=\frac{\left(p-p^{\prime} \right) \left(q+q^{\prime} \right)}{q^{{\prime}^{2}}-q^2}$$.
I suspect that this is not the case, as any closed form of $\cos(\tfrac \pi {18})$ I can find online is an absolute mess. That being said, I'm not totally sure how to prove it cannot be done.
I'm quite rusty with abstract algebra, so everything I am about to say might be totally wrong, but a potential approach that occurred to me is to consider field extensions. Namely, the minimal polynomial of $\cos(\tfrac \pi {18})$ over $\mathbb Q$ has degree $6$, while $\frac{(p-p')(q+q')}{q'^2-q^2}$ can be obtained by adding (at most) four square roots to $\mathbb Q$, which has degree some factor of $16$. In particular, one side has a factor of $3$, while the other does not, which leads me to believe we have some sort of contradiction, but I'm not solid enough on field extensions to suss out the details.
Does this general idea work? If so, could someone possibly help me fill in the missing details on how to finish; if not, are there any other approaches that could work?