# Optimal angle for a projectile from height h

1. Jul 7, 2015

### RMalayappan

• Originally posted in a non-homework forum, so the homework template is missing
I'm following Professor Ramamurti Shankar's video lecture series for Fundamentals of Physics I on Open Yale and I'm hung up on the last question on the second problem set, of which there is no mention on the solution set.
http://oyc.yale.edu/physics/phys-200/lecture-4
The question asks, "Show that if a projectile is shot from a height h with speed v0 the maximum range obtains for for launch angle $$\theta = ArcTan(\frac{v_0}{\sqrt(v_0^2+2gh)})$$

I tried this by starting with y=h+v0sinθt-1/2gt2 and x=v0cosθt. I solved for t in the y equation using the quadratic formula and got the final time tf = (v0sinθ+√(2gh+(v0sinθ)2))/g and I substituted it into the x equation and tried differentiating with respect to θ and I got some monstrosity that looks like it won't yield the answer and looks like too much work anyways for the problem. The problem is that everywhere I find this √(2gh+(v0sinθ)2) term, which looks like it should be replaced with a √(2gh+v02) term to get the intended result. Is there an easier approach that I can use to obtain the answer I'm looking for?

2. Jul 7, 2015

### Dr. Courtney

Try and simplify xf after you plug in tf by using trig identities. Reducing the amount of times theta occurs in xf will make differentiating much simplier.

3. Jul 7, 2015

### RMalayappan

I have, but I still keep having to do a product rule with a square root term that ends up becoming messy.

4. Jul 7, 2015

### haruspex

An easier start would be to use the x direction equation to express t in terms of the angle then substitute for t in the y equation.
To assist any further, we need to see your working.

5. Jul 9, 2015

### RMalayappan

I don't think I can substitute t into the y equation since I'm trying to maximize x and I need to solve for t when y=0.
Here is my work so far:
$y(t)= h+v_0sin(\theta)t -\frac{1}{2}gt^2=0$

$t= \frac{-v_0sin(\theta)\pm \sqrt{v_0^2sin^2(\theta) +2gh}}{-g}$ and disregarding the negative solution:

$t_f= \frac{v_0sin(\theta) +\sqrt{v_0^2sin^2(\theta) +2gh}}{g}$

Substituting into the x equation $x=v_0cos(\theta)t$:

$x_f(\theta)= v_0cos(\theta) \frac{v_0sin(\theta) +\sqrt{v_0^2sin^2(\theta) +2gh}}{g}$
Differentiating $x_f$ with respect to $\theta$ yields a complicated expression that looks like hell to solve. After simplification, it becomes:

$\frac{dx_f}{d\theta} =0= \frac{v_0^2}{g} (cos(2\theta) +\frac{sin(2\theta)cos(\theta)}{\sqrt{sin^2(\theta) +\frac{2gh}{v_0^2}}} -sin(\theta) \sqrt{sin^2(\theta)+ \frac{2gh}{v_0^2}})$

and there I decided to look for other options. I'm going to try to use Lagrange multipliers to solve for the maximum of $x(\theta, t)$ along the constraint $y(\theta, t) = 0$ using $\nabla x = \lambda \nabla y$

Last edited: Jul 9, 2015
6. Jul 9, 2015

### haruspex

Why do you need to solve for t? Substitute for t as I suggested, set y=0 and differentiate wrt theta to find max x.

7. Jul 9, 2015

### RMalayappan

The issue I found with that is that h drops out of the equation once y=0 with x substituted is differentiated implicitly with respect to theta. I managed to solve the equation with Lagrange multipliers with the following:

$\nabla x = \lambda \nabla y$ so $\frac{\partial x}{\partial \theta} = \lambda \frac{\partial y}{\partial \theta}$ and $\frac{\partial x}{\partial t} = \lambda \frac{\partial y}{\partial t}$
From $\frac{\partial x}{\partial \theta} = \lambda \frac{\partial y}{\partial \theta}$, $-v_0sin(\theta)t = \lambda v_0cos(\theta)t$ so $\lambda = -tan(\theta)$
From $\frac{\partial x}{\partial t} = \lambda \frac{\partial y}{\partial t}$, $v_0cos(\theta) = \lambda (v_0sin(\theta)-gt)$ and, by substituting $\lambda$ in, $v_0cos(\theta) = -tan(\theta)(v_0sin(\theta)-gt)$
After some algebra: $v_0(cos^2(\theta)+sin^2(\theta)) = gtsin(\theta)$ so $t = \frac{v_0}{gsin(\theta)}$
Substituting into y=0, simplifying and multiplying through by 2g yields $0= 2gh+2v_0^2-v_0^2csc^2(\theta)$
Using the Pythagorean identity and rearranging, $v_0^2cot^2(\theta)=2gh+v_0^2$ so $cot^2(\theta)= \frac{2gh+v_0^2}{v_0^2}$
Here the desired result is obvious: $\theta = arctan(\frac{v_0}{\sqrt{2gh+v_0^2}})$

8. Jul 9, 2015

### haruspex

That is true, but it's ok. You still have the undifferentiated form of the equation with h in it. Both equations are true. Treat them as a pair of simultaneous equations and solve. It is no more difficult than your method above.