# Thread: Optimization problem - rectangle inscribed in a triangle

1. ## Optimization problem - rectangle inscribed in a triangle

Hi,

I'm trying to solve for the following problem: "determine the area of the largest triangle that can be inscribed in a right triangle with legs adjacent to the right angle that are 5 cm and 12 cm". This is how I solved the problem:

I got the correct solution. However, now I'm curious whether or not you could use implicit differentiation to solve this problem? As in, whether or not we could solve this question without plugging in (5 - (5x/12)) into the equation. I have high bets that you can't, but I would just like confirmation so then I can feel more confident in how to approach optimization problems.

- Olivia

2. ## Re: Optimization problem - rectangle inscribed in a triangle

we could use the method of Lagrange multipliers

Optimize xy subject to the constraint 5 x + 12 y = 60

3. ## Re: Optimization problem - rectangle inscribed in a triangle

By implicit differentiation:

$A' = x\dfrac{dy}{dx} + y = 0$

This simplifies to $\dfrac{dy}{dx} = -\dfrac{y}{x}$

You also have $y = 5-\dfrac{5x}{12}$ so $\dfrac{dy}{dx} = -\dfrac{5}{12}$

Setting these two expressions for $\dfrac{dy}{dx}$ equal, we have:

$\dfrac{dy}{dx} = -\dfrac{y}{x} = -\dfrac{5}{12}$

So, we now have a system of linear equations:

$y=\dfrac{5x}{12}$ and $y = 5-\dfrac{5x}{12}$

Setting them equal gives $x=6$.

4. ## Re: Optimization problem - rectangle inscribed in a triangle

I understand that dy/dx = -y/x... but why does y = 5- (5x/12) imply that dy/dx = -5/12? And where would does the equation y=5x/12 come from?

Sorry I just began learning implicit differentiation.

5. ## Re: Optimization problem - rectangle inscribed in a triangle

Originally Posted by otownsend
I understand that dy/dx = -y/x... but why does y = 5- (5x/12) imply that dy/dx = -5/12?
For $y = 5-\dfrac{5x}{12}$, we take the derivative of both sides:

\begin{align*}\dfrac{d}{dx}(y) & = \dfrac{d}{dx}\left( 5 - \dfrac{5x}{12} \right) \\ \dfrac{dy}{dx} & = \dfrac{d}{dx}(5) - \dfrac{d}{dx}\left( \dfrac{5x}{12} \right) \\ \dfrac{dy}{dx} & = 0 - \dfrac{5}{12} \\ \dfrac{dy}{dx} & = -\dfrac{5}{12}\end{align*}

Originally Posted by otownsend
And where would does the equation y=5x/12 come from?
We now have two formulas for $\dfrac{dy}{dx}$, so we set them equal to each other. This gives $-\dfrac{y}{x} = -\dfrac{5}{12}$. We solve for $y$ by multiplying both sides by $-x$:

\begin{align*}-\dfrac{y}{\cancel{x}}(\cancel{-x}) & = -\dfrac{5}{12}(-x) \\ y & = \dfrac{5x}{12}\end{align*}

6. ## Re: Optimization problem - rectangle inscribed in a triangle

Alright yeah that makes sense, thanks!