Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Notifications
Mark all as read
Q&A

Show that $f(x) = \arctan\left(\frac{x}{x+1}\right) + \arctan\left(\frac{x+1}{x}\right) = \frac{\pi}{2}$

+3
−0

Show that $$f(x) = \arctan\left(\frac{x}{x+1}\right) + \arctan\left(\frac{x+1}{x}\right) = \frac{\pi}{2} \quad \forall x \in (-\infty, -1)\large\cup (0, \infty)$$

I observed this feature graphically, but am looking for a way to prove it. My attempt is as follows:

We can show that $$\arctan(A) + \arctan(B) = \arctan\left(\frac{A+B}{1 - AB}\right)$$ It follows that

$$\displaylines{f(x) = \arctan\left(\frac{x}{x+1}\right) + \arctan\left(\frac{x+1}{x}\right) = \arctan\left(\frac{\frac{x}{x+1} + \frac{x+1}{x}}{1 - \left(\frac{x}{x+1}\right)\left(\frac{x+1}{x}\right)}\right) \cr = \arctan\left(\frac{\frac{x}{x+1} + \frac{x+1}{x}}{1 - 1}\right) = \arctan\left(\frac{\frac{x}{x+1} + \frac{x+1}{x}}{0}\right) = \arctan(\infty) = \boxed{\frac{\pi}{2}}}$$

My attempt has a few questionable steps. The first is the deduction that division by 0 yields $\infty$. Secondly, I have been unable to consider the appropriate domain. Although my steps exclude for $-1$ and $0$, I don’t think they accurately consider values in between. I would appreciate if someone can make this "intuitive" proof more rigorous/concrete. I am also open to alternate solutions, but I would also appreciate comments on my attempt.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

2 answers

+3
−0

$\infty$ is not a number so $\arctan(\infty)$ isn't meaningful, nor does it have a reasonably standard interpretation. You can already tell something is wrong, because there's nothing in your argument that keeps it from applying for all values of $x$. One way to attempt to make an argument along the lines you sketch would be to perturb the problem slightly, then take the limit as the perturbation approaches $0$.

For example, $$\begin{align} \arctan\left(\frac{x+\varepsilon}{x+1}\right) + \arctan\left(\frac{x+1}{x}\right) & = \arctan\left(\frac{\frac{x+\varepsilon}{x+1} + \frac{x+1}{x}}{1 - \left(\frac{x+\varepsilon}{x+1}\right)\left(\frac{x+1}{x}\right)}\right) \\ & = \arctan\left(\frac{\frac{x+\varepsilon}{x+1} + \frac{x+1}{x}}{\frac{-\varepsilon}{x}}\right) \\ & = \arctan\left(-\frac{x^2}{\varepsilon(x+1)} - \frac{x}{x+1} - \frac{x+1}{\varepsilon}\right) \\ & = \arctan\left(-\frac{x^2+(x+1)^2}{\varepsilon(x+1)} - \frac{x}{x+1}\right) \\ \end{align}$$

Since the limit of $z^{-1}$ approaches $\infty$ when $z$ approaches $0$ from the right and $-\infty$ when approached from the left, the limit of the above expression is dependent on the sign of $\frac{x^2 + (x+1)^2}{x+1}$ and the direction we have $\varepsilon$ approach $0$. With this we know that the answer is at least $\pm\frac{\pi}{2}$.

Short of making the choices that give the right answer, it's not obvious how we should decide how $\varepsilon$ approaches $0$. This is the point where the fact that $$\arctan(A)+\arctan(B)=\arctan\left(\frac{A+B}{1-AB}\right)$$ is false starts being relevant. You can see this simply by setting $A=1$ and $B=2$. Because $\arctan$ is an odd, increasing function, the left hand side is necessarily positive, but the right hand side is $\arctan(-3)$ which is necessarily negative. The formula is only valid when $0 < 1 - AB$. For the above formulas to be valid, then, $\frac{-\varepsilon}{x}$ must be positive. For the given ranges, this means $\varepsilon$ must have the opposite sign as both $x$ and $x+1$ giving the desired positive $\frac{\pi}{2}$. We also see that for $x\in(-1,0)$, the constraint requires $\varepsilon$ to be positive but $x+1$ will positive as well which will lead to $-\frac{\pi}{2}$ which is indeed what you see in a plot.


As an addendum, here's a geometric/trigonometric argument. First note that the domain constraints ensure that $x$ and $x+1$ always have the same sign, so the arguments to $\arctan$ are always positive. For $a$ and $b$ both positive, $\theta = \arctan(\frac{b}{a})$ is in the interval $[0,\frac{\pi}{2})$. We can view $a$ and $b$ as, respectively, the $x$ and $y$ coordinates of a point. $\theta$ is then the angle between the $x$-axis and the ray from the origin through the point $(a, b)$. If we then consider $\varphi = \arctan(\frac{a}{b})$, we can use the same logic to view it as the angle between the $x$-axis and the ray through $(b,a)$. But $(b,a)$ is the reflection of $(a,b)$ through the line $y=x$, so the angle between the $y$-axis (note, $y$-axis, not $x$-axis) and the ray through $(b,a)$ is $\theta$, therefore $\varphi = \frac{\pi}{2}-\theta$.

You can use vector algebra, complex exponentials, or trigonometric identities if you want a more symbolic rendition of this.

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

I wish I could upvote this a 100 times :) (1 comment)
+3
−0

You're right that division by zero is a problem if you want to use that identity. Rather than salvage that, I would recommend this identity instead:

$$ \arctan a + \arctan{a^{-1}} = \frac\pi2\qquad\text{for positive $a$} $$

Proving this identity is easy: draw a $1 \times a$ rectangle with a diagonal and consider the two triangles thus formed.

Then show that $\frac{x}{x+1}$ is positive for all $x$ in the domain of $f$ and you're done.

Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Thank you, that’s insightful. (1 comment)

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!

Like what we're doing? Support us! Donate