[Math] Finding the equation for a sine wave given only two points

algebra-precalculus

Given the co-ordinates of only two points A (x1,y1) and B (x2,y2) on a graph where the amplitude is y2-y1, what is the equation for the sine curve?
The distance from A to B is half the period.

Best Answer

Since $A$ is a minimum and $B$ is a maximum, there exists some $n\in\Bbb Z_{\ge0}$ such that $$2n+1=\frac{|x_2-x_1|}{\lambda/2}$$ where $\lambda$ is the length of the wave. So $$\lambda=\frac{2|x_2-x_1|}{2n+1}$$ Now we have to translate the function $(y_2-y_1)\cos(2\pi x/\lambda)$ to make it to pass trough $B$:

$$f(x)=\frac{y_2-y_1}2\cos\left(\frac{\pi(x-x_2)(2n+1)}{|x_2-x_1|}\right)+\frac{y_1+y_2}2$$

EDIT: Since you have just added the condition that the curve from $A$ to $B$ is a half of the period just put $n=0$.