4

I'm trying to derive a formula to find the angle $θ$ required to hit a target that may be higher or lower than the initial launch position.

My known variables are $g, v_0, y_0, y_f, x_0, x_f$ where:

  • $θ$ is the initial launch angle and the variable being solved for;
  • $g$ is the gravity constant;
  • $v_0$ is the initial angular velocity;
  • $y_0$ is the initial launch elevation;
  • $y_f$ is the final landing position (in such cases where the projectile lands lower or higher than the launch position);
  • $x_0$ is the initial horizontal launch displacement;
  • $x_f$ is the horizontal landing position, or range;
  • $t$ is the time in seconds during the path of motion.

I started by converting the formula for x position into one for time $(x = x_0 + v_{x0}t$ becomes $t = \frac{x}{x_0 + v_{x0}})$

I set the equation for total flight time $\left(\frac{v_{y0}}{g} + \frac{\sqrt 2h}{g}\right)$ equal to this equation, since $v_{xf} = v_{x0}$ and $x_f$ is known. Leading me to $\frac{x}{x_0 + v_{x0}} = \frac{v_{y0}}{g} + \frac{\sqrt 2h}{g}$.

I took the equation for maximum height, $\frac{gt^2}{2}$ and substituted the expression for time into it, giving me $\frac{gx^2}{2x_0^2 + 4x_0v_{x0} + v_{x0}^2}$. Since $v_{y0}$ can be expressed in terms of $v_{x0}$, I also substituted that in $v_{x0} = v_0\cdot \cos \theta$ and $v_{y0} = v_0\cdot \sin \theta$ so $v_{y0} = v_{x0}\cdot \tan \theta$.

From there I continued to simplify and rearrange until I ended up with $\theta = \cos^{-1}\frac{2gx^2}{v_0}$, however this doesn't give me the correct answer and this is my third attempt over the past several hours.

I've been using the following values in a standard trajectory formula that finds $x_f$ from $\theta, v_0, y_0, x_0$:

  • $g = 9.81 \, \mathrm{m/s}$
  • $θ = 70^\circ$
  • $v_0 = 75 \, \mathrm{m/s}$
  • $y_0 = 3 \, \mathrm{m}$
  • $y_f = 0 \, \mathrm{m}$
  • $x_0 = 0 \, \mathrm{m}$.

When I plug these into a standard trajectory formula, I find that the range is $369.65957 \, \mathrm{m}$, which I have been using for $x_f$. I expect to find $\theta \approx 70^\circ$ when I solve for $\theta$ using $v_0$ and $x_f$, but other formulas I have found on the web end up giving me $\approx 45^\circ$ or $\approx 89^\circ$.

Thanks for any help!

M. A.
  • 1,806
Utaru
  • 43
  • What’s your question though? – gen-ℤ ready to perish Nov 29 '18 at 23:52
  • I was hoping someone could provide a formula to find $θ$ given initial velocity, initial position, and final position; or some guidance on which formulas to start with and which ones to start substituting. The work above was to show I had put some effort into it. Sorry for the confusion! – Utaru Nov 29 '18 at 23:56
  • To add more clarity, the formulas I've already found for finding $θ$ from initial velocity and final position only handle the case where the initial elevation and final elevation are the same. – Utaru Nov 29 '18 at 23:59
  • 2
    You can find the answer here), section 9. – Jens Nov 30 '18 at 00:28
  • I've tried that formula, but when I use it with $v = 75, y = -3, x = 369.65957, g = 9.81$, like the variables I listed above, it does not yield the 70 degree $θ$ as expected. Perhaps I'm using it wrong? – Utaru Nov 30 '18 at 00:49
  • I get the two possible answers of about $70^\circ$ and $19.5^\circ$. – Jens Nov 30 '18 at 01:06
  • Ah, you're right! Guess it was user error. Thanks for the help! – Utaru Nov 30 '18 at 01:36

1 Answers1

1

Move the launch coordinates to $(0,0)$ by setting $x_f=x_f-x_0, \, y_f=y_f-y_0$ and $x_0=y_0=0$.

We can then write the following equations for the projectile's $x$ and $y$ components:

$$y= (v_0\sin \theta) t- \frac{1}{2}gt^2$$ $$x = (v_0\cos \theta) t.$$

Let us see at what time $t_1$ the projectile is at the target $x$-coordinate, i.e when is $x=x_f$: $$ t_1 = \frac{x_f}{v_0 \cos \theta}.$$ Inserting $t_1$ into the equation for the $y$ component of the projectile, must give the height $y_f$ of the projectile at this time: $$y_f= (v_0\sin \theta) \frac{x_f}{v_0 \cos \theta}- \frac{1}{2}g \left(\frac{x_f}{v_0 \cos \theta}\right)^2. \tag{1}$$ Remembering that $$\frac{1}{\cos^2 \theta}=1+\tan^2 \theta$$ we can rearrange equation $(1)$ to become: $$gx_f^2\tan^2 \theta - 2v_0^2x_f \tan \theta + 2v_0^2y_f + gx_f^2 = 0.$$ Solving this quadratic equation for $\tan \theta$ gives the formula in the Wiki link I gave in my comment above, i.e. $$\theta = \arctan \left( \frac{v_0^2 \pm \sqrt{v_0^4 - g(gx_f^2+2y_fv_0^2)}}{gx_f} \right).$$

M. A.
  • 1,806
Jens
  • 5,826