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?