Five-minute challenge - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: Five-minute challenge (/thread-177273.html) |
Five-minute challenge - David Hayden - 01-20-2011 A friend at work posed this math problem to me the other day. It isn't realistic, but it's still interesting - particularly because answer is surprising. A steel company has developed an experimental railroad rail. They can make very long rails without joints so they fabricate one that is 1 mile long (5280 feet). They lay it out straight and fix the endpoints to the ground. A few hours later, the rail had expanded in the midday heat. This expansion has added 1 foot of length to the rail, so now it is 5281 feet long. The end points are still attached to the ground, so the rail has warped and is no longer straight. Assume that the rail bends in a circular arc. The question is "how much has the rail warped at the mid point?" In other words, after adding 1 ft of length, the whole rail has bent. How far is the mid point of bent rail from it's original position?
Without doing any calculations, guess the answer. Re: Five-minute challenge - Don Shepherd - 01-20-2011 Very interesting problem. Before doing any math, I guessed maybe .1 inch. So I played with the math, circles, circumference, diameter, radius, and calculated the answer of 3.84 inches, but I have no idea if my assumptions are correct so I wouldn't bet any money on that answer. I'm looking forward to some answers from those engineers who know much more than I. Thanks for the challenge on a snowy day in Louisville. Don
Re: Five-minute challenge - Katie Wasserman - 01-20-2011 Off the top of my head, I think that this is like the "string around the earth" problem. My guess is that it's going to be really high in the middle......
Re: Five-minute challenge - Martin Pinckney - 01-20-2011 Quote:44.52 feet. Yes, I was surprised at how much.
Katie's estimate wasn't too bad.
Re: Five-minute challenge - Thomas Chrapkiewicz - 01-20-2011 Although a first order approximation, about 50 feet.
Re: Five-minute challenge - Walter B - 01-20-2011 I did guess less than a foot. Calculating with good ol' Pythagoras I get 51.4 feet. Surprise!
Re: Five-minute challenge - Walter B - 01-20-2011 First order approximation according to good ol' Taylor results in SQRT(2640) = 51.4 as well.
Re: Five-minute challenge - David Hayden - 01-20-2011 Martin, I get 44.4985 on my 50g. I get 78,335.0805ft for the radius of the circle. One of us is probably having a rounding error. I'll wait a day or two before posting details of the solution. I too was surprised at how big the deflection is. I was also surprised at how far off the "assume a right triangle" approximation is. Dave
Re: Five-minute challenge - Dave Shaffer (Arizona) - 01-20-2011 I get 44.50 feet (pretty close to Martin's answer).
This is why you need expansion joints in concrete sidewalks and roads. Otherwise, a bit of thermal expansion will cause considerable heaving.
Re: Five-minute challenge - Gerson W. Barbosa - 01-20-2011 I've found similar results using the HP-33s Solver:
R*SIN(2640.5/R)=2640 -> R=
Gerson.
Re: Five-minute challenge - Karl Schneider - 01-20-2011 (While I was busily writing, David Hayden, Gerson, and Dave Shaffer were posting identical results using what appears to be the same approach...)
I'd say that Martin's answer is correct, or very nearly so. I got 44.4984551 feet on my HP-32SII. At a family gathering in the 1970's, I remember my (non-railroad) engineer grandfather reading this problem and giving the answer for a straight expanded track. He, too, found the height of about 50 feet to be greater than expected. It really illustrates the importance of expansion joints in bridges, lest severe buckling occur during heat waves. The trigonometric solution for the straight expanded track is simple: 0.5 * sqrt(52812 - 52802) = 51.3833630665
Solving for the circular-arc expanded track proved to be more complicated. I got the answer from iterative solution of the well-known
(For a graphical illustration, please refer to Thomas Klemm's post deeper in this thread. Notational conversion: A/2 = x; h = e; d = L-1)
Addendum WolframAlpha can be utilized to solve many digits of an equation.
Formula: sinc(x) = 5280/5281 This value can be used in Windows calculator to calculate the rise (h) to 24 digits or so:
2640.5 2640
Edited: 30 Jan 2011, 5:51 p.m. after one or more responses were posted
Re: Five-minute challenge - Thomas Okken - 01-20-2011 Quote:It is my understanding that those extremely long railway rails basically aren't allowed to expand, i.e. they are anchored firmly enough to prevent them from buckling, and when they heat up or cool down, away from their "nominal" temperature, they just become compressed or stretched, respectively, but they don't move. Anyone who actually knows modern railway engineering firsthand, please correct me. :-) Edited: 21 Jan 2011, 12:01 a.m.
Re: Five-minute challenge - Paul Gaster - 01-21-2011 Sounds like some rails designs have gaps and others are just restrained from moving like you said. See here:
http://en.wikipedia.org/wiki/Track_(rail_transport)
Re: Five-minute challenge - Bill (Smithville, NJ) - 01-21-2011
Quote: Another place where expansion has to be taken into account is piping systems. We do hot/chilled water piping design and are very careful to allow for the expasion/contraction that can take place in the system. In underground piping systems, concrete thrust blocks are added at bends to ensure that the expansion takes place in the expansion joints and not have the pipe move at the direction change. It's not uncommon to have miles of underground piping on a large campus environment. But I have to admit, I was somewhat supprised at the 50 feet expansion over one mile.
Bill
Re: Five-minute challenge - Martin Pinckney - 01-21-2011 Quote:To be technically precise, the lateral displacement was (roughly) 50 ft. The expansion was 1 ft. Incidentally, this corresponds to about 23 degrees F temperature rise. Re: Five-minute challenge - Gerson W. Barbosa - 01-21-2011 Karl,
Quote: I don't remember the word you used in your first version of this text in place of busily. It was not diligently, but it had a close meaning and expressed better what you did. Congratulations for the nice work and your detailed and didactic explanations, as always. It takes time to provide a complete solution as you have done. Most here just don't have time to, anyway it is a good thing they occasionally take the time to solve problems and post the results so we can compare them to our own. As of me, I am just kind of lazy.
Quote: I do agree. Martin is a Civil Engineer, if I am not wrong, so his two-digit answer is good enough for practical purposes. I remember myself solving transmission lines problems (involving grossbeak aluminum cables and other birds names) and the answers to six decimal places during examinations, when two would have sufficed. My professor found that strange but would never say anything :-)
Quote: I am glad you have said this. So, I am not the only one :-)
Here is my solution, using a similar approach. Yesterday, at first I had used an expression involving the ASIN function at first, then switched to SIN. I have decided to use ASIN again, only because it's similar to the answer I got through Calculus. Anyway, both are equivalent: y-axis Regards, Gerson.
Edited: 21 Jan 2011, 1:26 p.m.
Re: Five-minute challenge - Gerson W. Barbosa - 01-21-2011
Quote:
Thanks, Martin, I was just going to check this out. Here in my area (southern Brazil), 40 °F temperature rise or greater is not uncommon.
Re: Five-minute challenge - Crawl - 01-21-2011 Yeah, as someone mentioned, this problem is similar to the "rope around the world" problem, which was mentioned here.
There, an extra meter in the length of the rope caused it to be raised up ~120 meters over the surface of the earth.
Re: Five-minute challenge - Bill (Smithville, NJ) - 01-21-2011
Quote: You're right - Expansion is only 1 foot. Thanks,
Bill
Re: Five-minute challenge - David Hayden - 01-21-2011 Gerson's first solution is exactly the way that I solved it. Thanks for the great explanation and the clever ASCII diagram.
Dave
Re: Five-minute challenge - Crawl - 01-21-2011 This problem has been solved a lot, but not a lot has been said about why the answer is so huge for a such a small input, so I want to talk about that. The reason is that the answer function does not have a Taylor series -- at least not at x=0 (if x is the slack in the rope around the world, or the expansion of the railroad). For the "rope around the world" problem, the first step (in my solution) was to solve -y + 2 tan(y/2) = x/r taking the taylor series of the left side, that's y^3/12=x/r or y = cuberoot(12*x/r) Then you plug y into r*(cos(y/2)+sin(y/2)*tan(y/2)-1) The lowest taylor series there is r*y^2/8. So finally, the height is 2^(1/3)*r/4*(3*x/r)^(2/3) So, the height goes as x^(2/3) power. This has infinite slope at x=0, explaining why the answer grows so rapidly even for very small x. I also should point out that that first order approximation is accurate enough to agree to all 5 digits of my originally quoted answer. For the railroad problem, not showing my work (there was way more work, at least for me, than the rope problem), but the final answer to first approximation is sqrt(6*m*x)/4 with m=5280, and x=1, this gives 44.497 Note: In form, this is very similar to the trigonometric solution, but is much more accurate! The trigonometric solution to first approximation is sqrt(2*m*x)/2 ~ 51.38 for the given values. Before going through the work myself, I might have thought the first approximation formulas (trigonometric versus circular) would be the same, but they're not. But again, the answer goes as squareroot of x, which has infinite slope at x=0.
Sort of interesting that the basic idea of the problems is so similar, as well as the large increase in the answer for small values of x, but the power dependency on x for the two problems is different. Edited: 21 Jan 2011, 6:40 p.m.
Re: Five-minute challenge - Crawl - 01-21-2011 But doesn't it seem like there should be a simple explanation for the factor of sqr(3)/2 difference between the two methods?
If so, that with the trigonometric approach would seem to be the simplest method to solve the problem.
Re: Five-minute challenge - Thomas Klemm - 01-22-2011 Quote:
Just using the Taylor expansion of the trigonometric functions I got:
Quote: This shows you can do better even without a fancy solver.
Cheers Edited: 22 Jan 2011, 2:35 a.m.
Re: Five-minute challenge - Crawl - 01-22-2011 Okay, so your formula looked like my formula. So why did mine give a slightly better result? They're not actually the same. Mine was sqr(3*m*x/8) while yours was (effectively, since you substituted in x=1) sqr(3*(m+x)*x)/8) That's actually not a first order formula, since it has an x^2 term. If m is large compared to x, you drop x in m+x.
You might think going to second order would improve the accuracy, not decrease it, but that might not be the correct second order approx., if second order terms were dropped earlier.
Re: Five-minute challenge - Thomas Klemm - 01-22-2011 Quote: Honestly I must admit that I didn't realize that you provided a solution to this problem but was thinking you were only dealing with the rope problem. I'd be interested to see your approach and might not be the only one.
Best regards Re: Five-minute challenge - Gerson W. Barbosa - 01-22-2011 Quote: Actually, your solution meets David Hayden's second question ("Can you find the exact (within 2 decimal places) answer?") while being able to do it on a 4-banger. Well done!
Quote:
e = r - sqrt(r2 - ((L-1)/2)2) e = L*sqrt(L/24) - sqrt(L3/24 - (L-1)2/4) e = 44.4971906 That's very close to Crawl's approximation but, unlike his or yours, far from concise. Adding another term to the first series would require solving a quartic equation in order to find the radius. Fortunately, it is reducible to a quadratic equation and can be done by hand. Eventually I got, following your steps: r = L/(2*sqrt(10*(1-sqrt(1-6/(5*L))))) which, when plugged into the first equation above, yields e = 44.498455 (44.49845 on the HP-12C and probably even less accurate on an ordinary 4-banger) As a comparison, the actual result to 12 significant digits is e = 44.4984550191 Regards, Gerson.
Re: Five-minute challenge - Crawl - 01-22-2011 The approach is exactly the same in terms of setting up the problem. You just have to be careful when selecting the number of terms to retain. I went ahead and got the second order solution. It is y = sqrt(6mx + 9/5 x^2)/4
Re: Five-minute challenge - Karl Schneider - 01-22-2011 Gerson -- Thank you for the compliments. My only objective was to solve the problem with minimal effort in a straightforward fashion using the 'favored' tools we have at our disposal, and to show the procedure clearly. I believe that I'd examined a problem like this one before, but could not readlity deduce any apparent trigonometric formula to solve it. The mathematical work done by you and Thomas Klemm in particular was more impressive, and Thomas also prepared a nice diagram to accompany his symbolic algebra. Of course, the algebraic methods of estimation worked only because the angle was very small. In the days before calculators and computers, I suppose that an engineer or architect would refer to pre-calculated tables of the 'sinc' function to solve it. The function is used in signal processing. -- Karl
Edited: 23 Jan 2011, 1:45 p.m. after one or more responses were posted
Re: Five-minute challenge - Gerson W. Barbosa - 01-22-2011 Thanks, Karl, for your comments. As of the sinc function, I thought of finding an approximation for it to make the solution not dependant of the solver. Sinc(x) ~ cos(x*sqrt(3)/3) might be an option and would have yielded 3 correct decimal places in your method (44.49827). The constant has no mathematical meaning, but works for small angles. That's cheating, however...
Gerson.
Re: Five-minute challenge - Paul Dale - 01-22-2011 Gerson,
Very nice
- Pauli
Re: Five-minute challenge - Gerson W. Barbosa - 01-22-2011 That was found when solving SIN(A)/A-COS(A*X)=0 for X, A=3.37077587945e-2 (that's A/2 in Karl's post above). I got X=5.7734397696e-1 which is very close to sqrt(3)/3 (off by 7.29e-6). For X=0.5 up to X=1 the difference ranges from 1.e-5 to 6.6e-3. I tried a correction term but I discarded it because it was not suitable for the problem (y ~ cos(x*sqrt(3)/3)+(2+sqrt(3))/1000*x^4).
Re: Five-minute challenge - Gerson W. Barbosa - 01-23-2011 Quote: I should have said "the constant has no mathematical meaning I am aware of". Sqrt(3)/3 appears to be the exact value for k in y = sinc(x) - cos(k*x) that yields maximum accuracy. A little more or a little less will degenerate the approximation and make the function either change sign or oscillate around zero. The Wolfram Alpha's graph can show y(x) is always positive until the range is narrowed down to [-1e-3, 1e-3], when the machine precision limit is reached. By the way, an exact equivalence is
sinc(x) = 1/(Gamma(1 + x/pi)*Gamma(1 - x/pi))
(See MathWorld Sinc Function page, formula #10)
Re: Five-minute challenge - Stuart Sprott - 01-24-2011 Your method is more accurate than you realise. If you solve for the radius as you suggest, the radius is 78315.056. Next solve directly for the angle 2x, by arc/radius. ie 5280/78315.056. This is .067420 radians and equivalent to 3.862881 degrees. Therefore x = 1.931441 degrees. And (1- Cosx) = .000568 And finally defelection = .000568*78315.056 = 44.492977
This answer is only 0.005 different to the correct result. If you work backwards from the above the chord length is 5279.00051. So for all practical purposes the above is correct.
Re: Five-minute challenge - Crawl - 01-24-2011 I think I figured that out, and in the process came up with a slightly different way to solve the problem. Imagine that we have the normal "small angle" slice of a circle.
Let's just set r=1. The green line is sin(t), the blue line (after a bit of geometry) is sqrt(2(1-cos(t))), and the black arc is of course t. What we want to find out is how the blue line and the black arc compare to the green line when t is small. The taylor series of sqrt(2(1-cos(t)))/sin(t) = 1+t^2/8 The taylor series of t/sin(t)= 1 + t^2/6 So, if the green line is normalized to 1, the blue line (trigonometric solution) is normalized to 1+t^2/8, and the circle is a little bit larger (naturally), 1+t^2/6. t^2/6 IS the added length (or half of it, but it doesn't really matter since we're normalizing everything) Since the green line is normalized to 1, that basically means we're dividing by m. The extra length is then x/m. This means t = sqrt(6x/m) plugging that into t^2/8 (the extra for the trigonometric case), we get 3x/(4m). In other words, if we replace the extra length x/m with the "adjusted" extra length 3x/(4m), we can use the trigonometric solution and get the same answer. The trigonometric solution was m*sqrt(2(x/m))/2. So the real correct solution is m*sqrt(2 (3x/4m ))/2 = sqrt(6xm)/4.
Re: Five-minute challenge - Gerson W. Barbosa - 01-24-2011 Quote: Paul, What about this one? Of course, this is not related to the orignal problem anymore.
Gerson. Edited: 24 Jan 2011, 5:34 p.m.
Re: Five-minute challenge - Thomas Klemm - 01-24-2011 Very nice! But I think we can do without the indirection of the "trigonometric solution", once we realize that the small angle in the green-red-blue triangle is in fact t/2.
Now we can use t to calculate the lateral displacement e:
Cheers Re: Five-minute challenge - Werner - 01-25-2011 For those with a 42S, a general inverter: Re: Five-minute challenge - Thomas Klemm - 01-26-2011 Power Series of EquationInstead of solving the following equation for t I tried to calculate the inverse of the Taylor expansion using WolframAlpha.
As can be seen by the graph there's a minimum at the point (0, 1).
This makes the inversion difficult since the first derivative of the inverse function is infinite. Thus I use the following substitution:
Now the graph has a positive derivative:
This leads to the following equation:
Let's try to find the Taylor series expansion:
Series[Sqrt[x]/Sin[Sqrt[x]], {x, 0, 4}]
Thus we end up with:
Inversion of Power SeriesStarting with the equation f(y(x)) = x I calculated little by little the derivations:
D[x=f[y[x]],{x,1}]
D[x=f[y[x]],{x,2}]
D[x=f[y[x]],{x,3}]
D[x=f[y[x]],{x,4}]
From the coefficients of the power series we can easily calculate the derivation at x = 0:
y'[x] = 1/6 If we put these values into the equations below we get a system of linear equations:
f'[y[x]] y'[x] == 1
Solve[{ Here's the solution:
From these values we can finally calculate the coefficients of the inverse power series:
Calculation of the lateral displacementWe use the same formula as before:
Now we plug the expression for t into 4 tan2(t/2) and calculate the power series of that:
Series[4 Tan[Sqrt[6y-21y^2/5+564y^3/175-459y^4/175]/2]^2,{y,0,4}]
After a last substitution y=d/m we finally get:
Using only the first three terms I get the same value to 12 places as Gerson stated in message #36:
Quote:
Cheers
PS: InverseSeries Re: Five-minute challenge - Gerson W. Barbosa - 01-26-2011 And this was supposed to be a 5-minute challenge...
Quote: Impressive work! You and Crawl have derived an elegant and compact formula for a non-trivial problem.
Here are the numeric results the formula gives gives out, from 1st through 4th order: 1st: 44.497190922573977692 The latter agrees with the actual result to 17 significant digits!
In order to get all those digits, I had to ask WolframAlpha Regards, Gerson.
Re: Five-minute challenge - Thomas Klemm - 01-27-2011 Meanwhile I had access to Mathematica where the whole thing is much easier:
4 Tan[Sqrt[InverseSeries[Series[Sqrt[x]/Sin[Sqrt[x]] - 1, {x, 0, 6}]]]/2]^2
Funny to see how the coefficients start to become very complicated. Just out of curiosity: Is it possible to do something like this with the CAS of the HP-50g?
Cheers Re: Five-minute challenge - David Hayden - 01-29-2011 Through a coincidence worthy of a Hollywood movie, I actually had a somewhat practical application of this very problem today. We have some chairs on our porch. The seats are supported by an elastic webbing similar to this. The original webbing stretched out over the years so I cut it, but it just stretched out more and I decided to replace it. A little hunting on the internet led me to elastbelt webbing which stretches about 7%-10%. When you install the webbing, you pull it tight, so say it can only stretch an additional 5% once installed. If the seat is 20" wide and the webbing stretches 5%, how much will it sag when I sit in it? Will I be able to get out of the chair to say hello to the neighbors when they walk by? Will it sag enough to be comfortable?
I may have done the calculations wrong, but I figured it should sag about 2.7590" - Perfect! :)
Re: Five-minute challenge - Gerson W. Barbosa - 01-31-2011
Quote: I fear the HP-50g lacks InverseSeries, otherwise I think it would handle that. By the way, I've just found someone else's attempt: http://www.moderatenerd.com/2009/12/15/the-expanding-rail-problem/ Cheers,
Gerson.
Re: Five-minute challenge - Gerson W. Barbosa - 01-31-2011 Quote: Thomas, The sixth term simplifies to 683073/50050000*x^6: It would be interesting if there was a way to force the first terms to be left unsimplified, to see how they generalize (if they do at all). Cheers,
Gerson.
Re: Five-minute challenge - Thomas Klemm - 02-01-2011 Thanks for both the answer and the link. Looks promising. It seems there's nothing new under the sun and Google has an answer to every question.
Cheers |