Find an expression for the radius of a circle that satisfies the following:

Suppose I have two sine functions:

$$f(x)=2|a|\sin(x-a\pi)\\ f(x)=2|a|\sin(x+a\pi),$$

where $-1\leq a\leq 1$.

What is an expression for the radius of a circle $r$ in terms of $a$ such that the graph of the circle $x^2+y^2=r^2$ (which is centered at the origin) is tangent to both of the sine functions?

A graphical model of the sine functions above has been provided on the Desmos graphing calculator at the following link: https://www.desmos.com/calculator/3c5myh8unn .

The squared distance from the origin to a point of one of your functions (doesn't matter which, by symmetry) is $$d^2(x)=x^2+4a^2\sin^2(x+a\pi).$$ The radius of the tangent circle is the smallest such distance. To find it, one can differentiate the above and equate the result to zero, to find the equation $$x+2a^2\sin(2x+2a\pi)=0.$$ Unfortunately, this equation cannot be solved via elementary functions, one must resort to numerical methods (you can also visualize the result on Desmos as the abscissa of the intersection between the graphs of $y=x$ and $y=-2a^2\sin(2x+2a\pi)$). Once you have found the solution $x$, plug it into $d^2(x)$ and take the square root to have the radius of the tangent circle.
This is my attempt. Due to simmetry, it is sufficient to consider one of the curves, say $y = 2 \lvert a \rvert sin(x-a \pi)$. The radius of the tangent circle will be equal to the distance between the origin and the curve. The segment between $(0,0)$ and $\hat{x}, y(\hat{x}))$, the latter standing for the point on the curve minimizing the distance to the origin, will indeed be orthogonal to the curve, and so naturally qualifies as a radius of the tangent circumference. The distance is to be found by minimising the expression $$D = \sqrt{ x^2 + 4a^2 sin^2(x – a\pi) }$$ As the square root is a convex function, the argument at which the minimu is attained will not change if its argument is minimized instead $$x^2 + 4a^2 sin^2(x – a\pi) = x^2 + 4a^2 (\frac{1-cos(2(x-a\pi))}{2})$$ where use of the identity $$sin^2(x) = \frac{1-2cos(x)}{2}$$ is made. Calculating the derivative and setting to zero the following transcendental equation is obtained $$2x + 4a^2(sin(2x-2a\pi)) = 0$$ This allows to calculate $\hat{x}$. As a check one can verify that $\hat{x} = 0$ for $a = 1, -1, 0 , \frac{1}{2}$, fact which has a very clear graphical interpretation when your nice interactive graphs are used. Given $\hat{x}$, the radius is then given by the expression above for $D$.