# Finding the angle between two intersecting hallways

1. Feb 15, 2014

### D.Boxer

Hey

I was wondering if someone could help me with this. I suspect it has an easy solution, but I just need some verification.

L is a ladder between two hallways. How can someone find the angle theta??

Excuse my silly question, but I would really like some input if possible.

Thanks

2. Feb 15, 2014

### sjb-2812

Can you write AB in terms of theta and the width, and BC in terms of theta and the width, and so form an expression for AC?

3. Feb 15, 2014

### D.Boxer

In the question, it says that: AC = AB + BC = (8/sin(Theta) ) + (5/cos(Theta) )

I just want to know the angle theta to know the length of AC that constitutes the longest ladder possible to be carried to the right side of the room.

4. Feb 15, 2014

### lendav_rott

Compare 2 similar right-angled triangles.

5. Feb 15, 2014

### Staff: Mentor

Theta will vary from 0 to 90 degrees as the ladder is carried to the right side. This problem is about finding the minimum of a function of theta. Are you by any chance studying differential calculus now?

6. Feb 15, 2014

### D.Boxer

No. I am not studying differential calculus.
the requirement of the question is that I need to be able to enter two widths of both the hallways, and then calculate the length of the longest possible ladder that can be carried to the right-side of the room using this formula: AC = AB + BC = (8/sin(Theta) ) + (5/cos(Theta) )

I don't think there is a time element in here to include differential calculus, right??

7. Feb 15, 2014

### bahamagreen

Looks like a possible violation of OSHA standard 1910.36 - must maintain minimum of 28 inch clear width for emergency egress. :)

Here are some hints:

Notice that the ladder is going to stay in contact with the inside corner and outer walls during the configurations where you are interested in finding the longest possible ladder length.

It is not time based, but you are comparing two changing things.

You have probably already discovered by inspection that the longest passable ladder is longer than 13 feet, right?
(if you have, you will understand the x and y below...)

Notice the large right triange formed by A C and the outer corner (hypotenuse AC).

That triangle has height 5 + x, and width 8 + y, and hypotenuse AC
(you see where the x and y are coming from?)

See if that helps...

8. Feb 15, 2014

### D.Boxer

That actually helped, but I have an idea.

The whole point of the question was to design a program in Java to solve the above problem using any two widths entered by the user.

I figured that since Theta is between 0 and 90 degrees, I can run the calculation in a loop 90 times, and get the shortest AC that will go through all the angles.

The shortest AC in that loop would go safely from 0 -> 90 degrees with no issues, and it will technically be the longest possible ladder to go from corridor A to corridor B.

What do you guys think about that solution??

P.S: For the above widths, the longest possible length of the ladder was 18.22 ft

9. Feb 15, 2014

### Staff: Mentor

Sounds about right to me. You won't be exactly right if it turns out the minimum AC value is reached for an angle that falls between two of the ninety angles you tried, but it will be close. (You might want to think about whether this error will give you an answer slightly tOo high or slightly too low - one is a much worse mistake than the other).

I mentioned differential calculus because if you had to solve the problem yourself, instead of instructing a computer to brute-strength it, you would write the distance AC as a function of theta (for given hallway widths). Calculus then gives you a general formula for the value of theta at which the AC distance is smallest.

10. Feb 15, 2014

### D.Boxer

Thanks, but I'd rather leave differential calculus for next semester :D

11. Feb 15, 2014

### haruspex

You should have mentioned that in the OP. Saves responders wasting effort on irrelevant responses.
It would be much more accurate and efficient to converge on the answer. It's reasonably obvious that the graph of L against θ is convex, reaching a single local minimum and no local maxima. So you can use a kind of binary chop. This is a good programming exercise.