I have an assignment in my course where I need to plot the trajectory of an object where the only input of the function is the initial angle of the throw. I have two differential equations that each give me the acceleration in horizontal (x) and vertical (y) of the object. In these formulas I also have an air friction constant to keep in mind of.
The initial values that are given is the initial speed of the object and the initial position of the object.
I am not to sure as what kind of algorithms I would need to use in order to plot the trajectory.
Here's what I think I should do:
Solve the DE:s given the initial values using runge-kutta formula. Then upon getting the acceleration in both x and y I would then integrate this over the time passed and once again in order to get the change in position, this could perhaps be done using the trapezoidal method. For example with a step size of 0.1 I would then integrate the acceleration between time 0 and 0.1 and then once again in order to find the displacement of the object. Does this sound like a reasonable solution?
I hope the question does not seem unfitting given no code, but I would like to know simply if my heading is correct or not, given my limited knowledge and not haven done any multivariable calculus or advanced DE:s before!