The overall goal is to write a Mathematica program that will compute the launch angle that will yield the greatest range with using [RandomInt] function, but I was having trouble with the physics.
In 2D Trajection with no friction, the greatest range came at angle $45^\circ$.
But using the quadratic model of friction,
$$F_{drag} = -kv^2, k = \frac{1}{2}C_D\rho A$$
where $\rho$ is the density of air, $A$ is the cross sectional area of the moving object (circle in this case), and $C_D$ is the drag coefficient. $$v^2 = v_x^2 + v_y^2$$
At this point, I'm not sure on how to set up the problem, as $v$ is dependent on both $v_x$ and $v_y$, and cannot be modeled as linearly independent of each other.
Some given parameters of the sphere projectile: (I'm assuming these values can be easily plugged into the general equation when writing the program)
Intial Velocity = Between $30-40 \frac{m}{s}$ Mass = 0.145 $kg$ Radius = 0.0367 $m $ Air density = $1.2 kg/m^3$ Drag Coefficient = 0.46
How would I incorporate both velocities in an equation? For simple kinematics, it is simply: $$Total Range = v_xt$$ and we solved for $v_x$ by using trig properties from $v_0$. But is it correct to model this drag force with the same trig properties?
$$v_y = vsin\theta, v_x = vcos\theta $$
$$\sum F = ma = kv^2 - mg = (\frac{1}{2}C_D\rho A({vsin\theta}^2+{vcos\theta}^2) - mg$$