Is my trig result unique? I recently determined that for all integers $a$ and $b$ such that $a\neq b$ and $b\neq 0$,
$$
\arctan\left(\frac{a}{b}\right) + \frac{\pi}{4} = \arctan\left(\frac{b+a}{b-a}\right)
$$
This implies that 45 degrees away from any angle with a rational value for tangent lies another angle with a rational value for tangent.  The tangent values are related.
If anyone can let me know if this has been done/shown/proven before, please let me know.  Thanks!
 A: 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. 
A: 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.
A: Quoting from Wikipedia's list of trigonometric identities:
BEGIN QUOTE
$$ f(x) = \frac{(\cos\alpha)x - \sin\alpha}{(\sin\alpha)x + \cos\alpha}, $$
[$\ldots\ldots$ some material omitted here $\ldots\ldots$]
If $x$ is the slope of a line, then $f(x)$ is the slope of its rotation through an angle of $-\alpha$.
END QUOTE
Dividing the numerator and denominator by $\tan\alpha$ may give the same result as is posted here.
