If there are four different circles that are tangent both to the edges of an inscribed quadrilateral and to the circle around that inscribed quadrilateral, how should the inscribed quadrilateral be chosen so that the sum of the perimeters of those four different circles could be maximum or minimum?

Case 1:
If the inscribed quadrilateral is a "square" with the same side length $\displaystyle a$, then I find the sum of the perimeters of the "same" four circles $\displaystyle P_1 = \frac{2\pi\cdot a}{1 + \sqrt{2}}$

Case 2:
If the inscribed quadrilateral is a "rectangle" with the side lengths $\displaystyle a$ and $\displaystyle \frac{a}{2}$, then I find the sum of the perimeters of the two bigger circles and the two smaller circles $\displaystyle P_2 = \pi \cdot a \cdot \frac{2\sqrt{5} - 3}{2}$

Case 3:
Let the side lengths of the rectangle which is the inscribed quadrilateral be $\displaystyle a$ and $\displaystyle b$,
the radius of the two bigger circles be $\displaystyle r_1$,
the radius of the two smaller circles be $\displaystyle r_2$,
the total sum of the perimeters of these circles be $\displaystyle P_3$,
the radius of the largest circle that contains both the inscribed quadrilateral (rectangle) around which are those four circles be $\displaystyle R$.

$\displaystyle R = \sqrt{\frac{a^2}{4} + \frac{b^2}{4}}$

$\displaystyle r_1 = \frac{R}{2} - \frac{a}{4}$

$\displaystyle r_2 = \frac{R}{2} - \frac{b}{4}$

$\displaystyle P = 2(2\pi \cdot r_1) + 2(2\pi \cdot r_2) = 4\pi \cdot R - \pi(a + b)$

$\displaystyle P = 4\pi \cdot \sqrt{\frac{a^2}{4} + \frac{b^2}{4}} - \pi(a + b)$

$\displaystyle P = 2\pi \cdot \sqrt{a^2 + b^2} - \pi(a + b)$

$\displaystyle \frac{dP}{da} = \frac{2\pi \cdot a}{\sqrt{a^2 + b^2}} - \pi = 0$

$\displaystyle \frac{2a}{\sqrt{a^2 + b^2}} - 1 = 0$

$\displaystyle b = a\cdot \sqrt{3}$

and for this value, the sum of the perimeters is $\displaystyle P_3 = \pi \cdot a(3 - \sqrt{3})$ which is the minimum of all three cases.

So, assuming that my approach and calculations to be correct, can I conclude as follows?

I. When the inscribed quadrilateral is a "square", the sum of the perimeters of the circles is maximum.

II. When the inscribed quadrilateral is a "rectangle" whose long side length is $\displaystyle \sqrt{3}$ times its other (short) side length, the sum of the perimeters of the circles is minimum

Thanks and regards.

$\displaystyle \frac{d^2{P}}{da^2}=f''(a)=\frac{2\pi \cdot \sqrt{a^2+b^2}-2\pi{a}\cdot \frac{a}{\sqrt{a^2+b^2}}}{a^2+b^2}$

$\displaystyle f''(\frac{b}{\sqrt{3}})=\frac{2\pi\cdot \sqrt{\frac{b^2}{3}+b^2}-\frac{2\pi\cdot b}{\sqrt{3}}\cdot \frac{\frac{b}{\sqrt{3}}}{\sqrt{\frac{b^2}{3}+b^2} }}{\frac{b^2}{3}+b^2}$

$\displaystyle f''(\frac{b}{\sqrt{3}})=\frac{\frac{4\pi{b}}{\sqrt {3}}-\frac{2\pi b^2}{3}\cdot \frac{\sqrt{3}}{2b}}{\frac{4b^2}{3}}$

$\displaystyle f''(\frac{b}{\sqrt{3}})=\frac{3\pi \sqrt{3}}{4b}>0$ which is minimum for $\displaystyle a=\frac{b}{\sqrt{3}}$

Thanks for any critiques, comments and suggestions. Regards.