Home » Blog » Maximize the value 2a + b where a and b are the legs of a right triangle with hypotenuse 1

Maximize the value 2a + b where a and b are the legs of a right triangle with hypotenuse 1

Consider a right triangle with hypotenuse 1. Let a and b denote the lengths of the legs of the triangle. Find the values of a and b such that the value 2a+b is maximized.


We have the following right triangle:

Rendered by QuickLaTeX.com

From the Pythagorean theorem we have

    \[ a^2 + b^2 = 1 \quad \implies \quad a = \sqrt{1-b^2}. \]

So we want to maximize,

    \[ 2a + b = 2\sqrt{1-b^2} + b. \]

Calling this function f(b) and taking the derivative,

    \[ f'(b) = -\frac{2b}{\sqrt{1-b^2}} + 1. \]

Setting this equal to 0 we find the critical points of the function f(b),

    \begin{align*}  -\frac{2b}{\sqrt{1-b^2}} + 1 = 0 && \implies && -2b + \sqrt{1-b^2} &= 0 \\  && \implies && 2b &= \sqrt{1-b^2} \\  && \implies && 4b^2 &= 1-b^2 \\  && \implies && b = \frac{\sqrt{5}}{5}.  \end{align*}

Since

    \begin{align*}  f'(b) &> 0 & \text{when} && b&< \frac{\sqrt{5}}{5} \\  f'(b) &< 0 & \text{when} && b&> \frac{\sqrt{5}}{5} \end{align*}

we have that f(b) has a maximum when b = \frac{\sqrt{5}}{5}. Therefore, since a = \sqrt{1-b^2} we then have

    \[ a = \frac{2\sqrt{5}}{5}. \]

Thus, the maximum of 2a + b is

    \[ 2a + b = \frac{4\sqrt{5}}{5} + \frac{\sqrt{5}}{5} = \sqrt{5}. \]

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):