I am working on an applied math assignment of mine and there's this problem on waveform combination that is kinda tricky. My lecturer did a problem similar to this as an example. However, the example he did was simple as it only had the angular frequency and no phase shift.
Here is the problem:
The current flowing in an AC circuit is defined by the following trigonometric waveform:
$$i=\cos(3t-1)-2\sin(3t+4)$$He wants us to combine those two waveforms into a simpler trigonometric waveform of the form $$i=\sin(\omega t+\phi) \quad\text{with}\quad \phi\geq 0$$
Here's my working:
using the identities $cos(A-B)=cos(A)cos(B)+sin(A)sin(B)$ and $sin(A+B)=sin(A)cos(B)+cos(A)sin(B)$
$$cos(3t)cos(-1)+sin(3t)sin(-1)-2[sin(3t)cos(-1)+cos(3t)sin(-1)]$$
$$0.5403023059cos(3t)-0.8414709848sin(3t)-2[0.5403023059sin(3t)-0.8414709848cos(3t)]$$
$$0.5403023059cos(3t)+1.68294197cos(3t)-0.8414709848sin(3t)-1.080604612sin(3t)$$
$$2.223244275cos(3t)-1.922075597sin(3t)$$
Using $Asin(\omega t + \phi)$:
$$A[sin(\omega t)cos(\phi)+cos(\omega t)sin(\phi)]$$
$$Asin(\omega t)cos(\phi)+Acos(\omega t)sin(\phi)$$
Equate coefficients:
$$2.223244275=Acos(\phi) eq1$$
$$(2.223244275)^2 = A^2sin^2(\phi) eq2$$
$$-1.922075597=Acos(\phi) eq3$$
$$(-1.922075597)^2=A^2cos^2(\phi) eq4$$
Now add eq2 and eq4:
$$(2.223244275)^2 + (-1.922075597)^2 = A^2cos^2(\phi)+A^2sin^2(\phi)$$
$$(2.223244275)^2 + (-1.922075597)^2 = A^2(cos^2(\phi)+sin^2(\phi))$$
$$(2.223244275)^2 + (-1.922075597)^2 = A^2$$
$$A=\sqrt{(2.223244275)^2+(-1.922075597)^2}$$
$$A=2.938909612$$
Now divide eq3 and eq1:
$$\frac{2.223244275}{-1.922075597}=\frac{Acos(\phi)}{Asin(\phi)}$$
$$\frac{2.223244275}{-1.922075597}=tan(\phi)$$
$$\phi = tan^-1 (\frac{2.223244275}{-1.922075597})$$
$$\phi = -0.8579234358 rads$$
Note that it is not in the domain so:
$$-0.8579234358 rads + 2\pi rads = 5.425261871 rads$$
$$\therefore \phi = 5.425261871 rads$$
So:
The simplified combined waveform is $2.938909612sin(3t+5.425261871)$.
That is the simplified form I came up with. However, the simplified form does not match with the original equation when graphed:
You can see clearly that it is out of phase with the original equation. What am I doing wrong? Is my approach correct? Please help!
Using the identities
$$\begin{align} \cos(A-B) &= \cos A \cos B + \sin A \sin B \\ \sin(A+B) &= \sin A \cos B + \cos A \sin B \end{align}$$
and defining $$s_1 := \sin 1 \qquad c_1 := \cos 1 \qquad s_4 := \sin 4 \qquad c_4 := \cos 4$$
The initial equation becomes $$\begin{align} &\;c_1\cos 3t +s_1\sin 3t-2\left(\;c_4\sin 3t+s_4\cos 3t\;\right) \\ =&\;(s_1-2c_4)\sin 3t + (c_1-2s_4)\cos 3t \tag{1} \end{align}$$ while the target equation (with an appended coefficient of $A$) is $$A \sin \omega t \cos\phi + A\cos \omega t \sin\phi \tag{2}$$
Equating coefficients: $$\begin{align} A\cos\phi = s_1-2c_4 \tag{3} \\ A\sin\phi = c_1-2s_4 \tag{4} \end{align}$$
Therefore, $$\begin{align} A^2 &= A^2\cos^2\phi + A^2\sin^2\phi \\ &= (s_1-2c_4)^2+(c_1-2s_4)^2 \\ &= \left(s_1^2+c_1^2\right) - 4\left(s_1 c_4+c_1 s_4\right) + 4\left(c_4^2+s_4^2\right) \\ &= 1 - 4\sin(1+4) + 4 \\ &= 5 - 4\sin 5 \\ \to A &= \sqrt{5-4\sin 5} = 2.972\ldots \tag{5} \end{align}$$ and $$ \tan\phi = \frac{A\sin\phi}{A\cos\phi}= \frac{c_1-2s_4}{s_1-2c_4} \quad\to\quad \phi = \arctan\frac{\cos 1-2\sin 4}{\sin 1 - 2\cos 4} = 0.7628\ldots \tag{6}$$
Thus, we have