I have a function that's the sum of two sinusoidals: $ A \cos(\Theta_1 + \omega_1 t) + B \cos(\Theta_2 + \omega_2 t) $. It basically forms an acoustic beat pattern. I need to find the frequency of the underlying pitch and the phase (that is, a place where there's a local maximum/minimum) for a numeric root finder I'm working on. The idea being that if you start at the phase and walk forward by 1/4 of the period of the underlying pitch you'll exactly reach the next local minimum/maximum.
I found a few articles taking about acoustic beats, and from those I have this trig identity in hand: $\sin(f_1(t)) + \sin(f_2(t)) = 2 \sin(\frac{f_1(t) + f_2(t)}{2}) \cos(\frac{f_1(t) - f_2(t)}{2}) $. From that I can pull the underlying pitch (I think it's the higher frequency term of the average or half difference of the frequencies? That is, it's either $\frac{f_1(t) + f_2(t)}{2}$ or $\frac{f_1(t) - f_2(t)}{2}$).
But I'm not sure how to pull out the phase. And I also don't know how to handle cases where $A$ and $B$ aren't equal. From some graph experiments, I don't think it changes the underlying frequency/pitch at all(?) but it definitely seems to change the phase.