Algebra Trig ?
I have a problem I can solve but I need a better solution.
The equation is
y = r - r * COS( d / r )
Given d and y find r.
r= ?
I don't think a picture will make the equation solvable, but here's a picture.
http://1.bp.blogspot.com/_gQkeSWqb63Q/SoS1r1bjrCI/AAAAAAAAAFY/_aQzlEhMJY4/s1600-h/tom-Capture.JPG
The equation is
y = r - r * COS( d / r )
Given d and y find r.
r= ?
I don't think a picture will make the equation solvable, but here's a picture.
http://1.bp.blogspot.com/_gQkeSWqb63Q/SoS1r1bjrCI/AAAAAAAAAFY/_aQzlEhMJY4/s1600-h/tom-Capture.JPG
Labels: SharedPuzzle





28 Comments:
Hm, maybe you could give us your solution so we can improve =)
Which numbers have to be real and which one can be complex? My equations tell me that there's no solution for real r. (are they lying? ^^ )
All the numbers are real.
The problem is one of finding the radius of a circle. d is the arc length, y is a perpendicular distance to the PT, and r is the curve's radius.
The solution I use is one of assuming r, finding the y' and adjusting r until y' and y are equal.
Hm, I think I cant follow you...
the arc length is 2Pi*r -> Cos[d/r]=Cos[2Pi]=1 lol :) or what kind of arc are you searching?
Maybe a picture or a link where the problem is explained in more detail would be helpfull :)
greetz
Draw a circle radius r, centre O. Draw a radius from 0 to a point A on the circle (make it at 3 o'clock). Draw another radius from O to B at about half past one o'clock.) Drop a perpendicular from B to P on OA. Angle OPB is a rightangle. The circular arc length between A and B is d. Angle AOB = d/r radians. Then OP =r cos(d/r), and PA = y.
Thanks for the nice explanation!
NOW I can imagine what is being talked about ;)
But thinking will be done tomorrow, too late now.
Here's a picture
http://1.bp.blogspot.com/_gQkeSWqb63Q/SoS1r1bjrCI/AAAAAAAAAFY/_aQzlEhMJY4/s1600-h/tom-Capture.JPG
Thanks for the picture. It took me a few moment to realise that this indeed was correct (as it was laid out differently from my description).
Sadly, I've come to the conclusion that, except for a few special cases, this problem requires approximate methods (Ragknot outlined an approach). No doubt there will be graphical methods and obviously numerical computaion methods.
I haven't spotted a neat geometrical trick to do it. You certainly can't find an elementary function such that r = f(y,d).
I can tell you this bit of info
If you can solve for r, you will find a very good coorelation between y/d and r/d.
In fact
r = 0.466 * (y / d) ^ (-1.0224) * d
Gives you the correct r within 2% almost all the time. The constants above are from the trend of about 20 problems. This is why I think there must be a solution to the algebra.
Here's a table where I solved for r. (I made d and y whole numbers just for this table.)
d y r
225 56 442.347
155 12 999.035
29 9 45.137
196 91 193.664
291 135 287.808
205 73 274.732
41 12 67.942
377 163 405.460
162 31 418.019
204 79 248.984
380 80 888.837
126 23 341.227
28 7 54.792
262 25 1368.693
287 14 2939.414
104 20 266.998
248 13 2363.369
303 151 274.327
129 19 434.717
223 99 232.480
264 74 458.025
362 161 376.580
4 2 3.606
336 44 1275.508
77 10 294.768
160 8 1598.665
119 8 883.726
Ragknot, I only just noticed you posted the problem. I'd love to see that table with the result from the statistical formula alongside.
My guts tell me that there can only be clever/efficient algorithms but no elementary function for one step computation. Many functions don't have an explicit inverse. For instance it is impossible (in general) to solve a quintic and up polynomial. The current problem involves an infinite polynomial.
If small angle (i.e. d << r, then r = d^2/(2y) approx. This seems to give a decent first approximation.
Seems reasonable that small angle also => y << d
I've just re-inspected your statistical equation.
Using the obvious .466->0.5 and 1.0224->1
=> r = .5(d/y)d = d^2/(2y).
But I got there by using cos(x)=1-x^2/2 for small x.
Well, y can't be as large as d, and y can't be large as r.
A little background would be interesting.
This is a function used in construction. roads and hiways use something similar, but moving vehicles use a more elaborate curve, such as a spiral curve.
a dam would have a simple curve like this with tangents at each end of the arc. If you are investigating an existing dam, the center of the arc would be out in water. I am developing this alternative to find the radius of a curve without getting in the water. Using my method, an inspector can learn the radius for information about rebuilding the dam with only one extra measurment. The ends of the arc are on the top of the dam and the y distance can be measured from the end of the arc to a point on the back of the dam.
How do you measure distance y?
Wouldn't it be easier to measure d and the angle (d/r) directly?
You can perform substitution x=1/r and \alpha =y/2d and obtain equation \alpha *x=\sin ^2 x. The folloowing solution is numerical and depends on value of \alpha.
Hey there, as discussed before I think we can say that theres no algebraic solution here.
So what I did was to insert the series expansion of Cos(d/r) up to the fourth grade and then we get a eq. in r^3.
Nevertheless its not really "pretty" but maybe you can work with it. The error is of the Order O(d/r)^5 or smaller.
Cos[x]= n=0-->oo Sum[ ( ((-1)^n)/((2n)!) )*x^(2n)]
Which leads to Cos[d/r]=1-1/2*(d/r)^2+1/4!*(d/r)^4
Insert that in our eq. and move some stuff around leads to:
r^3-r^2*(d^2/(2y))+d^4/(24y)=0
it yields 3 Solutions which are ugly one the one hand, and 2 of them are complex on the other hand, so you probably will use only the first one four your problems.
Here is a link for the solutions, cant type them in properly here:
http://www.wolframalpha.com/input/?i=Solve%5B+r%5E3+-+%28d%5E2%2F%282+y%29%29+r%5E2+%2B+%28d%5E4%2F%284%21+y%29%29+%3D%3D+0%2Cr%5D
So at least you have an approximative algebraic solution for your problem. Please check out how good this approx. is and post it here.
I hope that helps ;)
greetz
Thanks for that link to wolframalhpa.com. That could be really useful round here.
You'll notice that Mathematica whinges when you ask it to solve the original equation.
NB Reduce is more powerful than Solve in Mathematica.
Here's my method, that works pretty well. I test first to make sure d>y then assume y=d then
loop thru this until diff <.00001
which usually takes 6 or 7 loops. Each loop gives an r closer to
the correct solution.
test = r - r * Cos(d / r)
diff = Abs(test - y)
r = r * test / y
sorry, I should have said I assume r = d, not y=d.
Ragknot, I don't know how you obtained your algorithm, but it does seem to converge quite rapidly. If use the initial estimator, r = d^2/(2y), you'd get there quicker (for what it's worth). Even use an estimate based on gut feeling.
I don't understand why you don't simply measure the angle and length of arc directly.
Chris,
We do measure the arc length when putting stakes along the center line of the dam. The end points of the arc are the PC and PT stations. Most of crews use a dumpy level to get elevations and distances, they have no way of measururing angles. This methods allows us get the data we need with one extra measurment.
We do have a professional survey crew but they are always tied up with bigger and more critical projects. This is for the hundreds small of county teams workimg on hundreds of small farm dams.
The r = d^2/(2y) is an excellent starting place.
Seems like you've got about the best algorithm already. Just use that improved initial estimator to save quite a few iterations.
y = r - r * COS( d / r )
y * r = r - r * COS(d)
r = (r - r * COS(d)) / y
I could be wrong. I don't have a calculator with me so I can't check my work.
Comment posted by: Vincent Jumper
This post has been removed by the author.
This post has been removed by the author.
This post has been removed by the author.
VJ. A few flaws in your algebra.
You cannot take the "r" out from cos(d/r). Even if you could, you should have then got (for the second equation):
y = r - cos(d)).
Your third line does follow from your second line. Continuing from that - divide throughout by r and you get 1 = (1 - cos(d))/y and r has been completely eliminated.
If you're running Windows, then you do have a calculator, you'll find it under "Accessories" on the start menu, just set it to scientific mode to get trig functions etc.
Post a Comment
Links to this post:
Create a Link
<< Home