How can i solve this?
Afficher commentaires plus anciens
How can I solved this....:( Please help ... The motion of two bodies under mutual gravitational attraction is described by the following equations derived from Newton's law of Motion.
x’’(t) = - α^2*x(t)/R(t),
y’’(t) = - α^2*y(t)/R(t),
where x(t) and y(t) denote the position of one body in a coordinate system with the origin fixed in the other body,R(t) = (x^2(t)+ y^2(t))^3/2 , and α is a constant.
x(0)=1-β , x'(0)=0
y(0)=0, y'(0)=α sqr((1+β)/(1-β))
Here β is a constant, 0≤β<1. The orbit is then an ellipse with eccentricity β and one focus at the origin. Choose α = π/4 and β =0.9.
Write a program based on the classical Runge-Kutta 4-th -ordered method in Matlab. Test your code with a fixed step size h on the problem above.For the set of printout point t(k)= k/2 , k=0,....24 print out the position and for all the steps taken plot the position (x(t), y(t)), velocity (x'(t),y'(t))and acceleration(x"(t),y"(t)). Verify the theoretical dependence of accuracy on the step size , h .Note then the solution is periodic , with the period P=8.Observe how close the bodies come to each other.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Physics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!