Basic relations:
\[ P = 2x + 2y \qquad (1) \qquad L^2 = x^2 + y^2 \qquad (2) \]
Solve (1) for y: \[y = \frac{P - 2x}{2}\] Substitute in (2): \[ L^2 = x^2 + \left(\frac{P - 2x}{2}\right)^2 \]
Multiply by 4: \[4L^2 = 4x^2 + (P - 2x)^2\] and rearrange \[8x^2 - 4Px + P^2 - 4L^2 = 0\]
Discriminant \(\Delta = 128L^2 - 16P^2\)
Complete existence condition: \[
\frac{P}{2\sqrt{2}} \le L < \frac{P}{2}
\]
(\(\Delta \ge 0\) gives \(L \ge P/(2\sqrt{2})\); positivity of sides requires \(L < P/2\))
Given \(P = 5\) , \(L = 2\) :
Check condition: \(P/(2\sqrt{2}) \approx 1.768 \le 2 < 2.5 = P/2\) ✓
\[ \Delta = 128\cdot 2^2 - 16\cdot 5^2 = 512 - 400 = 112 \] \[ x = \frac{4P + \sqrt{\Delta}}{16} \quad\text{(taking larger root to keep y positive)} \] \[ x = \frac{20 + \sqrt{112}}{16} \approx \frac{20 + 10.583}{16} \approx 1.911 \] \[ y = \frac{P - 2x}{2} = \frac{5 - 2\cdot 1.911}{2} \approx \frac{5 - 3.822}{2} \approx 0.589 \]
→ length ≈ 1.911, width ≈ 0.589 (both positive → valid rectangle)
Rectangle area and diagonal calculator
Online geometry calculators & solvers