The Ladder in the MineThis example is taken from Applied Numerical Analysis by Curtis F. Gerald & Patric O. Wheatley, published by Addison-Wesley Publishing Company. To quote:"There are two intersecting mine shafts that meet at an angle of
123º, as shown in Fig. 1.1. The straight shaft has a width of 7 ft,
while the entrance shaft is 9 ft wide. What is the longest ladder that
can negotiate the turn?" We ignore the thickness of the ladder members here, but in reality you wouldn't. There is a relationship between the angle C and the length of the ladder, which we can express in mathematical terms as follows:
L1 = W1/sin(B)
L2 = W2/sin(C)
B = PI - A - C
L = L1 + L2 = W1/sin(PI-A-C) + W2/sin(C)
The maximum length of ladder that can negotiate the turn is the
minimum of L as a function of C. Hence we set dL/dC = 0.
dL/dC = W1*cos(PI-A-C)/sin^2(PI-A-C) - W2*cos(C)/sin^2(C) = 0
This must now be expressed in terms of Javascript math,
using given input values W1=9, W2=7 and (PI-A)=PI-123*PI/180=0.9948,
and substituting x for C, as follows:
9*cos(.9948-x)/(sin(.9948-x)*sin(.9948-x)) - 7*cos(x)/(sin(x)*sin(x)) alternatively: 9*cos(.9948-x)/(pow(sin(.9948-x),2)) - 7*cos(x)/(pow(sin(x),2)) Simply paste a copy of one of these equations into the f(x) box. By inspection, we conclude that the answer is somewhere between 0.35 and 0.55, so we type these values into xmin and xmax respectively. For the y-values, we enter -10 and 10. We set the tolerance at 0.00001 (i.e. accurate to 4 digits) and click <Solve>. The program returns with one value: 0.4677, which is .4677*180/PI=26.8 degrees.
Putting this value into the formula for L produces:
|