# How to perform the following change of variables for a projectile with quadratic drag?

I have the following second order differential equation which explains the motion of a particle with quadratic drag to which I have done a reduction to a first order system. $$\frac{d}{dt}\pmatrix{x\\y\\v_x\\v_y}=\pmatrix{v_x\\v_y\\-μv_x\sqrt{v_x^2+v_y^2}\\-g-μv_y\sqrt{v_x^2+v_y^2}}$$ When trying to solve via numerical integration I must plug in the initial conditions at a known point in time, and solve for a known point in time. However I would like to solve the differential equation with respect to x not time. I know that I can do this with a change of variables, but I do not understand how to do such a change of variables. I am a high school student who has completed the basic single variable calculus, so my math understanding is relatively lacking. Thanks to user abs the following identities should solve this problem $$\frac{dv_x}{dt}=\frac{dx}{dt}\frac{dv_x}{dx}=v_x\frac{dv_x}{dx}$$ $$\frac{dv_y}{dt}=\frac{dy}{dt}\frac{dv_y}{dy}=v_y\frac{dv_y}{dy}$$ However I do not understand how to apply the shown substitution.

To change variables from $$t$$ to position, you can use these identities: $$\frac{dv_x}{dt}=\frac{dx}{dt}\frac{dv_x}{dx}=v_x\frac{dv_x}{dx}$$ $$\frac{dv_y}{dt}=\frac{dy}{dt}\frac{dv_y}{dy}=v_y\frac{dv_y}{dy}$$