A piece of wire 40cm long is to be cut in two. One piece is bent to form a square and the other is bent to form a circle.

a) Determine the length of each piece of wire so t he sum of the areas is a minimum.

b) Determine the length of each piece of wire so the sum of the areas is a maximum.

How would I go about solving this?