I have the following trigonometric equality,

$$\tan(N+1)\theta = \frac{\sin \theta}{\cos \theta + a}$$

where $N$ is a random integer, and $a$ is a known constant, and the unknown is $\theta$.

Could anyone help me out solve this equation? I suspect that there is no analytical solution, however any kind of help would be greatly appreciated!

  • 3
    $\begingroup$ If $N$ is a random integer, why didn't you just write $\tan N\theta$? $\endgroup$ – José Carlos Santos Jul 17 '17 at 21:44
  • 2
    $\begingroup$ i think you will Need a numerical method $\endgroup$ – Dr. Sonnhard Graubner Jul 17 '17 at 21:46
  • $\begingroup$ This looks to me that it will result in an algebraic equation of degree at least $2N$ in either the variable $\sin \theta$ or the variable $\cos \theta$ (depending on which you put it in terms of). $\endgroup$ – Dave L. Renfro Jul 17 '17 at 21:48
  • $\begingroup$ where did this problem come from? a little context could help someone find a solution. $\endgroup$ – Dando18 Jul 17 '17 at 21:51
  • $\begingroup$ you are right, mathematically (N+1) is equivalent to N. $\endgroup$ – Rico Gu Jul 18 '17 at 20:13

As you properly suspected, there is no analytical solution to the equation $$\tan(k x)=\frac{\sin(x)}{a+\cos(x)}$$as soon as $a\neq 0$. If $k$ is an integer, using the expansion of $\tan(nx)$ as function of $t=\tan(x)$ would lead to very complex equations in $t$ writing $\cos(x)$ and $\sin(x)$ as functions of $t$. Moreover, do not miss the fact that there are an infinite number of solutions.

As already said in comments, numerical methods seem to be the practical solution. In order to avoid all discontinuities due to the tangent, I would prefer to search for the zero's of equation $$f(x)=(a+\cos(x))\sin(kx)-\sin(x)\cos(kx)$$ forgetting the trivial $x=0$, $x=n \pi$ and the negative solutions since, if $x$ is a solution, $-x$ is another one.

The first step would be to locate the roots one at the time that is to say to find two values $x_1$ and $x_2$ which make $f(x_1)\times f(x_2) < 0$. This can easily be done by inspection using a small step size $\Delta x$. When this is done, use Newton method starting at $x_0=\frac{x_1+x_2}2$ using $$f'(x)=a k \cos (k x)+(k-1) \cos ((k-1) x)$$

For illustration purposes, let us use $k=3$ and $a=2$ focusing on the range $0\leq x \leq 2 \pi$. Start with $\Delta x=0.5$ and make the table $$\left( \begin{array}{cc} x & f(x) \\ 0.5 & +2.83646 \\ 1.0 & +1.19154 \\ 1.5 & -1.81394 \\ 2.0 & -1.31563 \\ 2.5 & +0.91708 \\ 3.0 & +0.54482 \\ 3.5 & -1.10240 \\ 4.0 & -0.08379 \\ 4.5 & +2.01969 \\ 5.0 & +0.75656 \\ 5.5 & -2.42356 \\ 6.0 & -2.03855 \end{array} \right)$$ So, the non trivial roots are located between $i$ and $i+\frac 12$ for $(i=1,2,4,5)$.

Consider the problem of the largest root; Newton iterates will then be $$\left( \begin{array}{cc} n & x_n \\ 0 & 5.250000000 \\ 1 & 5.111247350 \\ 2 & 5.113443466 \\ 3 & 5.113442197 \end{array} \right)$$ which is the solution for ten significant figures.

  • $\begingroup$ Thanks you for your nice explanation! And it turns out that maybe the best we could do is to find multiple numerical solutions. $\endgroup$ – Rico Gu Jul 18 '17 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.