2
$\begingroup$

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.

  • 0
    Why can't you take the actual sin(x) value?2012-09-28
  • 0
    Because I'm doing this by hand, without a calculator or look up table. I know the sines of certain landmark angles (the multiples of 10-degrees) and I'm trying to figure out how to use these to find the sine of other angles by hand.2012-09-28
  • 0
    What is the reason for the downvote? Please explain it for us to improve our questions.2012-09-28

3 Answers 3

4

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
    I'm not familiar with that third point: can you describe where this comes from and how I would choose an appropriate alpha? (Or give me the name of a theorem, for instance). Thanks!2012-09-28
0

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.

0

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.

  • 0
    Hi, Tony. Is that more than just a gut instinct? I know primality is a lot different than a continuous function, but just as an illustration you can definitively test if a number is prime, but those tests won't actually produce a prime number on their own. And for sine, for instance, it is always the case the $\sin^2x + \cos^2x = 1$, so that is a definitive test for sine which just happens to not be useful because it requires me to know the cosine a priori.2012-10-01
  • 0
    Yes, it's more than just a gut instinct. If $|y-\sin(x)| < \epsilon$, then you have to be able to calculate $\sin(x)$ to an accuracy of $\epsilon$ to decide whether $y<\sin(x)$. Which is really just what I wrote in my answer :-)2012-10-01
  • 0
    But that's my point, you don't have to: $y < sqrt(1-\cos^2x)$ implies that $y < \sin(x)$.2012-10-02
  • 0
    But then you have to calculate $\cos (x)$ instead. Which is just as hard.2012-10-02
  • 0
    Agreed, which is why that particular test isn't useful. But it's a counter example to the idea that there's no way to test it without calculating $\sin(x)$. So I guess the question would be, is it provable that there's no way to perform the test I'm looking for which is easier than calculating $\sin(x)$. This particular example is not easier, but that doesn't mean there aren't any.2012-10-02
  • 0
    I don't know how to put it any simpler! If you can't follow my logic, maybe somebody else can explain it more clearly.2012-10-02
  • 0
    I can follow it fine, I'm disputing whether or not it's correct. Specifically, I'm arguing that it's inconclusive. For instance, lets substitute logs for sine, so we want to know, given some test point $(x,y)$ and an arbitrary test parameter $\epsilon > 0$, is the point below the log curve: $\ln(x) - y < \epsilon$. By your argument, because there's a log in the inequality, there's no way to test it without computing the log. But of course we can rewrite it: $e^x / e^y < e^{\epsilon}$, and perform out test without actually calculating the function in question.2012-10-02