TITLE: Geometric justification of the trigonometric identity $\arctan x + \arctan \frac{1-x}{1+x} = \frac \pi 4$
QUESTION [11 upvotes]: The trigonometic identity
$$
\arctan x + \arctan \frac 1 x = \frac\pi 2\quad\text{for }x>0
$$
can be seen to be true by observing that if the lengths of the legs of a right triangle are $x$ and $1$, then the two acute angles of the triangle are the two arctangents above.
Does the identity
$$
\arctan x + \arctan \frac{1-x}{1+x} = \frac \pi 4
$$
have a similar geometric justification?
PS: The second identity, like the first, can be established by either of two familiar methods:

Use the usual formula for a sum of two arctangents; or
differentiate the sum with respect to $x$.

PPS: Secondary question: Both of the functions $x\mapsto\dfrac 1 x $ and $x\mapsto\dfrac{1-x}{1+x}$ are involutions.  Does that have anything to do with this?  Presumably it should mean we should hope for some geometric symmetry, so that $x$ and $\displaystyle\vphantom{\frac\int\int}\frac{1-x}{1+x}$ play symmetrical roles.
PPPS: In a triangle with a $135^\circ$ angle, if the tangent of one of the acute angles is $x$, then the tangent of the other acute angle is $\displaystyle\vphantom{\frac\int\int}\dfrac{1-x}{1+x}$.  That follows from the second identity above.  If there's a simple way to prove that result by geometry without the identity above, then that should do it.

REPLY [4 votes]: Here's an attempt to address @Michael's desire for a solution that treats the two angles symmetrically.
It's based on this preliminary result:


Lemma. If $Q$ is the orthocenter of acute $\triangle ABC$, then $$\tan \angle ABQ = \frac{|\overline{AQ}|}{|\overline{BC}|}$$

(Proof is left as an exercise to the reader. Hint: Note the congruent angles at $A$ and $C$.)
With that, we can construct the following:

$$\tan \alpha = \frac{x\sqrt{2}}{\sqrt{2}} = x \qquad \tan \beta = \frac{1-x}{1+x} \quad\implies\quad \operatorname{atan}x + \operatorname{atan}\frac{1-x}{1+x} = \alpha+\beta = \frac{\pi}{4}$$