Because one of the model for air drag is the drag force is proportional to v2.
So if the velocity is v. the magnitude of the drag force is b*v2 (where b is a constant).
Since the force F is a vector, there are two components Fx and Fy in my simulation.
So I have to calculate the component of the force in the x and y direction.
Fx= - b* V2 * (vx/|V|);  // vx/|V| will give me the component of the force in the x component.

Once I have dvx/dt =Fx/m =  - b/m * V2 * (vx/|V|);
I can integrate the above equation with numerical method. The method I used is Runge-Kutta 4-th order method, which is a standard method for numerical calculation. You can find related information from any numerical calculation textbook. If you use the EJS tool (which is available on our server), it will solve the differential equation for you. You just need to provide the equations and initial values. :-)