Projectile Motion – Calculate the Angle to Minimize Initial Velocity

homework-and-exerciseskinematicsprojectile

I am playing around with creating a VR game where a player can "summon" a ball to their hand. Instead of moving the ball straight to their hand, I would like for it to be thrown.

At the moment I use the Projectile motion formulas to calculate the initial velocity at a set angle of 45'. It works pretty well, but there some situations where no velocity will ever work as you can imagine.

$$y=x\tan\theta-\frac{g}{2v^2\cos^2\theta}x^2$$

Thus I would like to calculate the angle, that would yield the lowest initial velocity.

I have the following info : The distance from the ball the the player and the height of both.

I did find a question with an answer. Unfortunately I am not very mathematically inclined and do not know how to do the differentiation.

Finding minimum initial velocity and angle for a projectile to reach a given point

Can anybody elaborate on how to do the actual math to calculate the angle for minimum initial velocity?

My current way of finding the initial velocity :
$$v=\sqrt{\frac{ \frac{g/2*HorizDistance^2}{\sin\theta * \cos\theta}} {TargetHeight-BallHeight-HorizDistance}}$$

Based on : Physics 3: Motion in 2-D Projectile Motion (4 of 4)

Best Answer

Let $x$ be the horizontal distance the ball needs to travel, and let $y$ be the vertical distance. Without loss of generality assume that $x > 0$. You can rearrange the equation for the trajectory to find that for a given angle $\theta$, the velocity needed to get to the player is given by $$ v^2 = \frac{gx^2}{2 (x \cos \theta \sin \theta - y \cos^2 \theta)} = \frac{gx^2}{x \sin 2 \theta - y (1 + \cos 2 \theta)} $$ We want to make the denominator as large as possible for a given $x$ and $y$, meaning that we want to maximize the quantity $$ \mathcal{Q} = x \sin 2\theta - y \cos 2 \theta. $$ Defining $A = \sqrt{x^2 + y^2}$ and $\tan \delta = y/x$ (with $-90°<\delta<90°$), this becomes $$ \mathcal{Q} = A \left[ \cos \delta \sin 2\theta - \sin \delta \cos 2 \theta \right] = A \sin(2 \theta - \delta) $$ which is obviously maximized (for $0 \leq \theta \leq 90°$) when $2\theta - \delta = 90°$, or $$ \theta = 45° + \frac{1}{2} \tan^{-1} \left( \frac{y}{x} \right). $$ Finally, the required speed at launch for this angle can be found (after some further algebra) to be given by $$ v^2 = \frac{gx^2}{\sqrt{x^2 + y^2} -y}. $$

Related Question