Can someone please shwo me how to code exercise 2 in Matlab?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Can someone please shwo me how to code exercise 2 in Matlab?

Post by answerhappygod »

Can someone please shwo me how to code exercise 2 in Matlab?
Can Someone Please Shwo Me How To Code Exercise 2 In Matlab 1
Can Someone Please Shwo Me How To Code Exercise 2 In Matlab 1 (87.58 KiB) Viewed 33 times
Exercise 1: RK2 vs. Symplectic Method To reinforce your appreciation of why it is important to use a symplectic algorithm, build a computational (MATLAB) model of the moon's orbit around Earth using the Leapfrog and Midpoint RK2 algorithms (use your spreadsheet guide as needed). Compare the orbital behavior in both models. What happens with the moon's trajectory in your RK2 model? How does it compare to the behavior observed for the Leapfrog algorithm? To address these questions you will have to zoom in on some part of the orbital path. You should compare the solutions for the two methods at different values of At. For a given At which algorithm produces the most accurate solution? Once you have determined the best algorithm to use, and an accurate value for At, use your model to calculate the orbital period of the moon, and compare it with the expected value. Exercise 2: Total Energy The importance of using a symplectic algorithm can best be observed when comparing the total energy vs. time for the two algorithms for different At values. Since we are considering the Earth to be fixed (this is a valid approximation since the Earth is much more massive than the moon ME 81 x Mm), the kinetic energy of the Earth can be neglected in the expression for the total energy of the Earth-moon system: E= Mm um - G MgM. where ME is the Earth's mass, Mm is the moon's mass, G is the universal gravitational constant, Um is the instantaneous velocity of the moon, and r is the distance between the centers of mass of Earth and the moon. Plot the total energy for the Leapfrog and RK2 algorithms vs. time for different values of At and comment on your observations.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply