All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Make it go! (Posted on 2005-03-18)
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?

 See The Solution Submitted by Federico Kereki Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 Numerical Solution of Second Part | Comment 5 of 17 |

The answer to the first question is well known: 45 degrees will carry a projectile the farthest distance while returning it to its original height.

The second question is more challenging.

The path of the projectile (its trajectory) is a parabola (for purposes of the problem as stated, that is--its actually a segment of an ellipse with one focus at the earth's center, considering that the earth is round--and even that is discounting coriolis effects, due to the earth's rotation). If h is the maximum height the ball reaches and d is the horizontal distance to the point directly below where this maximum height is achieved, the equation for the parabola is

y = h - k*(x-d)^2

where the constants h, d and k can be found from

vertical velocity, vv = v*sin(angle)
horizontal velocity, vh = v*cos(angle)

tm = vv/32
h = tm*vv/2
d = vh*tm
h = k*d^2; therefore k = h/d^2

Taking differentials,

dy = -2*k*(x-d) dx

To find the total length along the parabolic arc, we need to integrate Sqrt((dx)^2 + (dy)^2), or

Integ(Sqrt(4*k^2*(x-d)^2 + 1)) dx

Using Wolfram's "The Integrator" (Google search "The Integrator" and click "I'm Feeling Lucky"--*'s are not needed in the formula but the brackets for the Sqrt function need to be square brackets, but not the other parentheses), the antiderivative is given as

-(1/2)Sqrt(1 + 4*k^2*(d-x)^2)*(d-x) - Arcsinh(2*k*(d-x))/(4*k)

This needs to be evaluated between 2*d and zero.  The following program does this and finds a maximum at around 56.46583 or 56.46584 degrees (about 0.9855147 radians).  The programs answers were checked for reasonableness near 90 degrees (a little more than twice h) and near 0 degrees (a little more than twice d) and intermediate angles (a little more than twice the hypotenuse, extending from the origin to the apex of the trajectory), and then the range of angles tested narrowed down to where they are here.

The formula for the inverse hyperbolic sine came from http://www.sosmath.com/trig/hyper/hyper03/hyper03.html

The angle for the maximum did not depend on either the initial velocity or the value chosen for g, the acceleration due to gravity.

DECLARE FUNCTION integ# (x#)
DECLARE FUNCTION asinh# (x#)
DEFDBL A-Z
DIM SHARED h, k, d, dr, pi, g
g = 32
pi = ATN(1) * 4
dr = pi / 180

angle = 45
v = 100

CLS
FOR v = 100 TO 200 STEP 100
FOR angle = 56.4657 TO 56.4659 STEP .00001
vv = v * SIN(angle * dr)
vh = v * COS(angle * dr)

tm = vv / g
h = tm * vv / 2
d = vh * tm
k = h / (d * d)

totalD = integ(2 * d) - integ(0)

PRINT USING "###.##### ###.## ####.## ####.## #####.######### #.#######"; angle; v; h; 2 * d; totalD; angle * dr

NEXT
NEXT

FUNCTION asinh (x)
asinh = LOG(x + SQR(x ^ 2 + 1))
END FUNCTION

FUNCTION integ (x)
integ = (x - d) * SQR(1 + 4 * k * k * (d - x) ^ 2) / 2 - asinh(2 * k * (d - x)) / (4 * k)
END FUNCTION

with the results:

` angle    init v    h      2*d    traject length  angle in radians     `
` 56.46570 100.00  108.56  287.80   374.899575078 0.9855123 56.46571 100.00  108.56  287.80   374.899575079 0.9855125 56.46572 100.00  108.56  287.80   374.899575079 0.9855127 56.46573 100.00  108.56  287.80   374.899575079 0.9855129 56.46574 100.00  108.56  287.80   374.899575079 0.9855130 56.46575 100.00  108.56  287.80   374.899575080 0.9855132 56.46576 100.00  108.56  287.80   374.899575080 0.9855134 56.46577 100.00  108.56  287.80   374.899575080 0.9855136 56.46578 100.00  108.56  287.80   374.899575080 0.9855137 56.46579 100.00  108.56  287.80   374.899575080 0.9855139 56.46580 100.00  108.56  287.80   374.899575080 0.9855141 56.46581 100.00  108.57  287.80   374.899575080 0.9855143 56.46582 100.00  108.57  287.80   374.899575081 0.9855144 56.46583 100.00  108.57  287.80   374.899575081 0.9855146 56.46584 100.00  108.57  287.80   374.899575081 0.9855148 56.46585 100.00  108.57  287.80   374.899575081 0.9855150 56.46586 100.00  108.57  287.80   374.899575080 0.9855151 56.46587 100.00  108.57  287.80   374.899575080 0.9855153 56.46588 100.00  108.57  287.80   374.899575080 0.9855155 56.46589 100.00  108.57  287.80   374.899575080 0.9855157 56.46590 100.00  108.57  287.80   374.899575080 0.9855158`
` 56.46570 200.00  434.26 1151.22  1499.598300314 0.9855123 56.46571 200.00  434.26 1151.21  1499.598300315 0.9855125 56.46572 200.00  434.26 1151.21  1499.598300316 0.9855127 56.46573 200.00  434.26 1151.21  1499.598300317 0.9855129 56.46574 200.00  434.26 1151.21  1499.598300318 0.9855130 56.46575 200.00  434.26 1151.21  1499.598300319 0.9855132 56.46576 200.00  434.26 1151.21  1499.598300319 0.9855134 56.46577 200.00  434.26 1151.21  1499.598300320 0.9855136 56.46578 200.00  434.26 1151.21  1499.598300321 0.9855137 56.46579 200.00  434.26 1151.21  1499.598300321 0.9855139 56.46580 200.00  434.26 1151.21  1499.598300322 0.9855141 56.46581 200.00  434.26 1151.21  1499.598300322 0.9855143 56.46582 200.00  434.26 1151.21  1499.598300322 0.9855144 56.46583 200.00  434.26 1151.21  1499.598300322 0.9855146 56.46584 200.00  434.26 1151.21  1499.598300322 0.9855148 56.46585 200.00  434.26 1151.21  1499.598300322 0.9855150 56.46586 200.00  434.26 1151.21  1499.598300322 0.9855151 56.46587 200.00  434.26 1151.21  1499.598300322 0.9855153 56.46588 200.00  434.26 1151.21  1499.598300321 0.9855155 56.46589 200.00  434.26 1151.21  1499.598300321 0.9855157 56.46590 200.00  434.26 1151.21  1499.598300320 0.9855158`

 Posted by Charlie on 2005-03-18 20:52:07

 Search: Search body:
Forums (0)