Fitting circle in $f(x)=x^3-3x^2$ what is the radius? 
The whole problem is the above.
I tried to solve it analytically but I couldnot find enough equation to solve it.
Assume the center is $(a,-r)$ where $r$ is the radius of the circle.
The points on the sphere $(x-a)^2+(y+r)^2=r^2$
and $(x,f(x))$ must satisfy it so if we denote the intersection points $(x_1,y_1),(x_2,y_2)$:
$$(x_1-a)^2+(x_1^3-3x_1^2+r)^2=r^2$$
$$(x_2-a)^2+(x_2^3-3x_2^2+r)^2=r^2$$
Are two equation with 4 unknown.
Can you give me elegant relations between these two unknowns?
 A: The following is only a hint, not an answer.
The rest of the equations involves the derivative, since the line connecting the center with a tangent point is perpendicular to the tangent line. Hence for $i=1,2$:
$$\frac{-1}{f'(x_i)} = \frac {-r-f(x_i)}{a-x_i}$$
which gives two extra equations
$$x_i^3-3x_i^2+r =\frac {x_i-a}{-3x_i(x_i-1)}$$
Familiar terms surface, but I'm not sure how solving these four equations can be elegant.
A: Here is a different path that can be considered maybe as "elegant" by building a kind of (generalized) angle bissector.
Take a look at the following figure: the red curve is the locus of the center of circles that are tangent to the (blue) curve and the (green) $x$ axis. The final answer to your question is that the center of the circle has coordinates
$$a=1.80155263360, \ \ -r=-1.06021721502$$
The abscissas of the tangency points with the curve being:
$$x_1=0.79999363787 \ \ \text{and} \ \ \ x_2=2.85193070410.
$$
How have these results been found ?
Let
$$p:=\sqrt{1+f'(m)^2}\tag{1}$$
This swallow-tailed curve has parametric equations:
$$\begin{cases} \ \ a_m&=&m-\dfrac{f'(m)r}{p}&=&\ \ \ \color{red}{m}&+&(p-1)\dfrac{f(m)}{f'(m)}\\
-r_m&=&\dfrac{f(m)p(p-1)}{f'(m)^2}&=&\color{red}{f(m)}&-&(p-1)\dfrac{f(m)}{f'(m)^2}\end{cases}\tag{2}$$
(where $m$ has the following meaning: $(m,f(m))$ is the point of tangency of a circle tangent (at least once) to the blue curve with center $(a_m,-r_m)$ ).
All boils down to the obtention of a double point in a parametric curve. I have used numerical methods for this purpose (an analytical solution looks out of reach, due in particular to the square root in (1)).
Explanation for (2): Let us express that the center of the current circle is at the same distance $r$ from the curve and from the $x$ axis by finding a unit vector on the normal to the blue curve at point $\binom{m}{f(m)}$, a property that can be expressed in the following way:
$$\binom{m}{f(m)}+r \underbrace{\dfrac{1}{p}\binom{-f'(m)}{1}}_{\text{unit normal vector}}=\binom{a}{-r},  \ \ \ p \ \text{has been defined in (1)}$$
giving two equalities from which one can extract $r$ then $a$ (see (2)).

A: 
In figure suppose AC is straight line.We first find the angle BAC the curve makes with x axis:
$y=x^3-3x^2$ ⇒ $y'=3x^2-6x$
⇒ $tan (\widehat{BAC})=y'$ at point A(3, 0):
$tan (\widehat{BAC})=3^3-6\times 3=9$
⇒ $ \widehat{BAC} ≈83^o$
⇒$ \widehat{BAC}=\widehat BAD ≈41.5^o$
So the center of circle is on line $y=(m=tan 41.5)(x-3)$
Now we use plain geometry. we have:
$AB^2+(BD=r)^2=AD^2$
$BD^2+r^2=OD^2$
$AB+BO=3$
$(AB+BO)^2=AB^2+OB^2+2\cdot AB\cdot BO$
⇒ $AB^2+OB^2-2r^2=9-(DA^2+OD^2)$
$tan(41.5)=\frac r{AB}$
$OD^2=OB^2+r^2=(3-AB)^2+r^2$
These two relations give $OD^2$ in terms of r.
$sin(41.5)=\frac r{AD}$
This relation gives AD in term of r.
Now in relation:
$AB^2+OB^2-2r^2=9-(DA^2+OD^2)$
$OB=3-AB$
So OB can also be found in term of r. Plugging, DA, OA, AB and OB in above relation give an equation in terms of r
Note, r ≈1.1 and coordinates of its center is D( ≈1.8,  ≈-1.1)
