Given:Definitions:Substitution:Definition of z involving x and y:Identities re-written:Everything put together in a matrix equation:Hence:Where:Given:The flattening:The contents of r:Packing r into a column vector:Resolving r3:MATLAB code:Plot:Console output:Free body diagram:Sum of forces:And assuming things stay in radians, dividing the velocity and acceleration of the tangential component by the length of the beam will result in the angular velocity and acceleration respectively:Rearranging stuff recovers the target equation:However, this will be more useful for the matrix form:Matrix form:This can be plugged directly into MATLAB with ode45
and the following conditions:The code:The plot:Looks about right! Time to move onto Runge-Kutta of order 4. My updated script to handle Runge-Kutta of order 4 with the ode45 function both at once:The plot:Given:From the Internet:The force between the satellite and the Earth can be calculated right away:For the force between the Moon and Earth, I will need the mass of the Moon first. The force on an object of mass m at the surface of a planet of mass M and radius R should be:Newton's second law:Applying this to the given ratio:The mass of the Moon can be solved for now:Now, the force between the two:The force on the satellite from the Moon:And as for the percentage comparing the Moon's effect on the satellite vs. the Earth's:Safe to say, the Moon can be ignored in this orbit for low fidelity calculations. Now it's time to evaluate the Sun's effect on the moon vs Earth's. Given:From the Internet:Because of how far away the Sun is, the Earth's radius is practically the average radius of the moon around the Sun:This is significant. I was not anticipating this! I was expecting it to be less than 1%.The force between the two upon each other:There exists an imaginary point in the middle about which both the object rotate with a radius r:The centrifugal force on one of the objects orbiting this imaginary center:Both the forces are opposite and equal:Since the planets never leave the orbit, they will never have a tangential acceleration.The question asks for the angular velocity:This problem seems to be identical to the one before, but just with trigonometry now. The contribution of object 1 on object 3:Object 2 applies a similar force on object 3:The sum of the forces on object 3:For simplicity sake, since object 3 is vertically aligned with the center of mass and the only component of the force is in the y axis, it's okay to omit the x component and just worry about the happenings of the y components now:Meanwhile, the centrifugal force is similar to what I used in the previous problem:The positive sign here means up. The sum of the forces is 0 again for the same reason as before, but this time the signs are built into the forces so I haven't added them again here:Oh, and I almost forgot, the cos is analytically simplifiable: