# Formula for lengths of a rectangle - why does it give both lengths?

1. Jun 19, 2012

### autodidude

Why does the formula [P±√(P^2-16A)]/4 give the values of either of two different lengths of a rectangle? (P is perimeter and A is area)

I derived it by solving two simultaneous equations, A = xy and P=x+y and then applying the quadratic formula to the resulting second-order equation 2y^2 + Py+2A thus getting y=[P±√(P^2-16A)]/4

I tried out some numbers just to test it out and was surprised that both solutions were lengths of the rectangle, so it gave y but also x…I fail to see how this so, shouldn't it only give the length y (or x, if I'd eliminated y instead when I solved the simultaneous equations)?

Thanks

2. Jun 20, 2012

### haruspex

The equations cannot 'know' which is x and which is y. If x = A, y = B is a solution then so is x = B, y = A.
Btw, the perimeter would be 2x+2y.

3. Jun 20, 2012

### Mandlebra

I believe its a typo, his derivation is correct in the quadratic formula, the quadratic had a sign error also

4. Jun 20, 2012

### autodidude

Hmmm...I guess that makes sense...I'll think about it, thanks.