# Throwing a ball from atop a hill

1. Apr 17, 2013

### swevener

1. The problem statement, all variables and given/known data
A boy stands at the peak of a hill which slopes downward uniformly at angle $\phi$. At what angle $\theta$ from the horizontal should he throw a rock so that it has the greatest range?

2. Relevant equations
$\mathbf{s} = \mathbf{v}_0 t + \frac{1}{2} \mathbf{a} t^2$

$\mathbf{v} = \mathbf{v}_0 + \mathbf{a} t$

3. The attempt at a solution
First I tilted the reference frame so the sloping hill is horizontal and the initial velocity is at an angle $\theta + \phi$ from the ground. This makes the acceleration $\mathbf{a} = g \sin(\phi) \hat{\imath} - g \cos(\phi) \hat{\jmath}$. So position is given by
$$\mathbf{s} = \left[ v_0 t \cos(\theta + \phi) + \frac12 g t^2 \sin(\phi) \right] \hat{\imath} + \left[ v_0 t \sin(\theta + \phi) - \frac12 g t^2 \cos(\phi) \right] \hat{\jmath}.$$ Taking the derivative with respect to time,
$$\mathbf{v} = \left[ v_0 \cos(\theta + \phi) + g t \sin(\phi) \right] \hat{\imath} + \left[ v_0 \sin(\theta + \phi) - g t \cos(\phi) \right] \hat{\jmath}.$$Setting the vertical component of velocity equal to zero gives half the total flight time:
$$t_{\text{max}} = \frac{v_0 \sin(\theta + \phi)}{g \cos(\theta)}.$$ Plugging $2 t_{\text{max}}$ into the horizontal component of $\mathbf{s}$ gives the distance traveled:
\begin{align}s_x (2 t_{\text{max}}) &= v_0 \frac{2 v_0 \sin(\theta + \phi)}{g \cos(\phi)} \cos(\theta + \phi) + \frac12 g \sin(\phi) \frac{4 v_0^2 \sin^2(\theta + \phi)}{\cos^2(\phi)} \\ &= \frac{2 v_0^2}{g \cos(\phi)} [ \sin(\theta + \phi) \cos(\theta + \phi) + \sin^2(\theta + \phi) \tan(\phi) ].\end{align}
To find the optimal $\theta$ for a given $\phi$, take
\begin{align}\frac{\text{d}}{\text{d} \theta} s_x (2 t_{\text{max}}) = 0 &= \cos(\theta + \phi) \cos(\theta + \phi) - \sin(\theta + \phi) \sin(\theta + \phi) + 2 \sin(\theta + \phi) \cos(\theta + \phi) \tan(\phi) \\ &= \cos^2(\theta + \phi) - \sin^2(\theta + \phi) + \sin(2(\theta + \phi)) \tan(\phi) \\ &= \cos(2(\theta + \phi)) + \sin(2(\theta + \phi)) \tan(\phi).\end{align} A bit of algebra gives
$$\tan(2(\theta + \phi)) = - \cot(\phi),$$ which results in an equation for $\theta$
$$\theta = \frac12 \arctan(-\cot(\phi)) - \phi.$$
Now, the book's hint was that when $\phi$ is 60º, $\theta$ should be 15º. My equation spits out -75º, which has the slight problem of meaning the boy would be throwing the rock through the hill. So my question is why am I off by 90º? Did I make a mistake in my math somewhere? Does it have to do with rotating my reference frame?

Last edited: Apr 17, 2013
2. Apr 17, 2013

### Staff: Mentor

well -75 degrees seems suspiciously like 15 degrees

so your book says it slopes down at 60 degrees so should you be using -60 degrees?

I would try to solve it without the rotation to see if things work out.

Last edited: Apr 17, 2013
3. Apr 17, 2013

### swevener

It seems to me my equation should be spitting out 15º, not 15º - 90º.

4. Apr 17, 2013

### swevener

Using -60º just gives me +75º. I've played with all the signs; the only answer that (sort of) works out is the one I got.

And solving the problem without the frame rotation is all kinds of unpleasant.

5. Apr 17, 2013

### haruspex

Not really.
Flight time t, hor dist x, vert dist y (measuring positive downwards), accn a, initial velocity u at θ above horizontal:
-ut sin(θ) + at2/2 = y = x tan(ϕ) = ut cos(θ)tan(ϕ)
at/2u = tan(ϕ)cos(θ) + sin(θ)
xa/u2 = 2tan(ϕ)cos2(θ) + 2 sin(θ)cos(θ) = tan(ϕ)(cos(2θ)+1) + sin(2θ)
For max x:
tan(ϕ)(-2sin(2θ)) + 2cos(2θ) = 0
tan(ϕ) = cot(2θ)
ϕ = π/2 - 2θ

6. Apr 17, 2013

### swevener

Well, it was the way I was trying to do it, but if anything I've learned that I tend to overcomplicate things.

Anyway, I figured out the problem was my rotated frame. I plugged the $2 t_{\text{max}}$ I got above into the unrotated horizontal component of the distance equation and got the same equation haruspex did. Though I still don't know why rotating my frame an arbitrary angle offset my answer by exactly 90º.