Results 1 to 2 of 2

Math Help - Least squares fitting

  1. #1
    Senior Member Twig's Avatar
    Joined
    Mar 2008
    From
    Gothenburg
    Posts
    396

    Least squares fitting

    Hi

    Having some problems with setting this one up.

    According to Keplerīs first law, a comet should have an elliptic, parabolic or hyperbolic orbit(with gravitational attractions from planets ignored). In suitable polar coordinates, the position  (r,\phi) of a comet satisfies an equation of the form  r = \beta +e(r\cdot cos(\phi)) , where  \beta is a constant and "e" is the eccentricity of the orbit, with  0 \leq e < 1 for an ellipse, e=1 for a parabola and e > 1 for a hyperbola.

    Given the data below, determine the type of orbit, and predict where the comet will be when  \phi = 4.6 , radians.

     \left[ \begin{matrix} \phi & 0.88 & 1.1 & 1.42 & 1.77 & 2.14 \\ r & 3.00 & 2.30 & 1.65 & 1.25 & 1.01 \end{matrix} \right]

    Solving for r gives,  r = \frac{\beta}{(1-e\cdot cos(\phi))}

    How would I set a design matrix up?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Apr 2009
    Posts
    23
    Hi Twig,

    the line of best fit is r = beta + e(r cos phi)
    That suggests you define x_i = r cos phi and y_i = r (i=1,..,5).
    The formulae for least squares are this:
    beta = (sum x_i y_i times sum x_i - sum y_i times sum x_i^2) / ((sum x_i)^2 - n sum x_i^2) --- here n = 5
    e = (sum y_i - n beta) / sum x_i
    I get
    beta = 1.451 and e = 0.811 (i.e. elliptic)
    If phi = 4.6, then your formula for r yields r = 1.33.

    Best

    ZD
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Nonlinear Fitting
    Posted in the Advanced Applied Math Forum
    Replies: 7
    Last Post: July 4th 2011, 01:40 PM
  2. Curve Fitting
    Posted in the Advanced Algebra Forum
    Replies: 11
    Last Post: November 23rd 2010, 04:55 PM
  3. Least Squares Fitting
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: August 23rd 2010, 10:40 AM
  4. Least squares fitting with three parameters
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: April 8th 2010, 12:58 AM
  5. Replies: 4
    Last Post: November 13th 2009, 06:12 PM

Search Tags


/mathhelpforum @mathhelpforum