I'm attempting to code an AC power circuit simulator (for fun, imagine that) and I'm running into a mathematical stump. I've simplified the problem into these equations: $$a=bx+c$$ $$d=ex+f$$ $$P=|a||d|\cos(\theta_a-\theta_d)=a_R d_R+a_I d_I(=a\cdot d)$$ Where $a, b, c, d, e, f,$ and $x$ are all complex numbers, $P$ is a real number, and we know the values of $|a|, b, c, e, f,$ and $P$.
I know you can't really do a dot product between complex numbers but that's kind of how I'm thinking of this last equation (most of these complex numbers are actually phasors, or vector-wannabes anyways).
I need to find a way to express $x$ in terms of the known values. Is this even possible without knowing $\theta_a$ or $d$?
I don't seem to be getting anywhere by breaking down the first two equations into Real and Imaginary parts - it seems to be making more unknown values, which just makes this messier. But if I commit to polar form I'm finding it hard to deal with the cosine. Thank you for taking a look.