This is a reply to the question posted here
http://www.jiskha.com/display.cgi?id=1178989522
As I explained there, you can find the parameters by defining:
x1 = Sin(0.49 t)
x2 = Cos(0.49 t)
and treat this as an ordinary linear regression problem. If we denote the height by Y, then we want to find parameters A, B, and C such that Y is best approximated by:
Y = A + B X1 + C X2
In regression analysis one chooses the parameters such that the sum of the squared deviations is minimized. This yields the follwing 3 equations:
Sum_{data points} [y - A - B X1 - C X2 ] = 0
Sum_{data points} X1 [y - A - B X1 - C X2 ] = 0
Sum_{data points} X2 [y - A - B X1 - C X2 ] = 0
So, all you have to do is to calculate the summations:
Sum Y = 81.3
Sum X1 = 0.0508842
Sum X2 = 1.17151
Sum X1^2 = 6.42279
Sum X2^2 = 7.57721
Sum X1 X2 = 0.0502369
Sum X1 Y = -0.837748
Sum X2 Y = -15.4769
And solve the equations (N = 14, the number of data points):
Sum Y - N A - B Sum X1 - C Sum X2 = 0
Sum Y X1 - A SumX1- B Sum X1^2 - C Sum X2 X1 = 0
Sum Y X2 - A SumX2- B Sum X1 X2 - C Sum X2^2 = 0
You then find:
A = 6.0569
B = -0.155126
C = -2.97792
You can rewrite the fit function as:
6.05 + 2.98 Sin(0.49 t - 1.62)
To find the parameters A, B, and C for the equation Y = A + B X1 + C X2, you can use linear regression. Follow these steps:
1. Define your variables:
x1 = Sin(0.49 t)
x2 = Cos(0.49 t)
2. Collect data points for Y and corresponding x1 and x2 values.
3. Calculate the summations:
Sum Y (the sum of all Y values)
Sum X1 (the sum of all x1 values)
Sum X2 (the sum of all x2 values)
Sum X1^2 (the sum of the squares of all x1 values)
Sum X2^2 (the sum of the squares of all x2 values)
Sum X1 X2 (the sum of the products of x1 and x2 values)
Sum X1 Y (the sum of the products of x1 and Y values)
Sum X2 Y (the sum of the products of x2 and Y values)
4. Use the following equations:
Sum Y - N A - B Sum X1 - C Sum X2 = 0
Sum Y X1 - A Sum X1 - B Sum X1^2 - C Sum X2 X1 = 0
Sum Y X2 - A Sum X2 - B Sum X1 X2 - C Sum X2^2 = 0
where N is the number of data points.
5. Solve the equations to find the values of A, B, and C.
In the specific example given, the results are:
A = 6.0569
B = -0.155126
C = -2.97792
You can then rewrite the fit function as:
Y = 6.05 + 2.98 Sin(0.49 t - 1.62)