# Drawing Blanks

Premature Optimization is a Prerequisite for Success

## Optimal angle for throwing things from a height

We know that we need neither calculus nor trigonometry in order to prove that the 45 degree angle maximizes the distance.

https://bbzippo.wordpress.com/2010/01/14/45-degrees-proof/

https://bbzippo.wordpress.com/2010/01/19/45-degrees-optimum-geometric-proof/

That is, when we are on a flat surface, or more precisely, when the landing point is at the same height as the launch point.

Finding the angle that maximizes the horizontal distance when the launch point is elevated is generally considered a much harder problem. See e.g. here for a solution http://luckytoilet.wordpress.com/2010/08/07/throwing-a-rock-off-a-cliff-calculating-the-optimal-angle/

I’ve just learned that there exists a trick that allows to solve this problem without differentiation.

First let’s consider the family of trajectories of the body launched at different angles at the same initial speed:

The red-highlighted curve is the 45-degrees parabola.

And what is the green curve? It is the envelope of our family of trajectories.

It is called Torricelli’s Parabola of safety http://en.wikipedia.org/wiki/Parabola_of_safety

Judging by its name, it is a parabola, and Torricelli likely proved that fact without any calculus. I’ll demonstrate that in one of the next posts, and now I’m going to quickly show how to use it to solve the original problem.

Using the fact the the 45-degree parabola is optimal, we trivially find that the point $(V^2/g, 0)$ belongs to the green parabola. And (even more trivially) since the point $(0, V^2/2g)$ belongs to it too, we can write its equation $y = -\frac{g}{2V^2}x^2 + \frac{V^2}{2g}$, substitute our initial height $h$ and find the max distance $S = V/g \sqrt{V^2 + 2gh}$. Finding the angle corresponding to this distance is just a boring exercise that I leave to you.

After the break – some ugly R code that I used to plot the picture.

g = 9.80665
v = sqrt(2*g)

parabola = function(x, f)
{
t = x/(v*cos(f));
v*sin(f)*t - g*t^2/2;
}

safety = function(x)
{
-x^2*g/2/v^2 + v^2/2/g
}

plot(0,0, ylim=c(-2,1), xlim=c(0,3.5), xlab=expression(V * cos(phi) * ~ t),
ylab=expression(V * sin(phi) * ~ t - g*t^2 / 2))
abline(h=0, col=rgb(1,1,1,0.2))