Answer
The length of the third side should be $~~\sqrt{2}~a$
Work Step by Step
Let $b$ be the base of the triangle.
Then the height $h$ of the triangle is $~~h = \sqrt{a^2-(\frac{b}{2})^2}$
We can write an expression for the area:
$A = \frac{1}{2}bh$
$A = \frac{1}{2}b\sqrt{a^2-(\frac{b}{2})^2}$
We can find $\frac{dA}{db}$:
$\frac{dA}{db} = \frac{1}{2}\sqrt{a^2-\frac{b^2}{4}}+(\frac{b}{2})(\frac{-\frac{b}{2}}{2\sqrt{a^2-\frac{b^2}{4}}})$
$\frac{dA}{db} = \frac{4(a^2-\frac{b^2}{4})}{8\sqrt{a^2-\frac{b^2}{4}}}-\frac{b^2}{8\sqrt{a^2-\frac{b^2}{4}}}$
$\frac{dA}{db} = \frac{4a^2-2b^2}{8\sqrt{a^2-\frac{b^2}{4}}} = 0$
$4a^2-2b^2 = 0$
$2b^2 = 4a^2$
$b^2 = 2a^2$
$b = \sqrt{2}~a$
The length of the third side should be $~~\sqrt{2}~a$