Minima problem? This is a question in my textbook which I can't solve. Any help would be appreciated, thanks.
"A piece of wire 10 metres long is cut into two portions. One piece is bent to form a circle, and the other piece to form a square. Find the circumference of the circle if the sum of areas of the circle and square is to be a minimum. Give your answer in terms of $pi$."

HINT:
If the radius of the circle is $=r$ meter, the perimeter of the circle $=2\pi r$ meter
If one side of the square is $=a$ meter, the perimeter of the sqaure $=4a$ meter
So, we have $2\pi r+4a=10=a=\frac{10-2\pi r}4$
and the sum of area $=\pi r^2+a^2=f(a)$ to be maximized
