I would like to fit a sinusoid to three data points using the function:
$y=A\cdot \sin(x+B)+C$
I've had a go at following the method described here but don't seem to be able to get far. My three points are arbitrary so I'm particularly interested in the comments made below the first answer.
The first step seems to be to remove C by subtracting equation 1 from 3 but this seems to leave me with a long expanded formula that I cannot rewrite into an expression for $\tan(B)$.
Eq1: $y_1=A\cdot \sin(x_1+B)+C$
Eq3: $y_3=A\cdot \sin(x_3+B)+C$
Expand Eq1: $y_1=A(\cos B\sin x_1+\sin B\cos x_1)+C$
Expand Eq3: $y_3=A(\cos B\sin x_3+\sin B\cos x_3)+C$
Subtract 1 from 3: $y_3-y_1=A(\cos B\sin x_3+\sin B\cos x_3)-A(\cos B\sin x_1+\sin B\cos x_1)$
Which if necessary could also be: $y_3-y_1=A\cos B\sin x_3+A\sin B\cos x_3-A\cos B\sin x_1-A\sin B\cos x_1$
Unfortunately, that's where I get stuck. I don't have the dexterity with trigonometric identities to go any further, so I'd be grateful for some direction.
Many thanks, Simon.