Aug 23, 2022

# The ladder and box problem - a classic challenge!

keep your decisions in mind i am preshtalwalker a

and a cube are in a room place the cube along the wall then rest the

along the wall so it only touches the side of the cube for accuracy think about the stair as a line segment if the stair has a length equal to 4 and the cube has a side length equal to 1 what is the distance between the top of the cube and the top of the stair denoted by the variable y in the following diagram thanks to nathaniel m mark l and per t for suggesting a

## challenge

find an exact answer for the general case where the

has length l and the cube has side length c pause the video if you want to try this

### problem

and when you are done ready keep watching to learn how to solve this

### problem

so how can we solve this

### problem

we have a

with a length of 4 a cube with a side length equal to 1 and we want to solve lver for distance and it looks simple but it's quite complicated the solution i am going to present is from user blue on math stack exchange i thought it was a very elegant solution we will start with the general case suppose the

has length l and the cube has a side length c we want to solve for y in terms of l and c to do that let's label a few more parts of this diagram the other side of the cube will also have length c and we will label the horizontal distance between the

and the cube x now let's do a little trick let's copy this diagram three different times and build a square this will create a clever geometric solution now let's put this diagram aside let's connect the four corners of these inner squares creating another square let's assume this square has length of side equal to w now let's label the area of ​​this triangle where the length of one side equals x as capital x we will label the other triangle with a side length and as a capital y we will label these parts in other parts of this diagram now suppose that this triangle has an area equal to z for symmetry these will also have areas equal to z y so as not to miss the square that consists of the four stairs we will put it in blue now let's calculate the area of ​​this green square well one way to calculate its area is that the length of its side is equal to w plus c so its area will be the amount w plus c squared another way is that we will add the areas of the rectangles inside this square here we have a square with an area that is equal to c squared so we have two rectangles as follows this is a rectangle and this is another rectangle we have two x terms and two y terms so we have twice the quantity x plus y and we have two z terms so get plus two z we also have this square that has side length equal to w so its area will be w squared we can simplify this formula a bit consider this rectangle half its area will be equal to z and half its area will also be equal to x plus y so x plus y equals z we substitute that t in this x term plus y y will become twice z then we group the z terms so that we have four times z now we simplify this formula one more time we have four z plus w squared which is exactly equal to that equal to the area of ​​this square that has side length equal to l so 4z plus w squared equals l squared and we plug that in now we have a very simple formula we take the square root of both sides and we'll take just the positive square root because we're considering positive lengths then we subtract c from both sides and get an equation for w in terms of the known values ​​of c and l now make an observation about w w is exactly equal to the length of the side of this block do that is equal to the quantity x plus y then if w is equal to x plus y and we want to solve for y to do that we will consider these triangles because the