You kick a ball over a flat field. Taking into account gravity, but disregarding everything else like wind, friction, bounces, etc., etc., at what angle should you kick it so the ball lands the farthest away from you? And at what angle should you kick it so the ball makes the longest trajectory before landing?
The reason Charlie's second program does not converge to the positive
solution is because his numberical technique is not guaranteed to
allways work.
To see why, make a plot of tan a, and e^(1/sin a)-sec a. Begining close
to the positive solution (where they cross), follow Charlie's
program by drawing vertical and horizontal lines, and you
will see that it is doomed to spiral out of control until it finds a
negative angle.
Here are some trivial (non-transcendental) examples of the capricious behavior of Charlie's numerical technique,
x = -x. Never converges to x = 0.
x = x^2, can converge to x =0, but never to x = 1.
x = sqrt(x), allways converges to 1, never to x = 0.
----
The negative angle Charlie found does have a physical meaning; it correspond to the angle measured at the ball's landing spot!.
----
At the same time one could ask, why did you not find the solution at
180-56.5 = 123.5 (the "backward" kick)?. The reason is because during
the math steps, I took sec a = sqrt(1 + tan^2 a), which not valid for
90 < a < 270 where sec a = -sqrt(1+tan^2 a).
Retracing the algebra steps, I get that for a backward kick, (90 < a < 270) the extreme trajectories are at,
dL/da ~ 1 + sin a * ln[tan a - sec a] = 0.
The nice thing is that this time,
a = arctan[e^(-1/sin a) + sec a] + 180
does converge to 123.5 (at least it does so graphically, Charlie can try it if he wants).
Finally, there is another "solution" at 180 + 56.5 =236.5, which is the
angle measured at the landing spot of a ball that is "backward kicked".
To get to this solution this we would have to use a more reliable
numerical method (such as Newton's formula).
|
Posted by ajosin
on 2005-03-22 05:34:09 |