Excluding erroneous solutions of a trigonometric equation

Consider the following trigonometric equation, which needs to be solved for $\theta$:

$\tan{(\pi\cot{\theta})}=\cot{(\pi\tan{\theta})}$

The solution given is: $\tan{\theta}=\dfrac{2n+1\pm\sqrt{4n^2+4n-15}}{4}$ for integral values of $n$, AND $n>1$ or $n<-2$.

The method I adopted to arrive at this solutions was to first write $\cot{(\pi\tan{\theta})}$ as $\tan{(\pi/2-\pi\tan{\theta})}$. Then I wrote the general expression for all angles whose tangent is same as $\tan{(\pi/2-\pi\tan{\theta})}$ and equated it to $\pi\cot{\theta}$ and then solved the resulting equation for $\tan{\theta}$. I was able to arrive at the above expression (including the crucial step of excluding those values of $n$ which made the answer imaginary). But my worry is that there is still a lot to be done!

We need to consider the following 4 steps of excluding those values of integral $n$ for which:

(i) $\tan{\theta}=0$ (as this leaves the RHS of the equation undefined)

(ii) $\tan{\theta}$ is undefined (as this leaves the argument in the RHS as undefined)

(iii) $\tan{\theta}$ is an integer (as this leaves the RHS of the equation undefined)

(iv) $\cot{\theta}$ or reciprocal of $\tan{\theta}$ is of the form $k+\frac{1}{2}$, where $k$ is an integer (as this leaves the LHS of the equation undefined)

Now case (i) and (ii) need not be considered, as they are never satisfied for any of the values of $n$ provided in the answer. But cases (iii) and (iv) need some attention. For example, if I put $n=2$, then the answer says $\tan{\theta}=2$ or $\tan{\theta}=\frac{1}{2}$. The former answer leaves the RHS (as well as the LHS in this case) undefined.

My question is What are other similar erroneous values of 'n' which do not conform with the 4 cases considered and as a result, invalidate the given solution? Or is there any other method by which I can arrive at a better answer?

cases iii) and iv) both require $\tan\theta$ to be rational.

In wich case, $4n^2 + 4n - 15$ is a perfect square $4n^2 + 4n - 15 = (2n+5)(2n-3)$ can only be a perfect square if both $(2n+5)(2n-3)$ are perfect squares.
The only perfect squares within $8$ units of each other that are both integers are $1,9.$

$n = 2, n=-3$ are problematic.

• How can we say that $(2n+5)(2n-3)$ (which will be an odd number) can only be a perfect square if both $(2n+5)$ (odd number) and $(2n-3)$ (odd number) are perfect squares, as for example, 3*27=81, which is a perfect square (albeit both of them do not give the same value of $n$ in this case). What I am saying is that this statement is not enough to prove the assertion. It would be great if you could elaborate on that note. – seavoyage Aug 11 '16 at 19:35