In my physics class we have learned to calculate a desired launch angle to allow a projectile to hit a target given the target’s distance away and the initial velocity.

Now in this case the initial velocity of the projectile occurs at the axis of rotation of the so called “cannon” that is launching the projectile. But what if the initial velocity occurs at the tip of the cannon? When the launch angle changes, so does the launch height and the distance to the target.

With this added information I was NOT able to solve for the desired launch angle using the kinematic equations of motion. Is this problem possible to solve?

Please see the attached pdf for a better visualization and the equations

As requested by a comment, here is the equation I couldn’t solve for $\theta$:

$$d - r \cos(\theta) = \frac{ v \cos(\theta) }{-g} \cdot \left( -v \sin(\theta)\pm \sqrt{\bigl(v \sin(\theta)\bigr)^2 + 2g \bigl( h + r \sin(\theta) \bigr) \vphantom{\Big|}}\right)$$

This question has been asked before here but not answered.

  • $\begingroup$ I’m having trouble isolating theta in the kinetamtic equations of motion that I provide in the attached pdf. I added the pdf because it makes the problem much easier to understand when you see my drawings. $\endgroup$
    – Jacob G
    Apr 30, 2019 at 16:03

2 Answers 2


In the simple case

$x(\theta, t) = v (\cos \theta) t\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2$

Where $v$ is your launch velocity. $\theta$ is your launch angle, $t$ is time, and $g$ is your gravitational constant.

Based on the picture, you have the cannon at some initial altitude, $y_0$.

$x(\theta, t) = v (\cos \theta) t\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2+y_0$

Then end of your cannon is just one more translation.

$x(\theta, t) = v (\cos \theta) t + d\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2+y_0 + h$

But it might help if you see that $\frac {h}{d} = \tan \theta$

and the length of the barrel $l = \sqrt {h^2+ d^2}$

$x(\theta, t) = v (\cos \theta) t + l\cos\theta\\ y(\theta, t) = v (\sin \theta)t - \frac 12 g t^2+y_0 + l\sin\theta$

  • $\begingroup$ This is pretty much the point to which the O.P. has already taken the calculations in the attached PDF. $\endgroup$
    – amd
    Apr 30, 2019 at 18:19

We can still account for this!

Let's note down all relevant information.

Our initial height can be $h_0$, and then we can call the cannon length $r$.

We have that our INITIAL height is $h_0+r\sin(\theta)$.

In addition, if the target is distance $d$ away, the distance the cannon must travel is $d-r\cos(\theta)$.

I think that's fair.

Let's make one quadratic that expresses height in terms of time. We want to get the point where height=$0$, because that's where it hits the ground.

We have that $-\frac{1}{2}gt^2+vt\sin(\theta)+(h_0+r\sin(\theta))=0$

We also need to record the horizontal distance it travels, so we know how far the cannonball went.

We know that the horizontal speed must be $v\cos(\theta)$, so we know that $vt\cos(\theta)=d-r\cos(\theta).$

Things to note: $h_0,v,g,r$ all constants.

Same with $d$. So really, we have a system of equations in $t$ and $\theta$.

Two-equations, two-variables. You got this!

  • $\begingroup$ Yes I was able to get to those equations. I then eliminated “t” so I only had one equation. But this is the point I am stuck on. I have tried to solve for theta (manually and using an online calculator) but was unable to. $\endgroup$
    – Jacob G
    Apr 30, 2019 at 21:34
  • $\begingroup$ can you post that equation that you couldn't solve? $\endgroup$ Apr 30, 2019 at 21:52
  • $\begingroup$ because that's your specific problem, not this entire exercise $\endgroup$ Apr 30, 2019 at 21:53
  • $\begingroup$ and if you type the equation into wolfram alpha, it should be able to solve it $\endgroup$ Apr 30, 2019 at 21:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .