Can someone explain to me why and how $a\cos x+b\sin x$ is the cosine or sine of an angle multiplied by a scalar? I would like to ask a pair of questions regarding this function.

First question: How is this expression derived?

Let's consider that $f(x)=a\cos x+b\sin x$. Now, I tried hard to derive the expression myself, but it was just a waste of time. I have read two derivations of this, which I doubt are correct:
1) The first one starts by considering $a=R\sin\alpha$ and $b=R\cos\alpha$. How can this statement be true? There are two real numbers $a$ and $b$. How can we make this assertion that both of them can be expressed as the trigonometric functions of the same angle $\alpha$, multiplied by some scalar $R$?
2) The second one starts by considering this: Let $f(x)=a\cos x+b\sin x=R\sin(x+\alpha)$. Again, the problem here is how can we just say that this function is indeed a sine function, multiplied by a scalar, without doing any analysis or graphing it? How is it true? If this were true, can't we do this just with any function, represent it any way we want? 
From these two starting points, the rest of the formulae are derived, which are not difficult to derive. So, what is the possible way to prove it?

Second question: Is this formula theoretical or is it derived after
  rigorously analysing the function?

When I wasn't able to prove it, I felt that thinking something like this would have taken a lot of effort. Because there was no way a normal person can think about facts like "this expression is a special sine or a cosine" without spending  days on it. So, is it possible to derive this relationship without analysing the function, for example without graphing it, without trying certain pairs of values for it or something like that?
 A: If $a=b=0$ then $f(x)\equiv0$, so making $R=0$ the equality $f(x)=R\sin(x+\alpha)$ is true for every $\alpha\in\mathbb{R}$.
If one of $a$ and $b$ is non-zero, i.e. $a^2+b^2\neq0$, let $P=(b,a)$ be a point in the plane, the circumference centered at the origin passing by $P$ has radius $R=\sqrt{a^2+b^2}$, let $\alpha$ the oriented angle formed between the positive $x$ axis and $OP$, then we have
$$\cos \alpha =\frac{b}R\qquad\text{and}\qquad\sin \alpha=\frac{a}{R}$$
Do you can see why the equalities $a=R\sin \alpha$ and $b=R\cos \alpha$ are true?
A: Are you familiar with polar coordinates?
Given two real numbers $a,b$ not both equal to $0$, if we represent them as the ordered pair $(a,b)$ and present these on the $xy$-plane as a point, the pair can be uniquely represented by a non-negative distance, $R$, from the origin $(0,0)$ to $(a,b)$-- ($R = \sqrt{a^2 + b^2}$)-- and an angle $\alpha$ which represents the angle of the $x$ axis with the lin for $(0,0)$ to $(a,b)$.  
Geometrically we can see that $a = R \sin \alpha$ and $b = R \cos \alpha$.
Also we can note that $(a/R)^2 + (b/R)^2 = (a^2 + b^2)/R^2 = 1$ so $a/R$ and $b/R$ are points of a circle and there exist $\alpha$ so that $a/R = \sin \alpha$ and $b/R = \cos \alpha$.
So that is basically your first question.
Unless $a = b = 0$.  In which case just set $R = 0$ and $\alpha$ to any angle you like.
Your second question:  If we use the above substitution we get:
$f(x) = a \cos x + b \sin y$
$= R(\sin \alpha \cos x + \cos \alpha \sin x)$
$= R\sin(x + \alpha)$
A: Use addition formula for the sine:
$$
R\sin(x+\alpha)=R(\sin x\cos\alpha+\cos x\sin\alpha)=
(R\cos\alpha)\sin x+(R\sin\alpha)\cos x.
$$
A: If you are familiar with Fourier series, you can imagine $R=\sqrt{a^2+b^2}$ as a generalization of the Pythagorean theorem, and $\tan \alpha = a/b$ as the phase angle, but instead of a vector space, we have a Hilbert space where the sine and cosine functions form an orthogonal basis
