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
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#2: Post edited by user avatar Derek Elkins‭ · 2022-08-03T05:05:08Z (over 2 years ago)
  • $\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} ight)$$ is **false** starts being relevant. You can see this simply by setting $A=1$ and $B=2$. Because $\arctan$ is an odd 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.
  • $\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} ight)$$ 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.
#1: Initial revision by user avatar Derek Elkins‭ · 2022-08-03T05:02:31Z (over 2 years ago)
$\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 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.