# Calculus question with optimization homework

A piece of wire 30 m long is cut into two pieces. One piece is bent into a square and the other is bent into a circle.

(a) How much of the wire should go to the square to maximize the total area enclosed by both figures? m

(b) How much of the wire should go to the square to minimize the total area enclosed by both figures? m

This is What I have done so far:

$\pi r^2 +(30-r)^2$

$\frac{dy}{dx}= 2\pi r-2(30-r)$

$60=2\pi r-2r$ $60=r(2{\pi}-2)$ $30=r(\pi-1)$

$r= \frac{30}{\pi-1}$

$r=14.01$ I do not understand What I am meant to do with this number now.. Is it the answer to a or b? and how do I find the other.

-
Your first formula appears to be wrong. –  Michael Hoppe Oct 17 '13 at 7:43
Don't forget that there are always extrema on the boundary points. That's crucial for that problem. –  Michael Hoppe Oct 17 '13 at 7:46
As reference to future viewers, there is more discussion of this problem (differing only as to the length of wire) here: math.stackexchange.com/questions/127493/… –  RecklessReckoner Jul 1 at 1:57

Hint: take $x$ meter of the 30 meters to form the circle, the radius of the circle is not $x$ but $\frac{x}{2\pi}$. Then how long is the side of the square? And don't forget the boundaries $x=0$ and $x=30$.