CSE1541 Lab 09
Root finding and integration

Tue Apr 1, 2014
Due: Fri Apr 7 before 11:59PM

Introduction

This lab has you use root finding to find the Lagrange points L1 and L2 for the earth-sun system, and integration to find the center of mass of simple shape.

Question 1

In the earth-sun system there are 5 points where the gravitational attraction between a small object and the earth, the gravitational attraction between the object and the sun, and the centripetal force required to orbit with the sun and earth exactly balance (i.e., no net gravitational force is exerted on the object). Placing an object such as a satellite at one of the Lagrange points means that the object can maintain its position relative to the earth and sun. The figure below shows the Lagrange points L1 through L5 for the earth-sun system (not to scale).

To find the location of points L1 and L2, we need to find solve the following equations for r:

These equations are clearly root finding problems. Using the bisection method discussed in the lectures, find the values of r for L1 and L2 to within a tolerance of 0.001; use the following values:

To use the bisection method, you will need to create functions for the two equations, and pass a handle to each function to the bisection function.

After solving for the roots using the bisection method, use the MATLAB function fzero to solve for the roots.

Note: the Wikipedia article http://en.wikipedia.org/wiki/Lagrangian_point contains equations for approximate values of r for L1 and L2.

Question 2

Finding the center of mass of two-dimensional shape is a standard integration application taught in introductory calculus courses; in classical mechanics, you need to perform similar integrations to compute the moment of inertia of a body. Given a shape defined over a range [a, b] by a function f(x), the coordinates for the center of mass can be computed via integration:

Use the composite trapezoid rule discussed in class to find the center of mass of the following shape:

For the area, you can use the area of a half circle of radius 1. Use 2, 3, 4, ..., 20 panels and plot the error of estimated x-coordinate and estimated y-coordinate in separate graphs. (To compute the error you need to compute the true center of mass; the true location of the center of mass can easily be obtained by direct integration.)

Submit

Submit all of your functions and scripts using the online submit service: https://webapp.eecs.yorku.ca/submit/