Solve two second order differential equations where initial values are known in a vector!
Mostrar comentarios más antiguos
Hi,
me and my classmate are writing a program for a school project.
It's supposed to simulate a girl on a swing where she will jump until she reaches maximum jump length.
It consists of two parts, one to simulate the swings movements where she increases her speed at the turning points until she reaches 90 degrees where she stops. we have finished this part. The different angle and angular speed has been saved as vectors for part 2.
In part 2 we have two second order differential equations, on for the movement in the x-axis and one for the movement in the y-axis. The equations look like this:
x''(t)=-k*x'(t)*sqrt((x''(t))^2+(y''(t)^2) y''(t)=-g-k*abs(y'(t))*sqrt((x''(t))^2+(y''(t)^2)
k and g are constants we already have. we also have the x'(t) and y'(t) from the previous part, which is the velocity of the swing in x-axis and y-axis, which are the initial values.
Our question is, how do we solve these equations? Using RK4? In that case the RK4 is supposed to solve the equations using the first values in our vector, then stop and re run the RK4 again using next elements in the vector.
This is what we did for part 1 but then it was only one differential equation, now it is two!
Thank you for your help!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!