I am trying to solve the following problem, using functions and the application of derivatives to find maximums and minimums:
A wire of $L$ length is cut in two parts. The first one is used to form a square, and the second one to form a circumference. How should the wire be cut so that the sum of the two areas is minimum?
Considering that each side of the square is $x$, and $L$ the complete length of the wire, I was thinking of using two functions: $$f\left(x\right):\:A=x^2+\pi r^2$$ $$f\left(x\right):\:L=4x+2\pi r$$ The issue is that I am not sure how to solve this, considering that the functions I made are good in the first place.
Hint: You have $$A=x^2+\pi r^2$$ where $$r=\frac{y}{2\pi}$$ so we get
$$A=x^2+\frac{y^2}{4\pi}$$ Now we have the condintion: $$L=4x+y$$ with this equation we can eliminate $$y$$:
$$A(x)=x^2+\frac{1}{4\pi}(L-4x)^2$$ $$A'(x)=2x-\frac{8}{4\pi}(L-4x)$$ solving this we get
$$x=\frac{L}{4(\pi+4)}$$
and from here we get
$$y=L-4\frac{L}{4(\pi+4)}=L-\frac{L}{\pi+4}=\frac{L\pi}{\pi+4}$$