Recently I came up with a problem that is bugging me. With a CAS software (sympy) I tried to solve a simple trigonometric equation (assume all symbols are real). Say I want to solve for the symbol $a$.
$$ c \sin{\left(a \right)} + d \cos{\left(a \right)} = 0 $$
Surprisingly, the software gave me the following two solutions:
$$ a_{1} = 2 \arctan{\left(\frac{c - \sqrt{c^{2} + d^{2}}}{d} \right)}, a_{2} = 2 \arctan{\left(\frac{c + \sqrt{c^{2} + d^{2}}}{d} \right)} $$
I believe these solutions were obtained by rewriting the equation in terms of exponential functions.
So, I inserted Euler's formula and ended up with the following expression:
$$ \frac{d + i c }{d - i c} = e^{2 i a} $$
At this point, I have no idea how to continue. I believe there are complex logarithms involved but my math course didn't get that in-depth... Please, would you be able to show me the necessary steps to obtain those two solutions?