Prove that there exists and angle $\alpha$ and $r \in \Bbb R$ such that $a\cos x + b\sin x = r\cos\alpha$ Let's say that we have an expression $a\cos x + b\sin x$ where $a \in \Bbb R$ and $b \in \Bbb R$.
I was learning about finding the minimum and maximum values of an expression of this form for some given value of $a$ and $b$ by expressing it in terms of a single trigonometric function. My textbook did it by assuming that $a = m\sin\phi$ and $b = m\cos\phi$, where $m \in \Bbb R$ and $\phi$ is some angle.

But I couldn't wrap my head  around the fact that any two real numbers can be expressed as the product of another real number and a trigonometric function for some angle.
So, I decided to take another approach which is highly similar to this one.
It is solely based on the assumption that the expression can be expressed in the form of $r\cos\theta$, where $r \in \Bbb R$ and $\theta$ is some angle. Once this assumption is proved, here's how I will continue it :
$$a\cos x + b\sin x = r\cos\theta$$
Let's say that $\theta = \alpha + x$. So :
$$a\cos x + b\sin x = r\cos(\alpha + x) = (r\cos\alpha)\cos x + (-r\sin\alpha)\sin x$$
This gives us the values of $a$ and $b$ as $r\cos\alpha$ and $-r\sin\alpha$ respectively.

So, it would work perfectly if I can prove the assumption mentioned above.
Unfortunately, I haven't been able to prove it yet.
I was successful in proving it's converse, though i.e. for a given expression, say $p\cos\gamma$, where $p \in \Bbb R$ and $\gamma$ is some angle, it can be expressed in the form of $c\cos\delta + d\sin\delta$ where $c \in \Bbb R$, $d \in \Bbb R$ and $\delta$ is some angle.

This is highly similar to what I've stated above (what I'd do once the assumption is proved).

First, we assume that $\gamma = \beta + \delta$, where $\beta$ and $\delta$ are two angles that fit in the equation.
$$\therefore p\cos\gamma = p\cos(\beta + \delta) = p(\cos\beta\cos\delta - \sin\beta\sin\delta) = (p\cos\beta)\cos\delta + (-p\sin\beta)\sin\delta$$
Substituting $p\cos\beta$ by $c$ and $-p\sin\beta$ by $d$, we can arrive at $c\cos\delta + d\sin\delta$.
I don't know if this will be helpful in proving the initial assumption that an expression $a\cos x + b\sin x$ can be expressed as $r\cos\theta$ for some angle $\theta$ and for some real value of $r$.
I'd really appreciate help in proving this.

Thanks!

PS : I'm not familiar with Euler's formula

We begin by observing that
$$a\cos x+b\sin x =\sqrt{a^2+b^2}\left\{\frac{a}{\sqrt{a^2+b^2}}\cdot\cos x +\frac{b}{\sqrt{a^2+b^2}}\cdot\sin x\right\}$$
Now, define $\phi\in[0,2\pi)$ such that
$$\cos\phi=\frac{a}{\sqrt{a^2+b^2}}\text{ and }\sin\phi=\frac{b}{\sqrt{a^2+b^2}}$$
Note that such a value of $\phi$ is unique. Therefore, we have
$$a\cos x + b\sin x =\sqrt{a^2+b^2}\left(\cos\phi \cos x + \sin\phi \sin x\right)=r\cos\alpha$$
with $r=\sqrt{a^2+b^2}$ and $\alpha = \phi-x$. This finishes the proof.
