A straight piece of wire $40$ cm long is cut into two pieces. One piece is bent into a circle and the other is bent into a square. How should wire be cut so that the total area of both circle and square is minimized?
my work I found the function to be $(x/4)^2 + \pi ( (40-x) / 2\pi ) ^2$. However, the answer key showed a different answer and I'm not sure how to get to that equation. The critical point that I got was $160/(\pi+4)$, but it was $20/(\pi+4)$ for the answer key answer key