# Will it fit?

#### Mario P

I'm trying to calculate if this 40'x8'x8.5' shipping container would fit (pivot) around the corner. There is no way to bring it from the other side.
I can do the calculations if it was just a 40' pipe, but the 8' width of the container throws in a vector that I'm struggling with.

#### skeeter

Math Team
What is the minimum distance a 40 ft rod (with both ends very close to the x and y axes) be from the corner located at (17,21) ?

How far would it have to be for the container to make it around the corner?

#### Mario P

Sorry skeeter, I don't understand the question.
I'm trying to come up with a formula to figure out whether the container measuring 40 feet long by 8 feet wide will make it around the corner.

#### skeeter

Math Team
Reference the attached graph ... The solid line segment 40' in length represents the bottom side of the container. The container will experience the tightest squeeze when it makes a 45 degree angle w/respect to both the x and y axes. If the distance along the dashed line from the corner point (17,21) to the solid line is $\ge$ 8, the container will make it around the corner. If not ... #### skipjack

Forum Staff
Why a 45 degree angle?

Math Team

#### skeeter

Math Team
Trying again ...

Reference the graph, the line segment of length 40 representing the far side of the container has equation $(\tan{\theta}) \cdot x + y - 40\sin{\theta} = 0$

using the distance formula between a point and a line, the distance $D$ is ...

$D = \dfrac{|17\tan{\theta}+21 -40\sin{\theta}|}{\sqrt{\tan^2{\theta}+1}}$

Since $0 < \theta < \dfrac{\pi}{2}$, both numerator and denominator are strictly positive values ...

$D = 17\sin{\theta} + 21\cos{\theta} - 20\sin(2\theta)$

$\dfrac{dD}{d\theta} = 17\cos{\theta} - 21\sin{\theta} - 40\cos(2\theta) = 0$

solving with a calculator yields $\theta \approx 48^\circ$

Minimum distance can now be calculated using the distance formula above. Thank you.