Simple test if point is above or below sine curve

1.2k Views Asked by At

Is there any simple formula or algorithm for determining if a point lies above or below the sine curve? For instance, if I have a point $(x, y)$, how can I test whether or not $y > \sin(x)$? Obviously taking the actual $\sin(x)$ (or $\cos(x)$) is not an option otherwise I wouldn't be asking.

All three angles, $A, B$, and $x$ are first-quadrant angles in $[0, 90°]$.

Additionally, I know two reference points, A and B such that A < x < B, and I know both the sine and cosine of A and B. I thought perhaps comparing slopes might be useful, for instance, I know that the slope of the tangent at A is greater than the slope of the secant from A to x, which is greater than the slope of the secant from x to B, which is greater than the slope of the tangest at B. But I haven't been able to come up with a way to actually use any of that.

Background

To clarify what I'm after: I'm working on doing rapid estimations of various useful functions like sines, cosines, exponents, logs, etc., for the many cases that arise in which fast, approximate answers are useful (e.g., assumption checking during debugging or feasibility evaluation).

I'm currently able to estimate sines and cosines of any angle in degrees to within $10\%$ error, but I'd really like to be able to take those initial estimates and then refine them further with some kind of simple iterative process that can be carried out relatively quickly with pencil and paper. I find this useful in various situations, for instance in the lab or in group brainstorming sessions, in which a calculator is not readily available.

3

There are 3 best solutions below

1
On BEST ANSWER

For $0\le x\le\frac\pi2$, you have

  • $\sin x\le 1$
  • $\sin x \le x$
  • $\sin x \le \sin \alpha+(x-\alpha)\cos\alpha$ for suitable $\alpha\in[0,\frac\pi2]$
  • $\sin x \ge 1-\frac{(\pi-x)^2}2$

and several other simple approximations that may cover many cases. However, if $y\approx \sin x$, you can hardly avoid calculating $\sin x$.

0
On

Well, $|\sin x| \le 1$ for all $x \in \mathbb{R}$. It follows that if $y < -1$ then $(x,y)$ is below the sine curve, while if $y > 1$ then $(x,y)$ is above the sine curve. The case where $-1 \le y \le 1$ is more complicated, and may well require direct calculation.

7
On

If there was a simple way to do this, that worked reliably on all inputs, then it would have to work even if $y$ was very close to $\sin(x)$. But to do that, it would effectively have to calculate $\sin(x)$.

So no, there is no simple way.