Distance between point and sine wave I have a project where I need to know the exact minimal distance between a point $(e, f)$ and a sine wave $y = a + b\cdot\sin(cx+d)$
Is there any way of calculating this? If not, is there a way to approximate this? 
Thanks in advance!
Edit
Following Ross' and Ben's answers, The distance between a point $(e,f)$ and a sine wave $y = a + b\cdot\sin(cx+d)$ can be calculated by defining it as a distance between two points:
$$D=\sqrt{(x-e)^2+(a+b\cdot\sin(cx+d)-f)^2}$$
The $x$ where the distance is minimal can then be calculated by $E=D^2$ and then solving $E'=0$
$$E'= 2(bc\cdot\cos(cx+d)(a+b\cdot\sin(cx+d)-f)-e+x)=0$$
$$x=e-bc\cdot\cos(cx+d)(a+b\cdot\sin(cx+d)-f)$$
This last formula can only be answered exactly in certain cases. 

Following Ross' answer, I will use $(e,f)$ to denote your point.
First, some simplifications:


*

*The minimal distance between $(e,f)$ and $y = a + b\sin(cx + d)$ is the same as the minimal distance between $(e,f - a)$ and $y = b\sin(cx + d)$. So if I can solve the problem with $a = 0$, I can easily solve it for other cases as well.

*Similarly, the minimal distance between $(e,f)$ and $y = b\sin(cx + d)$ is the same as the minimal distance between $(e + d/c,f)$ and $y = b\sin cx$, as long as $c \not= 0$. If $c = 0$ then the problem is not very difficult.

*Again, assuming $c \not= 0$, the minimal distance between $(e,f)$ and $y = b\sin cx$ is the same as $1/c$ times the minimal distance between $(ec,fc)$ and $y = bc \sin x$.


So it's enough to solve the problem in the form "find the minimal distance between $(e,f)$ and $y = a\sin x$".
The points on the sine curve are of the form $(x,a\sin x)$. The distance to such a point is \[D = \sqrt{(x - e)^2 + (a\sin x - f)^2}.\] When this reaches a minimum, its derivative will be zero. As Jack M points out in the comments, you can throw away the square root, if you like: $D$ will reach its minimum exactly when $D^2$ does.
I've no patience for algebra so I leave the rest to you (unless you really get stuck), but I suspect you'll not end up with a neat expression, because there'll be too many trig functions in there. There are various ways to proceed from there, but I don't currently have time to go into them.
