Projectile Motion with Air Resistance and Wind I am wondering how the general kinematics equations would change in the following situation.
If an object were fired out of a cannon, or some sort of launcher, so that it had both an initial velocity and an initial angle, and air resistance is taken into account, what would be the equations for the x and y components of the position, velocity, and acceleration. 
Furthermore, I am wondering how these equations would change if there were also a wind blowing at an angle. In essence, what I would like to know is how to rewrite the kinematics equations to take into account the air resistance and moving wind and the terminal velocity. 
The reason I want to know this is that I am writing a program to model this behavior, but I first need to know these equations. 
Also, if possible, could someone provide some help on finding equations for the maximum height the projectile reaches, as well as the distance it travels before it hits the ground? I would like both of these to be values the user of the program can find if desired.  
Oh, and in the scenario of the wind, it can blow from any angle, which means it will affect the x and y velocities and either augment them or lessen them depending on the angle at which it blows. So I guess another request is an explanation of how to obtain the set of equations (position, velocity, acceleration) for the x direction based on whether the wind angle is helpful or hurtful, and how to obtain the set of equations for the y direction, based again on whether the wind is helpful or hurtful. 
I would naturally have a constraint on the wind velocity so that the object would always inevitably hit the ground, so the force of the wind in the y-direction, if it were blowing upwards, would have to be less than the force of gravity of the object, so that it still fell. Sorry, I know I'm asking a lot, it's just that I really want to understand the principles behind this. Any help at all here would be very much appreciated, but if possible, could whoever responds please try to address all of my questions, numerous though they are?
Oh, one final note.  As this is being written in a computer program (python 2.7.3, to be exact), I cannot perform any integration or differentiation of the functions.  Instead, I will need to create a small time step, dt, and plot the points at each time step over a certain interval.  The values of the radius of the object, its mass, its initial velocity and angle, the wind velocity and angle, and dt can all be entered by the user, and the values of wind angle and wind velocity are defaulted to 0, the angle is defaulted to 45 degrees, and dt is defaulted to 0.001, although these values can be changed by the user whenever they desire.
Thanks in advance for any help provided!
 A: As mentioned in the comments, this is an extremely complex problem if you intend to consider every possible aspect.  However, for a general estimation, you can use the relatively simple methods described in this document to begin calculating the effects of air drag on projectiles.
Note that in the document cited, they make the assumption that the air is not moving, and begun their derivation from $f = Dv^2$, and this $v$ was relative to the air and therefore the following equations simply used the velocity of the ball.  For the more complex case where the air is moving as well, you will need to account for this change and make sure that the x and y components of the force due to drag are calculated using the relative velocity of the projectile through the now-moving air.
Also worth noting is the fact that if the wind direction changes, the effective footprint of your projectile will change, thus changing $D$ and therefore the force due to drag.  If you are willing to make a reasonable approximation for the average footprint of your projectile, however, this will likely yield a result that is accurate enough for your purposes.
Hope this helps!
A: I've studied this in detail before way back in college days, After taking fluid mechanics course & modern physics (& mechanics physics, calculus, linear algebra, diff equations...) it made sense considering the air similar to a fluid. There is no simple equation like $$y_{x}=\frac{-gx^2}{2v^2\cdot \cos(T)^2}+\tan(T)x +y_\rm{initial}$$
You will have to derive Newtons 2nd law F=ma with $F_\textrm{drag}=k\cdot v^2$ acting downward along full trajectory, and adjusting the velocity vector in both x & y directions as a function of the $\theta$ per time traveled... and same time adjust k for the $\sin$ & $\cos$ velocity vectors. 
You need a program for this. Also there is F buoyancy to consider if object is light. The downward trajectory after object reaches max height will be adjusted by the negative $\sin T$ angle traveling downward hence reverse $F_{d}$ drag versus upward trajectory, similar to dropping an object from high altitude and reaching or not reaching terminal velocity. Also, you can make adjustments to $C_{d}$ drag coefficient per Reynolds # same time; for a golf ball $C_{d}$ average ~ 0.3 but $C_{d}$ can vary per velocity, and Temp & air conditions, dynamic viscosity plays a little role as well. I've run equations using math software before.. equations get hideous/nasty, log & hyperbolic trig functions.
You need to derive both x & y vector force/velocity/time/distance equations similar to how to do with no wind effect... then can re-do and introduce into the original equations other effects like initial wind speed in x or y or z directions in same equations or separate equations. $F_{d}\cos T$ & $F_{d}\sin T$ will constantly change affecting the flight travel. The original equations is based on $\theta$ (not, sub-zero) & initial velocity then gravity takes over. In reality after this, the magnitude of the wind force acts perpendicular to entire flight of the object + gravitational force acting downward continuously.
A: Top above question regarding integration & derivatives... Integration of functions your pretty much screwed unless you program your own integral functions, or if you just need the area under a curve you can use the for example "SIMPSON'S RULE". For roots (x=0), can use the powerful "NEWTON'S METHOD"... x2=x1(assume) - f(x1) / f'(x1), then X2=X1... usually 2 or 3 iterations will suffice & converges fast... can get examples from an engineering numerical analysis text-book, or can get a function max by doing a 2nd derivative newton's method to get root from 2nd & 1st derivative if possible, then that is the x @ymax of original equation... always easier taking derivative than integrating, I use Newton's Method all the time when programming my engineering spreadsheets.
A: I struggled with this and found a good solution on another site. 
The site had simulation code:
https://colab.research.google.com/drive/1zHDPFB7PquOesYjQ3YtVw6IjSZhjt9gz
Here is the page on the site with the fuller explanation:
https://www.somesolvedproblems.com/2019/10/how-does-wind-speed-affect-homerun.html
The idea is that you have the air resistance force that depends on velocity and it gets modified to account for wind speed. If wind is in the direction of motion at 3 m/s and the projectile is moving at 10 m/s then the air resistance term uses 7 m/s. The air resistance is $-c*v^2$ or $-c*v$ like normal.
This made sense for an approximate answer. Its frustrating that there are no great answers available when I search.
