math - Count Iblis, Saturday, May 12, 2007 at 9:58am
Note that you want d(t) to be of the form:

d(t) = A + B sin(r t + s)

Now, as you can see, all the options that express d like this have r = 0.49. This makes it easy to find the best fit, because you can now transform this problem into a linear regression problem as follows. You write:

d(t) = A + B sin(r t + s) =

A + B [cos(s) sin(r t) cos(s) + sin(s)cos(rt)(rt)] =

A + B cos(s) sin(rt) + B sin(s) cos(rt)

So, this problem is of the form:

d(t) = A_1 + A_2 f_2(t) +
A_3f_3(t)

with

f_2(t) = sin(rt)

f_3(t) = cos(rt)

So this is a standard linear regression problem as d is a linear function of f_2 and f_3.

You just need to proceed in the same way as you would proceed in case of a regression problem like: