Hello, recently I've started to study some simple math problems by myself and I came across following problem:

A rope of 1 meter is cut in two pieces. Part which lenght is x (m) is made into a circle and other part into a square. What is circle's and square's perimeter when their combined area is smallest possible.

Thing I came up with so far is: A(x)=[(1-x)/4]^2+x^2/4pi but can't process from this point, every time I try something it gets really messy and seems wrong. I assume equation is okay, but what is the next step? I tried simplifying it but can't seem to get it into basic form with that pi popping up at every turn. Any help is appreciated.