How to tabulate (rcosθ,rsinθ) from (t,r,θ) obtained from solving a system of ODE using RK4?
I am trying to solve a system of first-order differential equations of the following form: drdt=f(r,θ),dθdt=g(r,θ) I am using desolve_system_rk4 which gives me a list of triples (t,r,θ). Now I need to plot the trajectory in the xy-plane. For this, I require to obtain the x and y coordinate using x=rcosθ,y=rsinθ and then obtain the xy-plot. How can I tabulate the pair (rcosθ,rsinθ) from (t,r,θ)?
Please add your code using
desolve_system_rk4
, so that it's easier to give an answer.Can a parametric plot solve your problem?