# Calculate minimum subject to conditions

What is the lowest value of $c$ such that

$\qquad a^2 + b^2 = c^2$

and

$\qquad ab + ac + bc = 100$

I want to solve this problem with Mathematica

### Edit

These conditions are generated from a right triangle with sides $a$ and $b$ and hypotenuse $c$.

This is not a not homework, but part of a personal research project.

Replay

eqns = {a^2 + b^2 == c^2, a*b + a*c + b*c == 100, a > 0, b > 0, c > 0};

sol = Minimize[{c, eqns}, {a, b, c}] // ToRadicals // FullSimplify

(*  {10 Sqrt[2/7 (-1 + 2 Sqrt)], {a -> 10 Sqrt[1/7 (-1 + 2 Sqrt)],
b -> 10 Sqrt[1/7 (-1 + 2 Sqrt)], c -> 10 Sqrt[2/7 (-1 + 2 Sqrt)]}}  *)



The approximate numerical values are

sol // N

(*  {7.22778, {a -> 5.11081, b -> 5.11081, c -> 7.22778}}  *)



Verifying that the solution satisfies the equations and constraints

eqns /. sol[[-1]]

(*  {True, True, True, True, True}  *)



EDIT: Since a and b are interchangeable this can be simplified to

eqns2 = {2 a^2 == c^2, a^2 + 2*a*c == 100, a > 0, c > 0};

sol2 = Minimize[{c, eqns2}, {a, c}] // ToRadicals // FullSimplify

(*  {10 Sqrt[2/7 (-1 + 2 Sqrt)], {a -> 10 Sqrt[1/7 (-1 + 2 Sqrt)],
c -> 10 Sqrt[2/7 (-1 + 2 Sqrt)]}}  *)

sol[] === sol2[]

(*  True  *)


Category: equation solving Time: 2016-07-28 Views: 0