I have been working with sinus signals recently. The problem is as following:
Simplify $x(t)$ to a simple sinoid function: $$ x(t) = 10 \cos (\omega t + 0.42) + 4.2 \cos(\omega t - 1.3) - 6 \sin(\omega t + 0.38) $$
My initial instict was to convert the $6\sin(\omega t + 0.38)$ to a cosine, then convert all the factors to complex numbers to get the complete wave.
I have always thought of $\sin (x)$ as $\cos (x) $ shifted by $\pi/2$, so I did: $$ 6 \sin (\omega t + 0.38) = 6 \cos (\omega t + 0.38 + \pi/2)$$
Now having three signals to add, I converted them to their complex representations: $$ f(x) = 10e^{j(\omega t + 0.42)} + 4.2e^{j(\omega t -1.3)} - 6e^{j(\omega t + 0.38 +\pi/2)}$$ I could now split it into two factors to find the phase shift: $$ f(x) = e^{j(\omega t)} * (10e^{0.42j} + 4.2e^{-1.3j} -6e^{(0.38+\pi/2)j} ) $$ I converted that to vectors in cartesian space, and got: $$ p(x) = \begin{bmatrix} 9.13\\4.08 \end{bmatrix} + \begin{bmatrix} 1.12\\-4.05 \end{bmatrix} - \begin{bmatrix} 12.48\\-5.54 \end{bmatrix} = \begin{bmatrix} 12.48\\-5.54 \end{bmatrix}$$ Converting that back to eulers form, I got $$ A = \sqrt{12.48^2 + -5.54} = 13.65 $$ $$ \theta = \arctan(-5.54/12.48) = -0.42$$
Which combined with the first factor. gave me the real part of the function:
$$ x(t) = 13.65\cos(\omega t - 0.42)$$, which unfortunately didn't match up with the graph.
However, I noticed the first two factors added correctly up. So it turned out, if I instead expressed
$$ 6 \sin (\omega t + 0.38) = 6 \cos (\omega t + 0.38 - \pi/2)$$
(this time doing $-\pi/2$ and not $+\pi/2$), I got the correct answer
$$ f(x) = 9.79 \cos ( \omega t +0.61 )$$
So, basically my question is, how do I always make sure I convert from sin to cos correctly? Should I always take minus $\pi/2$, or are there cases where I should add it instead. Earlisr I found that the graphs of $g(x) = \sin(x)$ and $g(x) = \cos(x+\pi/2)$, matches up, so I don't understand why it didn't in this case.
Sorry if this seems like a very stupid question, but I've been trying to find some sense in it but I can't really figure it out. Thanks in advance!