# General equation for projectile motion with variable angle

I'm trying to determine a general equation for projectile motion with the angle $\theta$ as the independent variable/unknown. I'm having trouble trying to isolate $\theta$, here is my understanding so far.

First, derive the equations of motion for the horizontal component of the projectile:

$$\frac{d^2x}{dt^2}=0$$ $$\frac{dx}{dt}=v*cos(\theta)$$ $$x=vt*cos(\theta)+x_i$$ Where $x_i$ is the initial horizontal distance which is assumed to be 0, thus the horizontal position can be rewritten as a function of $t$: $$Eq.(1):\qquad t=\frac{x}{v*cos(\theta)}$$

Vertical components of motion for the projectile: $$\frac{d^2y}{dt^2}=-g$$ $$\frac{dy}{dt}=-gt+v*sin(\theta)$$ $$y=-0.5gt^2+vt*sin(\theta)+y_i$$ Where $y_i$ is the initial vertical distance which is assumed to be 0. Thus: $$Eq.(2)\qquad y=-0.5gt^2+vt*sin(\theta)$$

Substituting Eq.(1) into Eq.(2): $$y=-0.5g\left( \frac{x}{v*cos(\theta)}\right)^2+\frac{x*sin(\theta)}{cos(\theta)}$$ ...and the trig can be simplified down to functions of tan: $$y=\frac{-0.5gx^2(1+tan(\theta)^2)}{v^2}+x*tan(\theta)$$ $$y=\frac{-0.5gx^2}{v^2}+\frac{-0.5gx^2*tan(\theta)^2}{v^2}+x*tan(\theta)$$ $$0=\frac{-0.5gx^2}{v^2}tan(\theta)^2+x*tan(\theta)+\frac{-0.5gx^2}{v^2}-y$$

$g$ is the acceleration due to gravity.

$x$ is the horizontal distance traveled.

$y$ is the vertical distance traveled.

$v$ is the initial velocity launched at angle $\theta$ (note that we assume final velocity in both directions is 0).

$\theta$ is the launch angle.

So, I end up with the above - a nasty looking quadratic. Again, this general equation assumes that all other variables except angle $\theta$ are known.

My question is, am I on the right track or have I made a mistake as the algebra starts getting a little annoying with the next step.

Could I now use the quadratic formula to isolate $\theta$ with the quadratic's respective coefficients given as $a=\frac{-0.5gx^2}{v^2}$, $b=x$ and $c=\frac{-0.5gx^2}{v^2}-y$?

• I don't understand why you say that the final velocity in both direction is zero. Anyway, your work is correct. Now you have to decide what you want find. Do you want find the angle $\theta$ such that for $y=0$ we have a given $x$? or do you want the maximum distance reached as a function of $\theta$? Or the maxim height in function of $\theta$. Depending of what you want your equation has different unknown. – Emilio Novati Mar 1 '16 at 11:44
• Reading the first sentence of the question, I thought you wanted to know the $x,y$ coordinates and time $t$ at a point of the trajectory given the angle of the trajectory as it passes through that point. That is what I interpret as the "equation for projectile motion with the angle as the independent variable". Provided that the motion is not just straight up and down, you can derive equations for $x$,$y$, and $t$ all as a function of this angle for all angle values except $\pm\pi$. But it looks like you don't want that after all. – David K Apr 11 '16 at 13:37
Using the relation,$$y=x\tan \theta -\frac{gx^2}{ 2u^2 \cos^2\theta}$$, $$\implies y=x\tan\theta-\frac{gx^2}{2u^2}(1+\tan^2\theta)$$ Let $k=\frac{gx^2}{2u^2}$ and our quadratic then becomes, $$y=x\tan\theta-k-k\tan^2\theta$$ $$\implies k\tan^2\theta-x\tan\theta+(k+y)=0$$ Which gives, $$\tan \theta =\frac{x \pm \sqrt{x^2-4ky-4k^2}}{2k}$$ and you can put back $k=\frac{gx^2}{2u^2}$