Is my trig result unique?

Solution 1:

As written, the formula is not true: the values of $\arctan(x)$ are always between $-\frac{\pi}2$ and $\frac{\pi}{2}$. Pick a rational number $\frac{a}{b}$ with $\frac{\pi}{4}\lt \frac{a}{b}\lt \frac{\pi}{2}$. For example, $a=11$, $b=10$. Then the left hand side, $$\arctan\left(\frac{11}{10}\right)+\frac{\pi}{4}\approx 1.6184$$ whereas the right hand side is negative: $$\arctan\left(\frac{11+10}{10-11}\right) = \arctan(-21) \approx -1.5232.$$

I think that what you mean is that if $\alpha$ is an angle such that $\tan(\alpha)$ is rational, different from $1$, $$\tan(\alpha)=\frac{a}{b}\neq 1,\qquad a,b\text{ integers},$$ then $$\tan\left(\alpha+\frac{\pi}{4}\right) = \frac{b+a}{b-a}.$$

Certainly, well done if you discovered it by yourself! However, it is not new. In fact, the result is true even if $a$ and $b$ are not integers; all you need is for $a$ to be different from $b$, that is, for $\alpha\neq\frac{\pi}{4}$.

There are well-known formulas that express the sine, cosine, and tangent of a sum of angles in terms of the sines, cosines, and tangents of the summands:

$$\begin{align*} \sin(\alpha+\beta) &= \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta)\\ \cos(\alpha+\beta) &= \cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta)\\ \tan(\alpha+\beta) &= \frac{\tan(\alpha)+\tan(\beta)}{1-\tan(\alpha)\tan(\beta)}. \end{align*}$$ Taking $\beta=\frac{\pi}{4}$, since $\tan(\frac{\pi}4) = 1$, we get $$\tan\left(\alpha+\frac{\pi}{4}\right) = \frac{\frac{a}{b}+1}{1-\frac{a}{b}} = \frac{\quad\frac{a+b}{b}\quad}{\frac{b-a}{b}} = \frac{a+b}{b-a},$$ giving your formula.

Solution 2:

If you differentiate the function $$f(t)=\arctan t - \arctan\frac{1 + t}{1 - t},$$ you get zero, so the function is constant in each of the two intervals $(-\infty,1)$ and $(1,+\infty)$ on which it is defined.

  • Its value at zero is $\pi/2$, so that $f(t)=-\pi/4$ for all $t<1$, so $$ \arctan t + \frac\pi4 = \arctan\frac{1 + t}{1 - t},\qquad\forall t<1.$$

  • On the other hand, one easily shows that $\lim_{t\to+\infty}f(t)=\frac{3\pi}{4}$, so $$ \arctan t - \frac{3\pi}4 = \arctan\frac{1 + t}{1 - t},\qquad\forall t>1.$$

If $t=a/b$ is a rational number smaller that $1$, then the first point is your identity. If it larger than $1$, we see that you have to change things a bit.