Minimal Distance between two curves What is the minimal distance between curves?


*

*$y = |x| + 1$ 

*$y = \arctan(2x)$


I need to set a point with $\cos(t), \sin(t)$?
 A: Let $(a,|a|+1)$ be a point on the first curve and let $(b,\arctan(2b))$ be a point on the second curve.
Half the distance between the two points squared is $$\frac{1}{2}d^2 = \frac{1}{2}(a-b)^2+\frac{1}{2}(|a|+1-\arctan(2b))^2.$$
To find the minimum of this expression we set the partial derivatives to zero:
$$\frac{1}{2}\frac{\partial d^2}{\partial a} = (a-b)+(|a|+1-\arctan(2b))\frac{a}{|a|} = 0$$
and
$$\frac{1}{2}\frac{\partial d^2}{\partial b} = (b-a)+(|a|+1-\arctan(2b))\frac{-2}{1+4b^2}=0.$$
Adding these two equations gives
$$ (|a|+1-\arctan(2b))\left(\frac{a}{|a|}-\frac{2}{1+4b^2}\right)=0.$$
If the first term is to be zero, then $\frac{1}{2}\frac{\partial d^2}{a}=0$ implies $a=b$, there is no solution for $1+|a|=\arctan(2a)$ however.
If the second term is to be zero, we have $a>0$ and $b=\pm\frac{1}{2}$.
$\frac{1}{2}\frac{\partial d^2}{a}=0$ then reduces to $$ 0=a\mp\frac{1}{2}+(a+1-\arctan(\pm 1)) = 2a+1\mp\left(\frac{1}{2}+\frac{\pi}{4}\right).$$
Since $a>0$ we need to pick $b=\frac{1}{2}$ and thus $a = \frac{\pi-2}{8}$.
Hence the closest points are $(\frac{\pi-2}{8},\frac{\pi+6}{8})$ and $(\frac{1}{2},\frac{\pi}{4})$ and their distance is $$\sqrt{\left(\frac{\pi-2}{8}-\frac{1}{2}\right)^2+\left(\frac{\pi+6}{8}-\frac{\pi}{4}\right)^2} = \frac{\sqrt{2}(6-\pi)}{8}.$$
A: One shortcut here is to note that curves 1, 2 (say $f(x)$, $g(x)$) have a co-normal line passing between the closest two points.
Therefore, since $f'(x) = 1$ for all $x>0$ then just find where $g'(x) = 1$ or 
\begin{align}&\frac{2}{4x^2 +1} = 1\\
&2 = 4x^2 + 1\\
&\bf{x = \pm 1/2}\end{align}
