1. ## Perimeter of Triangle

Given a point (a,b) with 0 < b < a, determine the minimum perimeter of a triangle with one vertex at (a,b), one on the x-axis, and one on the line y=x.

Thanks!

2. Hello, RubyRed!

Who assigned this? . . . It is an ugly problem!

Given a point $P(a,b)$ with $0 < b < a$,
determine the minimum perimeter of a triangle with one vertex at $P$,
one on the x-axis, and one on the line $y=x$
Code:
        |                 *
|               *
|           R *
|      (y,y)o
|         *  *  *
|       *     *     *    P
|     *        *        o(a,b)
|   *           *     *
| *              *  *
- + - - - - - - - - o - - - - -
|               (x,0)
|                 Q

Let $Q(x,0)$ be on the x-axis.

Let $R(y,y)$ be on the line $y = x$

Then: . $\text{Perimeter} \;=\;\overline{PQ} + \overline{QR} + \overline{RP}$

. . $P \;=\;\bigg[(x-a)^2 + b^2\bigg]^{\frac{1}{2}} + \bigg[(x-y)^2 + y^2\bigg]^{\frac{1}{2}} + \bigg[(y-a)^2 + (y-b)^2\bigg]^{\frac{1}{2}}$

. . $P \;=\;\bigg[x^2-2ax + a^2+b^2\bigg]^{\frac{1}{2}} + \bigg[x^2-2xy + 2y^2\bigg]^{\frac{1}{2}} + \bigg[2y^2 - 2(a+b)y + (a^2+b^2)\bigg]^{\frac{1}{2}}$

And now solve the system: . $\begin{Bmatrix}\dfrac{\partial P}{\partial x} &=& 0 \\ \\[-3mm] \dfrac{\partial P}{\partial y} &=& 0 \end{Bmatrix}$
Good luck!