Existence of $\sin\alpha=\frac{b}{\sqrt{a^2+b^2}}; \cos\alpha=\frac{a}{\sqrt{a^2+b^2}}$ Let $a,b\in\mathbb{R}$ such that $(a,b)\neq(0,0)$. Let $x$ be a real number.
We make a function such that $A(x)= a\cos(x)+b\sin(x)$. I need to show the existence of a number $\alpha\in\mathbb{R}$ such that:
$$\sin\alpha=\frac{b}{\sqrt{a^2+b^2}}; \cos\alpha=\frac{a}{\sqrt{a^2+b^2}}$$
I thought of using the fact that the sum of the square of the two numbers is equal to one is enough to deduce the existence but I feel like I am wrong. Do you guys have any hints?
 A: Note that $\sin(x)$ is continuous in $x$, and that there is an $x'$ such that $\sin(x')=1$, and there is an $y$ such that $\sin(y)=-1$. So for any $c \in [-1,1]$, there is an $x$ such that $\sin(x)=c$. Now, for any such $a,b$, note that $\frac{b}{\sqrt{a^2+b^2}}$ is in $[-1,1]$, so there indeed
is an $\alpha'$ such that $\sin(\alpha')= \frac{b}{\sqrt{a^2+b^2}}$.
Now, we are almost done. Indeed, the equation $\sin^2(\alpha')+\cos^2(\alpha')=1$ must hold, so from this it follows that $\cos(\alpha')$ is
$\frac{\pm a}{\sqrt{a^2+b^2}}$, where $\alpha'$ is as in the previous pragraph. If on the one hand $\alpha'$ is such that $\cos(\alpha') = \frac{a}{\sqrt{a^2+b^2}}$, thenset $\alpha=\alpha'$ and we are done.
If on the other hand $\alpha'$ is such that $\cos(\alpha') = \frac{-a}{\sqrt{a^2+b^2}}$, then set  $\alpha = \frac{\pi}{2}-\alpha$; then $\sin(\alpha)=\sin(\alpha')$ $=\frac{b}{\sqrt{a^2+b^2}}$, and $\cos(\alpha)=-\cos(\alpha') = -\frac{-a}{\sqrt{a^2+b^2}} = \frac{a}{\sqrt{a^2+b^2}}$, and so now we are done here as well.
A: If you are interested to what should be the right angle, take the following one
$\alpha=arc tg(\frac{b}{a})$
if $a\neq 0$, otherwise $\alpha=\frac{\pi}{2}$
To prove your identity you have to resolve the system
$\begin{cases}
sin(\alpha)=\frac{b}{a}cos(\alpha)\\
cos^2(\alpha)(1+(\frac{b}{a})^2)=1
\end{cases}$
