# Solution of trigonometric equation avoiding the undefined case

I'm given this trigonometric equation, $$\tan x+\tan 2x=1-\tan x\tan 2x$$ I rewrote it as $$\dfrac{\tan x+\tan 2x}{1-\tan x\cdot\tan 2x}=1$$ Using the identity, $$\tan (A+B)=\dfrac{\tan A+\tan B}{1-\tan A\cdot\tan B}$$ I simplified my equation as $$\tan (x+2x)=1$$ which implies $$3x=\dfrac{\pi}{4}+n\pi$$ So, $$x=\dfrac{\pi}{12}+n\cdot\dfrac{\pi}{3}$$ Where, $n$ is an integer.

However, when $n=5$, $\tan (2x)$ is undefined. This is causing a problem. WolframAlpha gave solutions which avoids my case. How do I come to the solution which WolframAlpha gives?

Note that the statement $$\dfrac{\tan x+\tan 2x}{1-\tan x\cdot\tan 2x}=1$$ is valid only if the denominator $$1-\tan x\cdot\tan 2x \ne 0$$

We need to exclude the values for which $$\tan x\cdot\tan 2x=1$$ from the solutions that you have found.

This latest equation is not hard to solve and I let you handle it.

i would use that $$\tan(2x)=\frac{2\tan(x)}{1-\tan^2(x)}$$ Then you will get

$$\tan(x)+\frac{2\tan(x)}{1-\tan^2(x)}=1-\frac{2\tan^2(x)}{1-\tan^2(x)}$$

now substitute $\tan(x)=t$

• Substituting $\tan x=t$ we get $t^3-3t^2-3t+1=0$ which is much more harder to work with. – user571036 Aug 7 '18 at 15:25
• Not at all, it is $t^3-3t^2-3t+1=(t+1)(t^2-4t+1)$ – Dr. Sonnhard Graubner Aug 7 '18 at 15:30
• Then give me the full solution. – user571036 Aug 7 '18 at 15:35
• I would say please, but you will get $\tan(x)=-1$ or $\tan(x)=2\pm \sqrt{3}$ – Dr. Sonnhard Graubner Aug 7 '18 at 15:38

You can divide with $\tan x \tan 2x-1$ iff $\tan x \tan 2x\ne 1$

so $${2\tan^2x\over 1-\tan^2x} \neq 1\implies \tan x \neq \pm{\sqrt{3}\over 3}$$

so $x\neq \pm {\pi \over 6}+\pi \cdot k;\; k \in \mathbb{Z}$.

The particular solutions ($0<x<2 \pi$) are $\dfrac {\pi} {12}$ and $\dfrac {5 \pi} {12}$, but when you work out both Wolfram Alpha's and the OP's solution, both general solutions come out to $$\dfrac {\pi (4n+1)}{12}$$

The problem with that is you have to have a restriction for $n=2, n=5, n=8$ and $n=11$, which causes $\tan 2x$ to be undefined. To restrict those values, we can write

$$\begin{cases} x = \infty, & \text{\forall n a multiple of 3n-1} \\ x = \dfrac {\pi (4n+1)}{12}, & \text{\forall n not a multiple of 3n-1} \end{cases}$$

The reason why Wolfram Alpha wrote its general solutions as $$x = n \pi - \dfrac {7 \pi}{12} \text { and } x = n \pi - \dfrac {11 \pi}{12}$$ are because the negative angles are complementary to the positive ones, i.e. $\frac {\pi} {12}$ and $\frac {5 \pi} {12}$ counterclockwise around the unit circle are equivalent to $-\frac {7 \pi} {12}$ and $-\frac {11 \pi} {12}$ clockwise around the unit circle. They also avoid the the undefined solutions altogether.