0

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?

Davide_sd
  • 179

2 Answers2

1

Write your equation as $$\frac{c}{\sqrt{c^2+d^2}} \sin(a) + \frac{d}{\sqrt{c^2+d^2}} \cos(a) = 0 $$ Let $\theta$ be an angle such that either $\cos(\theta) = c/\sqrt{c^2 + d^2}$ and $\sin(\theta) = d/\sqrt{c^2 + d^2}$ or $\cos(\theta) = -c/\sqrt{c^2 + d^2}$ and $\sin(\theta) = -d/\sqrt{c^2 + d^2}$. Then the equation becomes $$ \sin(\theta + a) = \cos(\theta)\sin(a) + \sin(\theta) \cos(a) = 0$$ So $a = - \theta + n \pi$ will work for any integer $n$, and we can take $\theta = \arctan(d/c)$.

Robert Israel
  • 448,999
0

While I was reading the previous answer, I saw a related question that didn't appear in my initial search before posting this question, nor it appeared as I was choosing a title for my question. Anyway, it turns out that my assumption that sympy was rewriting that equation in terms of exponential function may not be correct! I was lead to believe that by reading the answers to a couple of different questions at stackoverflow...

Turns out that:

$$ \cos \alpha =\frac{1-\tan ^{2}\frac{\alpha }{2}}{1+\tan ^{2}\frac{% \alpha }{2}} , \quad \sin \alpha =\frac{2\tan \frac{\alpha }{2}}{1+\tan ^{2}% \frac{\alpha }{2}} $$

By inserting them into my equation:

$$ 2 c \tan{\frac{a}{2}} + d \left( 1 - \tan^{2}{\frac{a}{2}} \right) = 0 $$

Setting $x = \tan{\frac{a}{2}}$:

$$ -d x^{2} + 2 c x + d = 0 $$

From which:

$$ x_{1, 2} = \frac{c \mp \sqrt{c^{2} + d^{2}}}{d} $$

And finally:

$$ a_{1, 2} = 2 \arctan{\left( \frac{c \mp \sqrt{c^{2} + d^{2}}}{d} \right)} $$

Davide_sd
  • 179