Find Function Always at Distance from Another Function I changed the title to hopefully clarify a bit: What i am trying to do is find a function that is always at a specific distance from another function i.e. a function where a drawn circle with radius $r=1$ with center on the function will always be tangented by another function. Read below for background info and what i started off writing (not necessary to know).
I want to make a circle run on a given function. What i have in mind is having a circle from the implicit function $(a-x)^2+(b-y)^2=r^2$ where i use $r=1$ and $a$ and $b$ are the $x$ and $y$ coordinates of the center of the circle, respectively. I would like to try with the parabola $f(x)=-x^2+2$ and i am mainly focusing on the interval $-5\leq x\leq 5$. I found it working to use the distance formula, $\sqrt{(a-x)^2+(b-f(x))^2}$ to plot how far away the circle center is from the function $f(x)$ at a given $x$. This may seem chaotic, so here is a picture of what i mean
Purple is the distance formula function while grey is the derivative of that
Now i am currently having a hard time wrapping my head around this, but i think i want to find a b-value (height of the circle center) where the distance at minimum is 1 (i.e. the purple function has a minimum of $y=1$ exactly.) So i want to find a b-value where the purple function is 1 while the grey function is 0. How do i do this? Is there a smarter way?
 A: What you're looking for is a parallel curve.  In your case, you would parametrize the parabola as
\begin{align}
x(t) &= t & y(t) &= -t^2 + 2
\end{align}
The parallel curves would then be
\begin{align}
X(t) &= t - \frac{2rt}{\sqrt{4t^2 + 1}} & Y(t) &= -t^2+2 - \frac{r}{\sqrt{4t^2 + 1}},
\end{align}
where $r$ is the desired radius of the circles along the curve.  This gives you the parallel curve along one "side" of the original curve;  for the other one, flip the sign of $r$ in each of the above equations.
You can plot these curves parametrically, obtaining the following:

Note that the curve "inside" the parabola can't be possibly be expressed in the form $Y = g(X)$--there are multiple values of the $Y$ coordinate for some values of $X$.  The "outside" parallel curve is better-behaved, but I still suspect that it can't be expressed in a nice form $Y(X)$;  at best, you might be able to end up with a relation between $X$ and $Y$ where you can show that some polynomial in $X$ and $Y$ must vanish, but you can't solve it for $X$ or $Y$ explicitly.
