<s>[INST] Can a ratio of sinusoidal functions with the same frequency always be written as a tangent function? In general, two sinusoidal functions $y_1$ and $y_2$ with angular frequency $\omega$ can be written as

*

*$y_1 = A\sin(\omega x) + B \cos(\omega x)$,


*$y_2 = C\sin(\omega x) + D \cos(\omega x)$.
Where $A, B, C, D$ are real numbers and it is not the case that $A=B=0$ or $C=D=0$.
Can the ratio $\frac{y_1}{y_2}$ always be written in the form
$$ \frac{y_1}{y_2} = E \tan(\omega x + h) + k$$
for some constants $E, h$, and $k$?
Edit:
For example
$$\frac{12 \sin (x) + 3 \cos(x)}{  4 \sin(x) + 2 \cos(x)}$$
has a graph like this:

Which looks like the tangent function transformed by scaling and shifting.
 [/INST] Yes: for $C,D$ not both zero, $$\frac{A\sin \omega x+B\cos \omega x}{C\sin \omega x+D\cos \omega x}=\frac{AD-BC}{C^2+D^2}\;\tan\left(\omega x-\arctan\frac CD\right)+\frac{AC+BD}{C^2+D^2}.$$ This is true even when $D=0,$ if we let $\displaystyle\arctan\frac CD=\begin{cases}\displaystyle&\frac\pi2&\text{if }C>0;
\\ \displaystyle-&\frac\pi2 &\text{if }C<0.\end{cases}$

*

*The above
expressions
for the parameters $E,h,k$ were obtained by equating
$$\frac{A\sin \omega x+B\cos \omega x}{C\sin \omega x+D\cos \omega x}$$ and the given tangent function $$E \tan(\omega x + h) + k,$$ expanding the
latter into sines and cosines, observing from the denominators that
$$\frac CD=-\tan h,$$ and setting $$h=-\arctan\frac CD.$$
Now, $h$ is in either quadrant $4$ or $1$ depending on the relative
signs of $C$ & $D,$ so $$\sin h=\frac{\mp C}{C^2+D^2},\\\cos
   h=\frac{D}{C^2+D^2}.$$
Substituting these two equalities into the equation where we left off
gives $$\sqrt{C^2+D^2}(E\cos h-k\sin h)=A,\\\sqrt{C^2+D^2}(E\sin
   h+k\cos h)=B.$$ Solving this system finally gives the above
expressions for $E$ and $k.$

*Here's a rigorous proof: $$\frac{AD-BC}{C^2+D^2}\;\tan\left(\omega
   x-\arctan\frac CD\right)+\frac{AC+BD}{C^2+D^2}\\
   =\frac{AD-BC}{C^2+D^2}\left(\frac{\tan \omega x-\frac CD}{1+(\tan \omega x)\frac CD}\right)+\frac{AC+BD}{C^2+D^2}\\
   =\frac{AD-BC}{C^2+D^2}\left(\frac{D\sin \omega x-C\cos \omega x}{D\cos \omega x+C\sin \omega x}\right)+\frac{AC+BD}{C^2+D^2}\\
   =\frac{(AD-BC)(D\sin \omega x-C\cos \omega x)+(AC+BD)(D\cos \omega x+C\sin \omega x)}{(C^2+D^2)(C\sin \omega x+D\cos \omega x)}\\
   =\frac{(AD^2-BCD+AC^2+BCD)\sin \omega x+(-ACD+BC^2+ACD+BD^2)\cos \omega x}{(C^2+D^2)(C\sin \omega x+D\cos \omega x)}\\
   =\frac{A\sin \omega x+B\cos \omega x}{C\sin \omega x+D\cos \omega x}.$$
</s>