Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I was using a least squares approximation of the form $y = A_1 + A_2\sin(wx) + A_3\cos(wx)$, would you be minimising the function $\sum_{i=0}^n (y_i - (A_1 + A_2\sin(wx) + A_3\cos(wx))^2$ ?

I've never tried this for periodic data before!

share|cite|improve this question
That's generally the way it's done in the "least squares" sense. Except that in your error sum, replace $x$ with $x_i$ ;) – Emily Feb 22 '13 at 15:22
I realised afterwards, and the 0 by a 1. :D – Sanya Feb 22 '13 at 15:31

A straightforward method (no initial gess neeeded, no iterative computation) is shown pages 34-36 in :

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.