Step 1:

Let $x=$Radius of the circle.

$y$=Side of the square.

Circumference of the circle$=2\pi r=2\pi x$

Perimeter of square$=4s=4y$

Sum of perimeters of circle and square=$2\pi x+4y=k$----(1)

Area of circle $=\pi r^2=\pi x^2$

Area of square$=y^2(i.e\; s^2)$

Step 2:

Sum of areas of circle & square=$\pi x^2+y^2$

$A=\pi x^2+y^2$----(2)

From (1)$2\pi x+4y=k$

$4y=k-2\pi x$

$y=\large\frac{k-2\pi x}{4}$-----(3)

$A=\pi x^2+\bigg[\large\frac{k-2\pi x}{4}\bigg]^2$[By substituting the value of y]

Step 3:

Differentiating with respect to $x$ we get,

$\large\frac{dA}{dx}$$=2\pi x+2\big[\large\frac{k-2\pi x}{4}\big]\big[\large\frac{-2\pi}{4}\big]$

$\quad\;=2\pi x-\large\frac{\pi}{4}[k-2\pi x]$

$\quad\;=[2\pi+\large\frac{\pi^2}{2}]x-\large\frac{k\pi}{4}$

$\large\frac{dA}{dx}$$=0$ at

$x=\large\frac{k\pi}{4}$$\times \large\frac{2}{4\pi+\pi^2}$

$\;\;=\large\frac{k}{2(\pi+4)}$

On double differentiation we get

$\large\frac{d^2A}{dx^2}=\bigg[2\pi+\large\frac{\pi^2}{2}\bigg]\Rightarrow +ve$

$A$ is least when $x=\large\frac{k}{2(\pi+4)}$

Step 4:

From (3)

$y=\large\frac{1}{4}\bigg[k-2\pi.\large\frac{k}{2(\pi+4)}\bigg]$

$\;\;=\large\frac{k}{4}\bigg[\large\frac{\pi+4-\pi}{\pi+4}\bigg]$

$\;\;=\large\frac{k}{\pi+4}$

Step 5:

$\large\frac{y}{x}=\large\frac{\Large\frac{k}{\pi+4}}{\Large\frac{k}{2(\pi+4)}}$

$\quad=\large\frac{k}{\pi+4}\times \frac{2(\pi+4)}{k}$

$\quad=2$

Therefore $y = 2x \rightarrow $ proves that the sum of their areas is least when the side of square (y) = diameter, i.e, 2 times the radius (x)$