# Sin Curve Fitting

Author:
Mike May
This applet is designed to allow a visual exploration of the problem of fitting a sin curve to given data by setting parameters. The points "MaxPoint" and "MinPoint" can be set by dragging.  You then manipulate the parameters "a", "b", "c", and "d" with the sliders so that the curve "f(x) = a*sin(b*(x-c))+d" has "TopPoint" equal to "MaxPoint" and "BottomPoint" equal to "MinPoint". To change the viewing area, select the move tool. (It looks like four arrows.) Clicking and dragging open space moves the window. Clicking and dragging on the axes changes the scale of the axes.
Some sets of data to look at:
• Find the points that correspond to the sin(x) curve.  Set a=1, b=1, c=0, and d=0, and find values for MaxPont and MinPoint that match up.
• Find values of the parameters so that the curve has a minimum at (1,1) and a maximum at (2,2).
• Find values of the parameters so that the curve has a minimum at (2,-2) and a maximum at (4,2).
• Find values of the parameters so that the curve has a minimum at (-Pi,1) and a maximum at (Pi,2).
• Devise a rule for the values of the parameters for the curve to have:
• a minimum at (s,-1) and a maximum at (s+2*Pi,1)
• a minimum at (-Pi/2,-1) and a maximum at (-Pi/2+t,1)
• a minimum at (-Pi/2,-1) and a maximum at (Pi/2+u,1)
• a minimum at (-Pi/2,-1) and a maximum at (Pi/2,1+v)