# Launch angle of projectile motion not in terms of time

I have these two projectile-motion equations:

$$vt\cos(\theta)=d$$

$$0=h+vt\sin(\theta)+\frac12at^2$$

Is it possible to derive an expression for $$\theta$$ in terms of at most $$d, v, h, a$$ but not $$t?$$ The closest I've gotten is $$t = \frac{d}{\cos(\theta)}$$ so $$0=h + \frac{dv\sin(\theta)}{v\cos(\theta)} + \frac12a\frac{d^2}{v^2 \cos^2(\theta)}\\ 0=h + d\tan(\theta) + \frac12a\frac{d^2}{v^2 \cos^2(\theta)}.$$

https://en.wikipedia.org/wiki/Projectile_motion#Angle_θ_required_to_hit_coordinate_(x,_y) contains a related result, but no derivation is given, and I am not sure how that result was attained.

Let $$T=\tan\theta$$, so your equation becomes $$0=h+dT+\frac{ad^2}{2v^2}(1+T^2)$$

You can solve this quadratic equation to get $$\tan\theta$$ in terms of $$h,d,a$$ and $$v$$

As you point out, for a projectile with an initial velocity $$v_0$$ and an angle of theta, the equations of motion give us $$y=-\frac{1}{2}gt^2+(v_0\sin{\theta})t$$ and $$x=(v_0\cos{\theta})t$$

As long as $$\theta$$ is less than $$90^{\circ}$$, $$\cos{\theta}\ne 0\implies t=\frac{x}{v_0\cos{\theta}}$$ and $$y=-\frac{1}{2}g\frac{x^2}{v_0^2\cos^2{\theta}}+x\tan{\theta}=-\frac{g}{2v_0^2\cos^2{\theta}}x^2 + x\tan{\theta}$$

You could try a substitution. For example, suppose $$u = cos(\theta)$$; then $$\frac{sin(\theta)}{cos(\theta)} = \frac{\sqrt{1-u^2}}{u}$$ and $$\frac{1}{cos^2(\theta)} = \frac{1}{u^2}$$. Your whole equation becomes the following:$$0=h+d\frac{\sqrt{1-u^2}}{u}+0.5a\frac{d^2}{u^2v^2}$$

Not what I'd call "pretty" by any stretch, but at least it's explicitly in only one unknown now. Clearing the denominators of $$u$$'s and solving for it yields:$$0=u^2h+du\sqrt{1-u^2}+\frac{0.5d^2a}{v^2}$$ $$-du\sqrt{1-u^2}=u^2h+\frac{0.5d^2a}{v^2}$$ $$u^2d^2(1-u^2)=(u^2h+\frac{0.5d^2a}{v^2})^2$$ $$-u^4d^2+u^2d^2=u^4h^2+\frac{u^2d^2ah}{v^2}+\frac{d^4a^2}{4v^4}$$

Let $$z=u^2$$. Rearranging to get everything on one side and making the substitution gets you the following:

$$(h^2+d^2)z^2+\frac{d^2(ah-v^2)}{v^2}z+\frac{d^4a^2}{4v^4}=0$$ $$z=\frac{\frac{d^2(v^2-ah)}{v^2}\pm\sqrt{\frac{d^4((ah-v^2)^2-a^2)}{v^4}}}{2(h^2+d^2)}$$ $$z=\frac{d^2((v^2-ah)\pm\sqrt{(ah-v^2)^2-a^2})}{2v^2(h^2+d^2)}$$

That's about as much as I have time for right now, I'm afraid, but you should get the gist by now. Presuming that the two values for $$z$$ are real, you'll be able to take the square root of the positive one to recover the values for $$u$$, and then take the arccos of those. Throw out whatever solutions don't correspond to the reality of the problem. As for finding $$t$$, all you need to do is compute $$d/u$$ for the values of $$u$$ you find; again, ignore any nonsensical results (like $$t$$ being negative for example).

Of course, all of this will only work if $$(ah-v^2)^2-a^2 \ge 0$$, which means that $$(ah-v^2)^2 \ge a^2 \Rightarrow ah-v^2 \ge a \Rightarrow a(h-1)\ge v^2 \Rightarrow a\ge v^2/(h-1)$$.

Addendum: taken to its ultimate conclusion, the values of $$\theta$$ can be computed with the given information using the following formula: $$\theta = \arccos(\pm\sqrt{\frac{d^2((v^2-ah)\pm\sqrt{(ah-v^2)^2-a^2})}{2v^2(h^2+d^2)}})$$

While the values of $$t$$ are given by:

$$t = \pm\frac{d}{\sqrt{\frac{d^2((v^2-ah)\pm\sqrt{(ah-v^2)^2-a^2})}{2v^2(h^2+d^2)}}}$$

I leave it to you to separate the valid cases from the invalid ones.