# Math Help - Find theta given

1. ## Find theta given

Given the distance a projectile needs to travel, the initial velocity, and acceleration due to gravity, how can I calculate the launch angle?

2. I'm assuming $\Delta y = 0$.

$\Delta y = v_{0y}t - \frac{1}{2}gt^2$

$0 = v_{0y}t - \frac{1}{2}gt^2$

$0 = t(v_{0y} - \frac{1}{2}gt)$

$t = \frac{2v_{0y}}{g}$

$\Delta x = v_{x} t$

$\Delta x = v_{x} \cdot \frac{2v_{0y}}{g}$

$\Delta x = \frac{2v_0^2 \sin{\theta}\cos{\theta}}{g}$

$\frac{g \Delta x}{v_0^2} = 2 \sin{\theta}\cos{\theta}$

$\frac{g \Delta x}{v_0^2} = \sin{2\theta}$

$\theta = \frac{1}{2}\arcsin\left(\frac{g \Delta x}{v_0^2}\right)$

3. Originally Posted by quaz579
Given the distance a projectile needs to travel, the initial velocity, and acceleration due to gravity, how can I calculate the launch angle?
let the launch angle be $\theta$. now, i suppose we are launching from the ground.

you should know that $V_{x_0} = v_0 \cos \theta$ and $v_{y_0} = v_0 \sin \theta$

where $v_0$ is the initial velocity, $v_{x_0}$ is the horizontal component of the initial velocity and $v_{y_0}$ is the vertical component of the initial velocity. we obtained these equations by using trig ratios on the various direction vectors.

now, work in feet, since you didn't specify. so acceleration due to gravity is -32 feet per (second squared). also, s(t) is the default for the position function, v(t) is the default for the velocity function and a(t) is the default for the acceleration function.

thus, dealing with the vertical component:

$a_y(t) = -32$

$\Rightarrow v_y(t) = \int a_y(t) ~dt = -32t + C$

since $v_y(0) = v_{y_0} = C$ we have

$v_y(t) = -32t + v_{y_0}$

$\Rightarrow s_y(t) = \int v_y(t)~dt = -16t^2 + v_{y_0}t + D$

assuming the initial height is zero, clearly $s_y(0) = D = 0$

so, $\boxed{s_y(t) = -16t^2 + v_{y_0}t}$ ----------- this is a formula that gives us the height at time $t$.

dealing with the horizontal component:
$a_x(t) = 0$

$\Rightarrow v_x(t) = \int a_x(t)~dt = C$

since, $v_x(0) = v_{x_0} = C$, we have

$v_x(t) = v_{x_0}$

$\Rightarrow s_x(t) = \int v_x(t)~dt = v_{x_0}t + D$

since $s_x(0) = 0 = D$ we have

$\boxed{s_x(t) = v_{x_0}t}$ ---------- this is a formula for the horizontal distance traveled.

now, all of that is standard procedure, you should practice it a lot and thus be able to do all that pretty quickly with minimum thinking (always a good idea on an exam ), but here's getting to the problem

if $d$ is the horizontal distance traveled, then we wan

$s_x(t) = d$

that means $v_{x_0}t = d$

$\Rightarrow t = \frac d{v_{x_0}}$

$\Rightarrow \boxed{t = \frac d{v_0 \cos \theta}}$

also, for this same $t$, we want $s_y(t) = 0$ (since we want the object to hit the ground at this time. (of course if we are not going to the ground, just set $s_y(t) = \text{whatever}$.

so, $s_y(t) = -16t^2 + v_{y_0}t = 0$

$\Rightarrow t (-16t + v_{y_0}) = 0$

$\Rightarrow t = 0$ ..........this is when we start, we don't want this $t$

or

$-16t + v_{y_0} = 0$

$\Rightarrow t = \frac {v_{y_0}}{16}$

$\Rightarrow \boxed{t = \frac {v_0 \sin \theta}{16}}$

now remember, these $t$'s are the same, so we can equate them. thus, we have

$\frac {v_0 \sin \theta}{16} = \frac d{v_0 \cos \theta}$

$\Rightarrow v_0^2 \sin \theta \cos \theta = 16d$

$\Rightarrow \sin \theta \cos \theta = \frac {16d}{v_0^2}$

$\Rightarrow \frac 12 \sin 2 \theta = \frac {16d}{v_0^2}$

$\Rightarrow \sin 2 \theta = \frac {32d}{v_0^2}$

$\Rightarrow \boxed{\theta = \frac 12 \sin^{-1} \left( \frac {32d}{v_0^2} \right)}$

there has to be an easier way to get to that formula. but i am not in a thinking mood now, obviously. i just followed a standard method

EDIT: there, skeeter has the shorter way he ends up using formulas that i derived. i should have remembered those formulas!

4. ## Thank you

This isn't a huge deal. I actually don't need an easy way to get this formula just as long as it works. This is actually for a video game programming class which I need this formula for in order to write code that works properly. I took physics over 2 years ago and have forgotten A LOT.

A quick question though: where did the -16 come from in step 2? Is this just (acceleration due to gravity)/2 and if so can I plug in 9.81/2 if i am using meters as my units?

Thanks again

5. Originally Posted by quaz579
This isn't a huge deal. I actually don't need an easy way to get this formula just as long as it works. This is actually for a video game programming class which I need this formula for in order to write code that works properly. I took physics over 2 years ago and have forgotten A LOT.

A quick question though: where did the -16 come from in step 2?

Thanks again
i would just use what skeeter did. they are standard physics formulas. i've never done physics, which is why i didn't remember them

the -16 comes from integrating -32t. the integral of t is (t^2)/2, that 2 divided into the -32 to give -16

anyway, if you are using a program, just program the formulas that skeeter gave. pretty all my boxed formulas but the last one is given by some physics formula. why re-invent the wheel?

6. Originally Posted by quaz579
This isn't a huge deal. I actually don't need an easy way to get this formula just as long as it works. This is actually for a video game programming class which I need this formula for in order to write code that works properly. I took physics over 2 years ago and have forgotten A LOT.

A quick question though: where did the -16 come from in step 2? Is this just (acceleration due to gravity)/2 and if so can I plug in 9.81/2 if i am using meters as my units?

Thanks again