Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|cite|improve this question
There are other ways to prove that 45 degrees from a rational slope lies a rational slope, and it is not very hard to do, but I must say that I have never seen this identity before. Welcome to MSE! =) +1. – Patrick Da Silva Dec 13 '11 at 20:09
Remember that $\arctan$ (the inverse tangent) always takes values between $-\pi/2$ and $\pi/2$. If you pick a rational that is greater than $\pi/4$ and less than $\pi/2$, then the left hand side of your question cannot be equal to the value of the arctangent at any point, let alone at a rational point. So what you write is not what you meant to write. What you mean, I think, is that if $\alpha$ is an angle such that $\tan(\alpha)=\frac{a}{b}$, then $\tan(\alpha+\frac{\pi}{4}) = \frac{b+a}{b-a}$. – Arturo Magidin Dec 13 '11 at 20:11
@Arturo : Perhaps that is what OP did in his proof? Maybe we should ask him how he did this and help him on his definitions so that such details might not slip his mind again. After all he had an idea in mind. – Patrick Da Silva Dec 13 '11 at 20:14

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.

share|cite|improve this answer
Arturo, thanks for putting what I found into a better format. I discovered this when I noted that $arctan\left(\frac{1}{2}\right)$ had the same decimal as $arctan(3)$ as I was creating an answer key for some right triangle trigonometry problems. About an hour later and an excel spreadsheet of information, I'd determined it. I appreciate you (and Patrick's) help! – Brian Abend Dec 14 '11 at 2:10
@BrianAbend: You do realize that what you see in spreadsheets, etc, are just approximations of the true value of the function, in the vast majority of cases, right? I can find a value $a$ with $\arctan(a)$ that agrees wit $\arctan(3)$ to as many decimal places as you care to specify but is not equal to $\arctan(3)$. – Arturo Magidin Dec 14 '11 at 4:14
I'm well aware of how decimals can be deceiving and also how you can match arctan values to any number of decimals, but I did not make this claim/statement on the basis of those decimals. They piqued my interest, causing me to go searching for a relationship/connection, and I spent 90 minutes trying to figure out the connection. Within reason, I found it, and I'm mostly looking to see if this has been stated elsewhere in either the same or different format. I like how you and others have helped me hone down what I'm looking for, too, so it's another plus towards this discovery :). – Brian Abend Dec 14 '11 at 4:29
@Brian: Good; just double-checking. You'd be surprised how many students today, even in "advanced classes" like calculus, cannot tell the difference between the actual value and a decimal approximation given by a calculator. – Arturo Magidin Dec 14 '11 at 4:37

Quoting from Wikipedia's list of trigonometric identities:


$$ 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$.


Dividing the numerator and denominator by $\tan\alpha$ may give the same result as is posted here.

share|cite|improve this answer

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.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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