How to find the following sine function This is a really simple question but I couldn't find an answer to that. 
The question is how to find the period of a sine function (coefficient B) according to the slope of the required sine function. The slope is shown in the following image.
$y = A \sin(B x + C) + D.$


We suppose that $\;\boxed{\displaystyle y(x) = A \sin(B x + C) + D}\;$ and observe that :
(supposing the picture accurate of course!)


*

*for $x=0\,$ we have $\;y=\dfrac 12$

*$y\,$ goes from a minimum of $\,0\,$ to a maximum of $\,1$

*the point $\left(0,\dfrac 12\right)\,$ appears to be the $\sin$ function inflection point (especially considering $\;1.$ and $2.$)

*the tangent of $\alpha$ at $\,x=0\,$ is near $\;\dfrac {1-0.5}{0.1}=5\;$ (the wished slope at $0$).


We may then deduce :


*

*from $\,2.\,$ that $\;-A+D=0\,$ and $\,A+D=1\,$ which imply that $\;A=D=\dfrac 12$.

*from $\,3.\,$ that $\;C=0$.  


It remains only to find $B\,$ in $\;\displaystyle y(x) = \frac {\sin(B x) + 1}2$.
The derivative $\;\displaystyle y'(x) = \frac {B\cos(B x) }2\;$ becomes for $\,x=0\,$ :


*

*from $\,4.\,\quad5=\dfrac B2\;$ which solves your problem!

