If I have two real numbers $a$ and $b$, why is it possible to express those numbers as $a=K\cos(\phi)$ and $b=K\sin(\phi)$? I came across this problem in Riley, Hobson and Bence (2006:14-15). Here is the question and answer in the book.
Question:
Solve for $\theta$ the equation: $$a\sin\theta + b\cos\theta = k, $$ where $a$, $b$ and $k$ are real quantities.
Answer:
To solve this equation we make use of result (1.18) [the compound angle formulae] by setting $a=K\cos\phi$ and $b=K\sin\phi$ for suitable values of $K$ and $\phi$.
My question is: how do you know that, for arbitrary real numbers $a$ and $b$, there exists $K$ and $\phi$ such that $a=K\cos(\phi)$ and $b=K\sin(\phi)$? Additionally: does this mean that I can express two unknowns in terms of other trig functions, e.g. $a=R\sec(\alpha)$ and $b=R\cot(\alpha)$? Why or why not?
Reference:
Riley, K. F., Hobson, M. P., and Bence, S. J. (2006), Mathematical Methods for Physics and Engineering (3e). Cambridge: CUP.
Divide both sides by $\sqrt{a^2+b^2}$. $\frac{a}{\sqrt{a^2+b^2}}$ and $\frac{b}{\sqrt{a^2+b^2}}$ can be considered as sine and cosine of a some angle.